Class: Gdk::CairoContext

Inherits:
DrawContext show all
Defined in:
(unknown)

Overview

GdkCairoContext is an object representing the platform-specific draw context.

GdkCairoContexts are created for a surface using [methodGdk.Surface.create_cairo_context], and the context can then be used to draw on that surface.

Instance Method Summary collapse

Methods inherited from DrawContext

#begin_frame, #display, #display=, #end_frame, #frame_region, #is_in_frame, #surface, #surface=

Instance Method Details

#cairo_createcairo::Context

Retrieves a Cairo context to be used to draw on the GdkSurface of context.

A call to [methodGdk.DrawContext.begin_frame] with this context must have been done or this function will return nil.

The returned context is guaranteed to be valid until [methodGdk.DrawContext.end_frame] is called.

Returns:

  • (cairo::Context)

    a Cairo context to draw on `GdkSurface