cairo_create


Description:


[ Version ( deprecated = true , deprecated_since = "3.22" , since = "2.8" ) ]
public Context cairo_create (Window window)

Warning: cairo_create is deprecated since 3.22.

Creates a Cairo context for drawing to window.

Note:

Note that calling reset_clip on the resulting Context will produce undefined results, so avoid it at all costs.

Typically, this function is used to draw on a Window out of the paint cycle of the toolkit; this should be avoided, as it breaks various assumptions and optimizations.

If you are drawing on a native Window in response to a gdk_expose event you should use begin_draw_frame and get_cairo_context instead. GTK will automatically do this for you when drawing a widget.

Parameters:

window

a Window

Returns:

A newly created Cairo context. Free with cairo_destroy when you are done drawing.


Namespace: Gdk
Package: gdk-3.0



2022 vala-language.org