[librsvg/next: 5/31] Fix invalid cast and struct member access



commit ea5e6db8c60278b276d11522460072d1cab9c6f4
Author: Christian Persch <chpe gnome org>
Date:   Wed Sep 7 14:42:03 2011 +0200

    Fix invalid cast and struct member access
    
    ctx->render is a RsvgCairoClipRender here, and NOT a RsvgCairoRender.
    I think the right thing here is to use the render->cr,
    and not render->parent->cr.

 rsvg-cairo-clip.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/rsvg-cairo-clip.c b/rsvg-cairo-clip.c
index d843842..f7c4dc0 100644
--- a/rsvg-cairo-clip.c
+++ b/rsvg-cairo-clip.c
@@ -75,9 +75,9 @@ rsvg_cairo_clip_render_path (RsvgDrawingCtx * ctx, const RsvgBpathDef * bpath_de
     rsvg_cairo_clip_apply_affine (render, state->affine);
 
     if (rsvg_current_state (ctx)->clip_rule == FILL_RULE_EVENODD)
-        cairo_set_fill_rule (((RsvgCairoRender *) ctx->render)->cr, CAIRO_FILL_RULE_EVEN_ODD);
+        cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);
     else                        /* state->fill_rule == FILL_RULE_NONZERO */
-        cairo_set_fill_rule (((RsvgCairoRender *) ctx->render)->cr, CAIRO_FILL_RULE_WINDING);
+        cairo_set_fill_rule (cr, CAIRO_FILL_RULE_WINDING);
 
     for (i = 0; i < bpath_def->n_bpath; i++) {
         bpath = &bpath_def->bpath[i];



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]