gdk.draw_context
Module for [DrawContext] class
Types 3
Base class for objects implementing different rendering methods.
[gdk.draw_context.DrawContext] is the base object used by contexts implementing different rendering methods, such as [gdk.cairo_context.CairoContext] or [gdk.glcontext.GLContext]. It provides shared functionality between those contexts.
You will always interact with one of those subclasses.
A [gdk.draw_context.DrawContext] is always associated with a single toplevel surface.
Methods
DrawContext self()Returns `this`, for use in `with` statements.DrawContextGidBuilder builder()Get builder for [gdk.draw_context.DrawContext] Returns: New builder objectgdk.display.Display display() @propertyGet `display` property. Returns: The [gdk.display.Display] used to create the [gdk.draw_context.DrawContext].gdk.surface.Surface surface() @propertyGet `surface` property. Returns: The [gdk.surface.Surface] the context is bound to.void beginFrame(cairo.region.Region region)Indicates that you are beginning the process of redrawing region on the context's surface.void endFrame()Ends a drawing operation started with [gdk.draw_context.DrawContext.beginFrame].gdk.display.Display getDisplay()Retrieves the [gdk.display.Display] the context is created for Returns: the [gdk.display.Display]cairo.region.Region getFrameRegion()Retrieves the region that is currently being repainted.gdk.surface.Surface getSurface()Retrieves the surface that context is bound to. Returns: a [gdk.surface.Surface]bool isInFrame()Returns true if context is in the process of drawing to its surface.Methods
T display(gdk.display.Display propval)Set `display` property. Params: propval = The [gdk.display.Display] used to create the [gdk.draw_context.DrawContext]. Returns: Builder instance for fluent chainingT surface(gdk.surface.Surface propval)Set `surface` property. Params: propval = The [gdk.surface.Surface] the context is bound to. Returns: Builder instance for fluent chainingFluent builder for [gdk.draw_context.DrawContext]
Methods