Exemple #1
0
func CairoCreate(window *Window) *cairo.Context {
	ctx := C.gdk_cairo_create(window.native())
	if ctx == nil {
		return nil
	}
	return cairo.WrapContext(unsafe.Pointer(ctx))
}
Exemple #2
0
func (w *Window) GetCairo() *cairo.Context {
	return cairo.WrapContext(unsafe.Pointer(C.gdk_cairo_create(C.gtk_widget_get_window(w.gtkWin))))
}
Exemple #3
0
/*
Creates a Cairo context for drawing to @window.

Note that calling cairo_reset_clip() on the resulting #cairo_t will
produce undefined results, so avoid it at all costs.
*/
func CairoCreate(window IsWindow) (return__ *C.cairo_t) {
	return__ = C.gdk_cairo_create(window.GetWindowPointer())
	return
}