svg

package
v0.0.0-...-1fae4d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2014 License: BSD-2-Clause Imports: 4 Imported by: 0

README

#svg GoDoc Package svg implements the SVG backend for libcairo rendering.

Download:

go get github.com/jimmyfrasche/cairo/svg

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.

#Bugs

  • add documentation about mime type to New after I figure out what that entails.
  • add special method for attaching url's as that's handled specially anyhoo.

Automatically generated by autoreadme on 2014.05.08

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

View Source
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

func Versions

func Versions() (versions []version)

Versions returns the SVG versions that libcairo supports.

Originally cairo_svg_get_versions.

Types

type Surface

type Surface struct {
	cairo.XtensionVectorSurface
}

Surface is an SVG surface.

Surface implements cairo.VectorSurface.

func New

func New(w io.Writer, width, height float64) (Surface, error)

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

func (s Surface) RestrictTo(v version) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL