### SVGo Command Line Usage Source: https://github.com/ajstarks/svgo/blob/master/float/README.md Illustrates how to install and use the SVGo library via the command line, including fetching the package and browsing documentation. ```bash go get github.com/ajstarks/svgo/float go doc github.com/ajstarks/svgo/float ``` -------------------------------- ### Using SVGo with svgplay Source: https://github.com/ajstarks/svgo/blob/master/float/README.md Explains how to use SVGo in conjunction with the `svgplay` command for interactive SVG sketching in a browser. It covers starting the `svgplay` server and accessing it via `http://localhost:1999/`. ```bash $ svgplay -f # use the floating point version http://localhost:1999/ ``` -------------------------------- ### SVGO Utility: Grid Function Source: https://github.com/ajstarks/svgo/blob/master/float/README.md A utility function to draw a grid of straight lines on an image. It allows specifying the starting point, dimensions, and grid size. ```APIDOC Grid(x float64, y float64, w float64, h float64, n float64, s ...string) Draws a grid of straight lines starting at coordinates (x, y), with a width w, height h, and a grid size of n. Includes an example image URL. ``` -------------------------------- ### Utility: Grid Drawing Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Draws a grid of straight lines on an image. It takes starting coordinates, dimensions, and grid size as parameters. ```APIDOC Grid(x int, y int, w int, h int, n int, s ...string) draws a grid of straight lines starting at x,y, with a width w, and height h, and a size of n. Example: ![Grid](http://farm5.static.flickr.com/4133/5190957924_7a31d0db34.jpg) ``` -------------------------------- ### SVG Document Initialization and Configuration Source: https://github.com/ajstarks/svgo/blob/master/float/README.md Methods for initializing an SVG document, setting its dimensions, units, and viewbox. Includes options for specifying output writers and decimal precision. ```go New(w io.Writer) *SVG Constructor, Specify the output destination, and the number of digits after the decimal point (default 2) Start(w float64, h float64, attributes ...string) begin the SVG document with the width w and height h. Optionally add additional elements (such as additional namespaces or scripting events) Startview(w, h, minx, miny, vw, vh float64) begin the SVG document with the width w, height h, with a viewBox at minx, miny, vw, vh. Startunit(w float64, h float64, unit string, ns ...string) begin the SVG document, with width and height in the specified units. Optionally add additional elements (such as additional namespaces or scripting events) Startpercent(w float64, h float64, ns ...string) begin the SVG document, with width and height in percent. Optionally add additional elements (such as additional namespaces or scripting events) StartviewUnit(w, h float64, unit string, minx, miny, vw, vh float64) begin the SVG document with the width w, height h, in the specified unit, with a viewBox at minx, miny, vw, vh. ``` -------------------------------- ### Minimal SVG Generation in Go Source: https://github.com/ajstarks/svgo/blob/master/float/README.md Demonstrates how to create a minimal SVG file to standard output using the SVGo library. It includes setting up the canvas, drawing a circle, adding text, and closing the SVG document. ```go package main import ( "github.com/ajstarks/svgo/float" "os" ) func main() { width := 500.0 height := 500.0 canvas := svg.New(os.Stdout) canvas.Start(width, height) canvas.Circle(width/2, height/2, 100) canvas.Text(width/2, height/2, "Hello, SVG", "text-anchor:middle;font-size:30px;fill:white") canvas.End() } ``` -------------------------------- ### Drawing SVG in a Web Server with Go Source: https://github.com/ajstarks/svgo/blob/master/float/README.md Shows how to serve SVG content from a web server using the SVGo library. It sets up an HTTP handler to generate an SVG circle when a specific endpoint is accessed. ```go package main import ( "log" "github.com/ajstarks/svgo/float" "net/http" ) func main() { http.Handle("/circle", http.HandlerFunc(circle)) err := http.ListenAndServe(":2003", nil) if err != nil { log.Fatal("ListenAndServe:", err) } } func circle(w http.ResponseWriter, req *http.Request) { w.Header().Set("Content-Type", "image/svg+xml") s := svg.New(w) s.Start(500, 500) s.Circle(250, 250, 125, "fill:none;stroke:black") s.End() } ``` -------------------------------- ### SVGO FeDiffuseLighting and FeDiffEnd Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Functions to specify diffuse lighting filter primitives and end the diffuse lighting container. ```APIDOC FeDiffuseLighting(fs Filterspec, scale, constant float64, s ...string) Specifies a diffuse lighting filter primitive, a container for light source Elements. End with DiffuseEnd(). FeDiffEnd() Ends a diffuse lighting filter primitive container. Standard reference: ``` -------------------------------- ### Minimal SVG Generation in Go Source: https://github.com/ajstarks/svgo/blob/master/README.markdown This Go code snippet demonstrates the basic usage of the SVGo library to generate a simple SVG file with a circle and text. It initializes the SVGo canvas, draws elements, and writes the output to standard output. ```go package main import ( "github.com/ajstarks/svgo" "os" ) func main() { width := 500 height := 500 canvas := svg.New(os.Stdout) canvas.Start(width, height) canvas.Circle(width/2, height/2, 100) canvas.Text(width/2, height/2, "Hello, SVG", "text-anchor:middle;font-size:30px;fill:white") canvas.End() } ``` -------------------------------- ### SVG Drawing in a Web Server with Go Source: https://github.com/ajstarks/svgo/blob/master/README.markdown This Go code snippet shows how to integrate SVGo into a web server. It sets up an HTTP handler to serve SVG content dynamically, drawing a circle with specified styling when a client accesses the '/circle' endpoint. ```go package main import ( "log" "github.com/ajstarks/svgo" "net/http" ) func main() { http.Handle("/circle", http.HandlerFunc(circle)) err := http.ListenAndServe(":2003", nil) if err != nil { log.Fatal("ListenAndServe:", err) } } func circle(w http.ResponseWriter, req *http.Request) { w.Header().Set("Content-Type", "image/svg+xml") s := svg.New(w) s.Start(500, 500) s.Circle(250, 250, 125, "fill:none;stroke:black") s.End() } ``` -------------------------------- ### SVG Document Construction Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Methods for creating and finalizing an SVG document, including setting dimensions, units, and viewports. ```APIDOC New(w io.Writer) *SVG Constructor, Specify the output destination. Start(w int, h int, attributes ...string) begin the SVG document with the width w and height h. Optionally add additional elements (such as additional namespaces or scripting events) Startview(w, h, minx, miny, vw, vh int) begin the SVG document with the width w, height h, with a viewBox at minx, miny, vw, vh. Startunit(w int, h int, unit string, ns ...string) begin the SVG document, with width and height in the specified units. Optionally add additional elements (such as additional namespaces or scripting events) Startpercent(w int, h int, ns ...string) begin the SVG document, with width and height in percent. Optionally add additional elements (such as additional namespaces or scripting events) StartviewUnit(w, h int, unit string, minx, miny, vw, vh int) begin the SVG document with the width w, height h, in the specified unit, with a viewBox at minx, miny, vw, vh. End() end the SVG document ``` -------------------------------- ### Markers and Patterns Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Functions for defining custom markers and patterns, specifying their properties and usage. ```APIDOC Marker(id string, x, y, w, h int, s ...string) define a marker MarkerEnd() end a marker Mask(id string, x int, y int, w int, h int, s ...string) creates a mask with a specified id, dimension, and optional style. MaskEnd() ends the Mask element. Pattern(id string, x, y, width, height int, putype string, s ...string) define a Pattern with the specified dimensions, the putype can be either "user" or "obj", which sets the patternUnits attribute to be either userSpaceOnUse or objectBoundingBox. ``` -------------------------------- ### Clip Paths and Definitions Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Methods for defining and managing clipping paths and definition blocks within an SVG. ```APIDOC ClipPath(s ...string) Begin a ClipPath ClipEnd() End a ClipPath Def() begin a definition block. DefEnd() end a definition block. ``` -------------------------------- ### SVG Definitions and Markers Source: https://github.com/ajstarks/svgo/blob/master/float/README.md Methods for defining reusable elements like definition blocks and markers within an SVG. ```go Def() begin a definition block. DefEnd() end a definition block. Marker(id string, x, y, w, h float64, s ...string) define a marker MarkerEnd() end a marker ``` -------------------------------- ### SVGo Styling Convention Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Explains the convention for applying styles to SVG objects using name:value pairs or name="value" pairs, following the SVG standard. ```go Many functions use x, y to specify an object's location, and w, h to specify the object's width and height. Where applicable, a final optional argument specifies the style to be applied to the object. The style strings follow the SVG standard; name:value pairs delimited by semicolons, or a series of name="value" pairs. For example: "fill:none; opacity:0.3" or fill="none" opacity="0.3" (see: ) ``` -------------------------------- ### SVG Basic Elements Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Defines basic SVG elements for structuring and linking content. ```APIDOC Title(title: string) - Specifies the text of the title. Link(href: string, title: string) - Begins a link named "href" with the specified title. LinkEnd() - Ends the current link. Use(x: int, y: int, link: string, ...s: string) - Places the object referenced at 'link' at the location x, y. ``` -------------------------------- ### SVG Masks and Patterns Source: https://github.com/ajstarks/svgo/blob/master/float/README.md Methods for creating masks and patterns in SVG, specifying their IDs, dimensions, and other attributes. ```go Mask(id string, x float64, y float64, w float64, h float64, s ...string) creates a mask with a specified id, dimension, and optional style. MaskEnd() ends the Mask element. Pattern(id string, x, y, width, height float64, putype string, s ...string) define a Pattern with the specified dimensions, the putype can be either "user" or "obj", which sets the patternUnits ``` -------------------------------- ### SVGO FeComponentTransfer Functions Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Functions to begin, end, and define component transfer functions for color channels. ```APIDOC FeComponentTransfer() Begins a feComponent filter Element. Standard reference: FeCompEnd() Ends a feComponent filter Element. FeFuncLinear(channel string, slope, intercept float64) Is the linear form of feFunc. Standard reference: FeFuncGamma(channel, amplitude, exponent, offset float64) Is the gamma curve form of feFunc. Standard reference: FeFuncTable(channel string, tv []float64) Is the form of feFunc using a table of values. Standard reference: FeFuncDiscrete(channel string, tv []float64) Is the form of feFunc using discrete values. Standard reference: ``` -------------------------------- ### SVG Clipping Paths Source: https://github.com/ajstarks/svgo/blob/master/float/README.md Methods for defining and ending clipping paths in SVG. ```go ClipPath(s ...string) Begin a ClipPath ClipEnd() End a ClipPath ``` -------------------------------- ### SVGO FeDistantLight Filter Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Specifies the feDistantLight filter primitive, representing a distant light source for lighting effects. ```APIDOC FeDistantLight(fs Filterspec, azimuth, elevation float64, s ...string) Specifies a feDistantLight filter primitive. Standard reference: ``` -------------------------------- ### SVG Line Commands Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Commands for drawing line segments and polylines in SVG. ```APIDOC Line(x1: int, y1: int, x2: int, y2: int, ...s: string) - Draws a line segment between x1,y1 and x2,y2. Polyline(x: []int, y: []int, ...s: string) - Draws a polygon using coordinates specified in x,y arrays. ``` -------------------------------- ### SVG Metadata Elements Source: https://github.com/ajstarks/svgo/blob/master/float/README.md Functions to specify metadata for SVG elements, including descriptions and titles, and to manage links within SVG documents. ```APIDOC Desc(s string) specify the text of the description. Title(s string) specify the text of the title. Link(href string, title string) begin a link named "href", with the specified title. LinkEnd() end the link. Use(x float64, y float64, link string, s ...string) place the object referenced at link at the location x, y. ``` -------------------------------- ### SVGO FePointLight Filter Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Specifies the fePointLight filter primitive, representing a point light source for lighting effects. ```APIDOC FePointLight(x, y, z float64, s ...string) Specifies a fePpointLight filter primitive. Standard reference: ``` -------------------------------- ### Grouping and Transformations Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Functions for creating groups of elements and applying various transformations like translation, scaling, skewing, and rotation. ```APIDOC Group(s ...string) begin a group, with arbitrary attributes Gstyle(s string) begin a group, with the specified style. Gid(s string) begin a group, with the specified id. Gtransform(s string) begin a group, with the specified transform, end with Gend(). Translate(x, y int) begins coordinate translation to (x,y), end with Gend(). Scale(n float64) scales the coordinate system by n, end with Gend(). ScaleXY(x, y float64) scales the coordinate system by x, y. End with Gend(). SkewX(a float64) SkewX skews the x coordinate system by angle a, end with Gend(). SkewY(a float64) SkewY skews the y coordinate system by angle a, end with Gend(). SkewXY(ax, ay float64) SkewXY skews x and y coordinate systems by ax, ay respectively, end with Gend(). Rotate(r float64) rotates the coordinate system by r degrees, end with Gend(). TranslateRotate(x, y int, r float64) translates the coordinate system to (x,y), then rotates to r degrees, end with Gend(). RotateTranslate(x, y int, r float64) rotates the coordinate system r degrees, then translates to (x,y), end with Gend(). Gend() end the group (must be paired with Gstyle, Gtransform, Gid). ``` -------------------------------- ### SVG Shapes Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Commands for drawing basic geometric shapes in SVG. ```APIDOC Circle(x: int, y: int, r: int, ...s: string) - Draws a circle centered at x,y with radius r. Ellipse(x: int, y: int, w: int, h: int, ...s: string) - Draws an ellipse centered at x,y with radii w and h. Polygon(x: []int, y: []int, ...s: string) - Draws a series of line segments using arrays of x, y coordinates. Rect(x: int, y: int, w: int, h: int, ...s: string) - Draws a rectangle with the upper left-hand corner at x,y, with width w, and height h. CenterRect(x: int, y: int, w: int, h: int, ...s: string) - Draws a rectangle with its center at x,y, with width w, and height h. Roundrect(x: int, y: int, w: int, h: int, rx: int, ry: int, ...s: string) - Draws a rounded rectangle with the upper left-hand corner at x,y, with width w, and height h. The radii for the rounded portion are specified by rx (width), and ry (height). Square(x: int, y: int, s: int, ...style: string) - Draws a square with the upper left corner at x,y with sides of length s. ``` -------------------------------- ### SVG Image Element Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Places an image at specified coordinates with given dimensions and a link. Supports optional style attributes. ```go Image(x int, y int, w int, h int, link string, s ...string) place at x,y (upper left hand corner), the image with width w, and height h, referenced at link. ``` -------------------------------- ### SVG Image Element Source: https://github.com/ajstarks/svgo/blob/master/float/README.md Places an image at specified coordinates with given dimensions and a link. Supports optional style attributes. ```go Image(x float64, y float64, w float64, h float64, link string, s ...string) place at x,y (upper left hand corner), the image with width w, and height h, referenced at link. ``` -------------------------------- ### Scripting and Styling Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Methods for embedding scripts and styles within an SVG document, supporting external links or inline content. ```APIDOC Script(scriptype string, data ...string) Script defines a script with a specified type, (for example "application/javascript"). if the first variadic argument is a link, use only the link reference. Otherwise, treat variadic arguments as the text of the script (marked up as CDATA). if no data is specified, simply close the script element. Style(scriptype string, data ...string) Style defines a script with a specified type, (for example "text/css"). if the first variadic argument is a link, use only the link reference. Otherwise, treat variadic arguments as the text of the script (marked up as CDATA). if no data is specified, simply close the style element. ``` -------------------------------- ### SVG Path Commands Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Commands for drawing complex paths in SVG, including arcs and Bezier curves. ```APIDOC Path(p: string, ...s: style) - Draws the arbitrary path as specified in p, according to the style specified in s. Arc(sx: int, sy: int, ax: int, ay: int, r: int, large: bool, sweep: bool, ex: int, ey: int, ...s: string) - Draws an elliptical arc beginning at sx,sy, ending at ex, ey. Width and height of the arc are specified by ax, ay, the x axis rotation is r. If sweep is true, the arc is drawn clockwise; if false, counterclockwise. If large is true, the arc sweep angle is >= 180 degrees, otherwise < 180 degrees. Bezier(sx: int, sy: int, cx: int, cy: int, px: int, py: int, ex: int, ey: int, ...s: string) - Draws a cubic Bezier curve, beginning at sx,sy, ending at ex,ey with control points at cx,cy and px,py. Qbezier(sx: int, sy: int, cx: int, cy: int, ex: int, ey: int, tx: int, ty: int, ...s: string) - Draws a quadratic Bezier curve, beginning at sx, sy, ending at tx,ty with control points at cx,cy, ex,ey. Qbez(sx: int, sy: int, cx: int, cy: int, ex: int, ey: int, ...s: string) - Draws a quadratic Bezier curve, with optional style, beginning at sx,sy, ending at ex, sy with the control point at cx, cy. ``` -------------------------------- ### SVG Color Styles Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Generates style strings for RGB and RGBA colors, including opacity. ```go RGB(r int, g int, b int) string creates a style string for the fill color designated by the (r)ed, g(reen), (b)lue components. ``` ```go RGBA(r int, g int, b int, a float64) string as above, but includes the color's opacity as a value between 0.0 (fully transparent) and 1.0 (opaque). ``` -------------------------------- ### SVGO FeColorMatrix Filters Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Specifies color matrix filter primitives for manipulating colors. Supports matrix values, hue, saturation, and luminance adjustments. ```APIDOC FeColorMatrix(fs Filterspec, values [20]float64, s ...string) Specifies a color matrix filter primitive, with matrix values. Standard reference: FeColorMatrixHue(fs Filterspec, value float64, s ...string) Specifies a color matrix filter primitive, with hue values. Standard reference: FeColorMatrixSaturate(fs Filterspec, value float64, s ...string) Specifies a color matrix filter primitive, with saturation values. Standard reference: FeColorMatrixLuminence(fs Filterspec, s ...string) Specifies a color matrix filter primitive, with luminance values. Standard reference: ``` -------------------------------- ### SVG Text Element Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Places text at specified coordinates with optional styling. Supports basic text and text spans. ```go Text(x int, y int, t string, s ...string) Place the specified text, t at x,y according to the optional style specified in s. ``` ```go Textspan(x int, y int, t string, s ...string) Place specified text, t at x,y according to the optional style specified in s. Use this method with Span(...). End with TextEnd() ``` ```go Span(t string, s ...string) Create a text span t, using optional style s ``` ```go TextEnd() End a text span ``` ```go Textlines(x, y int, s []string, size, spacing int, fill, align string) Places lines of text in s, starting at x,y, at the specified size, fill, and alignment, and spacing. ``` ```go Textpath(t string, pathid string, s ...string) places optionally styled text along a previously defined path. ``` -------------------------------- ### SVG Color Styles Source: https://github.com/ajstarks/svgo/blob/master/float/README.md Functions to create color style strings for SVG elements using RGB and RGBA values. ```go RGB(r float64, g float64, b float64) string creates a style string for the fill color designated by the (r)ed, g(reen), (b)lue components. ``` ```go RGBA(r float64, g float64, b float64, a float64) string as above, but includes the color's opacity as a value between 0.0 (fully transparent) and 1.0 (opaque). ``` -------------------------------- ### SVG Line Drawing Functions Source: https://github.com/ajstarks/svgo/blob/master/float/README.md Functions for drawing straight lines and polylines in SVG. ```APIDOC Line(x1 float64, y1 float64, x2 float64, y2 float64, s ...string) draw a line segment between x1,y1 and x2,y2. Polyline(x []int, y []int, s ...string) draw a polygon using coordinates specified in x,y arrays. ``` -------------------------------- ### SVG Animation Elements Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Provides functions for various SVG animations including general animation, motion, translation, rotation, scaling, and skewing. ```go Animate(link, attr string, from, to int, duration float64, repeat int, s ...string) Animate animates the item referenced by the link, using the specified attribute The animation starts at coordinate from, terminates at to, and repeats as specified. Addtional attributes may be added as needed. ``` ```go AnimateMotion(link, path string, duration float64, repeat int, s ...string) AnimateMotion animates the referenced object ```link``` along the specified ```path``` ``` ```go AnimateTranslate(link string, fx, fy, tx, ty int, duration float64, repeat int, s ...string) AnimateTranslate animates the translation transformation (link refers to the object to animate, fx, fy are from coordinates, tx, ty are the to coordinates) ``` ```go AnimateRotate(link string, fs, fc, fe, ts, tc, te int, duration float64, repeat int, s ...string) AnimateRotate animates the rotation transformation (link refers to the object to animate, f[s,c,e] are the from start, center, and end angles, t[s,c,e] are the start, center, and end angles) ``` ```go AnimateScale(link string, from, to, duration float64, repeat int, s ...string) AnimateScale animates the scale transformation (link refers to the object to animate, from and to specify the scaling factor) ``` ```go AnimateSkewX(link string, from, to, duration float64, repeat int, s ...string) AnimateSkewX animates the skewX transformation ((link refers to the object to animate, from and to specify the skew angle) ``` ```go AnimateSkewY(link string, from, to, duration float64, repeat int, s ...string) AnimateSkewY animates the skewY transformation (link refers to the object to animate, and from and to specify the skew angle) ``` -------------------------------- ### Metadata Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Method for adding descriptive metadata to an SVG document. ```APIDOC Desc(s string) specify the text of the description. ``` -------------------------------- ### SVG Script and Style Elements Source: https://github.com/ajstarks/svgo/blob/master/float/README.md Methods for embedding script and style content within an SVG document. Supports external links or inline CDATA content. ```go Script(scriptype string, data ...string) Script defines a script with a specified type, (for example "application/javascript"). if the first variadic argument is a link, use only the link reference. Otherwise, treat variadic arguments as the text of the script (marked up as CDATA). if no data is specified, simply close the script element. Style(scriptype string, data ...string) Style defines a script with a specified type, (for example "text/css"). if the first variadic argument is a link, use only the link reference. Otherwise, treat variadic arguments as the text of the script (marked up as CDATA). if no data is specified, simply close the style element. ``` -------------------------------- ### SVGO FeBlend Filter Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Specifies the feBlend filter primitive, used for blending two input images. ```APIDOC FeBlend(fs Filterspec, mode string, s ...string) Specifies a Blend filter primitive. Standard reference: ``` -------------------------------- ### SVGO FeOffset Filter Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Specifies the feOffset filter primitive, used for offsetting an image by a specified amount. ```APIDOC FeOffset(fs Filterspec, dx, dy int, s ...string) Specifies the feOffset filter primitive. Standard reference: ``` -------------------------------- ### SVG Filter Primitives Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Defines various SVG filter primitives used for creating complex image effects. These include lighting effects, tiling, and turbulence. ```APIDOC FeSpecularLighting(fs Filterspec, scale, constant float64, exponent int, color string, s ...string) specifies a specular lighting filter primitive, a container for light source elements, end with SpecularEnd() Standard reference: FeSpecEnd() ends a specular lighting filter primitive container Standard reference: FeSpotLight(fs Filterspec, x, y, z, px, py, pz float64, s ...string) specifies a feSpotLight filter primitive Standard reference: FeTile(fs Filterspec, in string, s ...string) specifies the tile utility filter primitive Standard reference: FeTurbulence(fs Filterspec, ftype string, bfx, bfy float64, octaves int, seed int64, stitch bool, s ...string) specifies a turbulence filter primitive Standard reference: ``` -------------------------------- ### SVG Grouping and Transformations Source: https://github.com/ajstarks/svgo/blob/master/float/README.md Methods for creating and manipulating groups within an SVG, including applying transformations like translate, scale, skew, and rotate. ```go Group(s ...string) begin a group, with arbitrary attributes Gstyle(s string) begin a group, with the specified style. Gid(s string) begin a group, with the specified id. Gtransform(s string) begin a group, with the specified transform, end with Gend(). Translate(x, y float64) begins coordinate translation to (x,y), end with Gend(). Scale(n float64) scales the coordinate system by n, end with Gend(). ScaleXY(x, y float64) scales the coordinate system by x, y. End with Gend(). SkewX(a float64) SkewX skews the x coordinate system by angle a, end with Gend(). SkewY(a float64) SkewY skews the y coordinate system by angle a, end with Gend(). SkewXY(ax, ay float64) SkewXY skews x and y coordinate systems by ax, ay respectively, end with Gend(). Rotate(r float64) rotates the coordinate system by r degrees, end with Gend(). TranslateRotate(x, y float64, r float64) translates the coordinate system to (x,y), then rotates to r degrees, end with Gend(). RotateTranslate(x, y float64, r float64) rotates the coordinate system r degrees, then translates to (x,y), end with Gend(). Gend() end the group (must be paired with Gstyle, Gtransform, Gid). ``` -------------------------------- ### Filter Convenience Functions Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Provides convenient functions for applying common CSS filter effects to images, such as blur, brightness, grayscale, hue rotation, inversion, saturation, and sepia. ```APIDOC Blur(p float64) Blur function by standard deviation Brightness(p float64) Brightness function (0-100) Grayscale() Apply a grayscale filter to the image HueRotate(a float64) Rotate Hues (0-360 degrees) Invert() Invert the image's colors Saturate(p float64) Percent saturation, 0 is grayscale Sepia() Apply sepia tone ``` -------------------------------- ### SVGO FeFlood Filter Source: https://github.com/ajstarks/svgo/blob/master/README.markdown Specifies the feFlood filter primitive, used for filling an area with a solid color. ```APIDOC FeFlood(fs Filterspec, color string, opacity float64, s ...string) Specifies a flood filter primitive. Standard reference: ```