Gdk.Drawing_Context.Gdk_Drawing_Context is an object that represents the current drawing state of a Gdk.Gdk_Window.
It's possible to use a Gdk.Drawing_Context.Gdk_Drawing_Context to draw on a Gdk.Gdk_Window via rendering API like Cairo or OpenGL.
A Gdk.Drawing_Context.Gdk_Drawing_Context can only be created by calling Gdk.Window.Begin_Draw_Frame and will be valid until a call to Gdk.Window.End_Draw_Frame.
Gdk.Drawing_Context.Gdk_Drawing_Context is available since GDK 3.22
Clip_Property : constant Glib.Properties.Property_Boxed;
Type: cairo.Region The clip region applied to the drawing context.
type Gdk_Drawing_Context is access all Gdk_Drawing_Context_Record'Class;
type Gdk_Drawing_Context_Record is new GObject_Record with null record;
function Get_Cairo_Context
(Self : not null access Gdk_Drawing_Context_Record)
return Cairo.Cairo_Context
Retrieves a Cairo context to be used to draw on the Gdk.Gdk_Window that created the Gdk.Drawing_Context.Gdk_Drawing_Context. The returned context is guaranteed to be valid as long as the Gdk.Drawing_Context.Gdk_Drawing_Context is valid, that is between a call to Gdk.Window.Begin_Draw_Frame and Gdk.Window.End_Draw_Frame. Since: gtk+ 3.22
a Cairo context to be used to draw the contents of the Gdk.Gdk_Window. The context is owned by the Gdk.Drawing_Context.Gdk_Drawing_Context and should not be destroyed
function Get_Clip
(Self : not null access Gdk_Drawing_Context_Record)
return Cairo.Region.Cairo_Region
Retrieves a copy of the clip region used when creating the Context. Since: gtk+ 3.22
a Cairo region
function Get_Type return Glib.GType
function Get_Window
(Self : not null access Gdk_Drawing_Context_Record)
return Gdk.Gdk_Window
Retrieves the window that created the drawing Context. Since: gtk+ 3.22
a Gdk.Gdk_Window
function Is_Valid
(Self : not null access Gdk_Drawing_Context_Record) return Boolean
Checks whether the given Gdk.Drawing_Context.Gdk_Drawing_Context is valid. Since: gtk+ 3.22
True if the context is valid
Window_Property : constant Glib.Properties.Property_Object;
Type: Gtk.Window.Gtk_Window The Gdk.Gdk_Window that created the drawing context.