Socket
Socket
Sign inDemoInstall

github.com/gosvg/gosvg

Package Overview
Dependencies
0
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/gosvg/gosvg

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.


Version published

Readme

Source

gosvg -- Pure Go SVG generation

gosvg is a pure Go package for generating Scalable Vector Graphics (SVG) 1.1 documents and fragments as defined by the SVG 1.1 Specification (https://www.w3.org/TR/SVG11/).

Get started by running go get github.com/gosvg/gosvg.

API documentation is available at https://godoc.org/github.com/gosvg/gosvg.

FAQs

Last updated on 24 Jun 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc