Beispiel #1
0
func news(s *C.cairo_surface_t, eps bool) (Surface, error) {
	S := Surface{
		XtensionPagedVectorSurface: cairo.NewXtensionPagedVectorSurface(s),
		eps: eps,
	}
	return S, S.Err()
}
Beispiel #2
0
//New creates a new tee surface.
//
//Originally cairo_tee_surface_create.
func New(masterSurface cairo.Surface, surfaces ...cairo.Surface) (Surface, error) {
	m := C.cairo_tee_surface_create(masterSurface.XtensionRaw())
	for _, s := range surfaces {
		C.cairo_tee_surface_add(m, s.XtensionRaw())
	}
	S := Surface{cairo.NewXtensionPagedVectorSurface(m)}
	return S, S.Err()
}
Beispiel #3
0
func cNew(m *C.cairo_surface_t) (cairo.Surface, error) {
	S := Surface{cairo.NewXtensionPagedVectorSurface(m)}
	return S, S.Err()
}
Beispiel #4
0
func cNew(s *C.cairo_surface_t, e cairo.Rectangle) Surface {
	return Surface{
		cairo.NewXtensionPagedVectorSurface(s),
		e,
	}
}
Beispiel #5
0
func cNewSurf(s *C.cairo_surface_t) (Surface, error) {
	S := Surface{
		XtensionPagedVectorSurface: cairo.NewXtensionPagedVectorSurface(s),
	}
	return S, S.Err()
}