New function rsvg_cairo_get_cairo_context()

We use it from the Rust code to extract the cairo_t from an
RsvgDrawingContext, which in turn is assumed to be a RsvgCairoRender.
parent 0ca44553
......@@ -740,6 +740,14 @@ rsvg_cairo_render_surface (RsvgDrawingCtx *ctx,
rsvg_bbox_insert (&render->bbox, &bbox);
}
cairo_t *
rsvg_cairo_get_cairo_context (RsvgDrawingCtx *ctx)
{
RsvgCairoRender *render = RSVG_CAIRO_RENDER (ctx->render);
return render->cr;
}
static void
rsvg_cairo_generate_mask (cairo_t * cr, RsvgMask * self, RsvgDrawingCtx * ctx, RsvgBbox * bbox)
{
......
......@@ -43,6 +43,9 @@ void rsvg_cairo_render_path_builder (RsvgDrawingCtx *ctx,
G_GNUC_INTERNAL
void rsvg_cairo_render_surface (RsvgDrawingCtx *ctx, cairo_surface_t *surface,
double x, double y, double w, double h);
G_GNUC_INTERNAL
cairo_t *rsvg_cairo_get_cairo_context (RsvgDrawingCtx *ctx);
G_GNUC_INTERNAL
void rsvg_cairo_push_discrete_layer (RsvgDrawingCtx *ctx);
G_GNUC_INTERNAL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment