### Method

# Gdk CairoContext cairo_create

deprecated: 4.18

#### Declaration [src]

    cairo_t*
    gdk_cairo_context_cairo_create (
      GdkCairoContext* self
    )

#### Description [src]

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

A call to `gdk_draw_context_begin_frame()` with this `context` must have been done or this function will return `NULL`.

The returned context is guaranteed to be valid until `gdk_draw_context_end_frame()` is called.

Deprecated since: 4.18

Drawing content with Cairo should be done via Cairo rendernodes, not by using renderers.

#### Return value

Type: `cairo_t`

A Cairo context to draw on `GdkSurface.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be `NULL`.