func NewPSSurface(filename string, widthInPoints, heightInPoints float64, level PSLevel) *Surface { cs := C.CString(filename) defer C.free(unsafe.Pointer(cs)) s := C.cairo_ps_surface_create(cs, C.double(widthInPoints), C.double(heightInPoints)) C.cairo_ps_surface_restrict_to_level(s, C.cairo_ps_level_t(level)) return &Surface{surface: s, context: C.cairo_create(s)} }
func (l level) String() string { v := C.cairo_ps_level_to_string(C.cairo_ps_level_t(l)) if v == nil { return "unknown PS level" } return C.GoString(v) }
func (self PSLevel) String() string { return C.GoString(C.cairo_ps_level_to_string(C.cairo_ps_level_t(self))) }
func (l level) c() C.cairo_ps_level_t { return C.cairo_ps_level_t(l) }