Documentation ¶
Overview ¶
Package svg implements the SVG backend for libcairo rendering.
Libcairo must be compiled with
CAIRO_HAS_SVG_SURFACE
in addition to the requirements of cairo.
Index ¶
Constants ¶
const ( //SVG1_1 is the version 1.1 SVG specfication. SVG1_1 version = C.CAIRO_SVG_VERSION_1_1 //SVG1_2 is the version 1.2 SVG specfication. SVG1_2 version = C.CAIRO_SVG_VERSION_1_2 )
A version describes the version number of the SVG specification that a generated SVG file conforms to.
Originally cairo_svg_version_t.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Surface ¶
type Surface struct {
cairo.XtensionVectorSurface
}
Surface is an SVG surface.
Surface implements cairo.VectorSurface.
func New ¶
New creates a new SVG surface that writes to writer.
If writer needs to be flushed or closed, that is the responsibility of the caller.
The parameters width and height are in the unit of a typographical point (1 point = 1/72 inch).
Originally cairo_svg_surface_create_for_stream.
func (Surface) RestrictTo ¶
RestrictTo restricts the generated SVG file to the specified version.
This method should only be called before any drawing operations have been performed on this surface.
Originally cairo_svg_surface_restrict_to_version.