Commit 7cd6345d authored by Carl Worth's avatar Carl Worth

Set cairo's CTM based on state->affine so that paths are properly


        * rsvg-cairo-draw.c: (_set_rsvg_affine), (rsvg_cairo_render_path):
        Set cairo's CTM based on state->affine so that paths are properly
        transformed.
parent c2f4cbae
2005-08-03 Carl Worth <cworth@cworth.org>
* rsvg-cairo-draw.c: (_set_rsvg_affine), (rsvg_cairo_render_path):
Set cairo's CTM based on state->affine so that paths are properly
transformed.
2005-08-03 Carl Worth <cworth@cworth.org>
* rsvg-cairo-draw.c: (_pattern_add_rsvg_color_stops),
......
......@@ -158,6 +158,18 @@ _set_source_rvsg_paint_server (cairo_t *cr,
}
}
static void
_set_rsvg_affine (cairo_t *cr, const double affine[6])
{
cairo_matrix_t matrix;
cairo_matrix_init (&matrix,
affine[0], affine[1],
affine[2], affine[3],
affine[4], affine[5]);
cairo_set_matrix (cr, &matrix);
}
void
rsvg_cairo_render_path (RsvgDrawingCtx *ctx, const RsvgBpathDef *bpath_def)
{
......@@ -169,6 +181,8 @@ rsvg_cairo_render_path (RsvgDrawingCtx *ctx, const RsvgBpathDef *bpath_def)
cairo_save (cr);
_set_rsvg_affine (cr, state->affine);
for (i=0; i < bpath_def->n_bpath; i++) {
bpath = &bpath_def->bpath[i];
switch (bpath->code) {
......
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