func NewSVGSurface(filename string, widthInPoints, heightInPoints float64, version SVGVersion) *Surface { cs := C.CString(filename) defer C.free(unsafe.Pointer(cs)) s := C.cairo_svg_surface_create(cs, C.double(widthInPoints), C.double(heightInPoints)) C.cairo_svg_surface_restrict_to_version(s, C.cairo_svg_version_t(version)) return &Surface{surface: s, context: C.cairo_create(s)} }
func (v version) String() string { V := C.cairo_svg_version_to_string(C.cairo_svg_version_t(v)) if V == nil { return "unknown SVG version" } return C.GoString(V) }
func (self SVGVersion) String() string { return C.GoString(C.cairo_svg_version_to_string(C.cairo_svg_version_t(self))) }
func (v version) c() C.cairo_svg_version_t { return C.cairo_svg_version_t(v) }