Package gosvg defines functions and data for generating SVG documents as defined by the Scalable Vector Graphics 1.1 Specification (http://www.w3.org/TR/SVG11/). Supported elements and functions: Shapes elements: circle, ellipse, line, path, polygon, polyline, rect Structural elements: g, svg Transforms: All transforms Style: All styling At the highest level of the gosvg package is the SVG type. Users can create a new SVG instance by calling NewSVG at the package level. SVG objects can then be used to generate basic shape elements or other SVG fragments and Group objects. Upon creating a new element, SVG and Group objects retain a reference to that new element for later rendering. Users should define how their images will look by manipulating the objects generated by SVGs and Groups. When the image is ready to be rendered, users should call Render on the top-level SVG object in the hierarchy to write a full XML document to the provided io.Writer. For example, the following program generates a circle inside a square: Objects are written as XML in the order that they are created by SVG and Group objects. Thus, if two objects overlap in the image, the one created later will be rendered on top of the one created earlier by a conforming SVG viewer.
Command iv is a command-line image viewer using terminal graphics (Sixel, iTerm, Kitty).