1
/* vim: set sw=4 sts=4: -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
1
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/* vim: set sw=4 sts=4 ts=4 expandtab: */
3
4
rsvg-shapes.c: Draw shapes with cairo
48
49
rsvg_cairo_clip_apply_affine (RsvgCairoClipRender *render, const double affine[6])
50
cairo_matrix_t matrix;
51
gboolean nest = render->cr != render->parent->initial_cr;
51
cairo_matrix_t matrix;
52
gboolean nest = render->cr != render->parent->initial_cr;
53
cairo_matrix_init (&matrix,
56
affine[4] + (nest ? 0 : render->parent->offset_x),
57
affine[5] + (nest ? 0 : render->parent->offset_y));
58
cairo_set_matrix (render->cr, &matrix);
54
cairo_matrix_init (&matrix,
57
affine[4] + (nest ? 0 : render->parent->offset_x),
58
affine[5] + (nest ? 0 : render->parent->offset_y));
59
cairo_set_matrix (render->cr, &matrix);
62
63
rsvg_cairo_clip_render_path (RsvgDrawingCtx * ctx, const RsvgBpathDef * bpath_def)
64
65
RsvgCairoClipRender *render = (RsvgCairoClipRender *) ctx->render;
65
RsvgState *state = rsvg_state_current (ctx);
66
RsvgState *state = rsvg_state_current (ctx);
72
rsvg_cairo_clip_apply_affine (render, state->affine);
73
rsvg_cairo_clip_apply_affine (render, state->affine);
74
75
if (rsvg_state_current (ctx)->clip_rule == FILL_RULE_EVENODD)
75
76
cairo_set_fill_rule (((RsvgCairoRender *) ctx->render)->cr, CAIRO_FILL_RULE_EVEN_ODD);