Esempio n. 1
0
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)}
}
Esempio n. 2
0
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)
}
Esempio n. 3
0
func (self PSLevel) String() string {
	return C.GoString(C.cairo_ps_level_to_string(C.cairo_ps_level_t(self)))
}
Esempio n. 4
0
func (l level) c() C.cairo_ps_level_t {
	return C.cairo_ps_level_t(l)
}