diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | rsvg-shapes.c | 38 | ||||
-rw-r--r-- | rsvg-styles.c | 8 |
3 files changed, 28 insertions, 24 deletions
@@ -1,3 +1,9 @@ +2004-07-23 Caleb Moore <c.moore@student.unsw.edu.au> + + * rsvg-shapes.c, rsvg-mask.c: ClipPaths now partially working + * rsvg-shapes.c: now keep a copy of everything in defs. + * rsvg-styles.c: don't push discrete layers while in defs. + 2004-07-21 Caleb Moore <c.moore@student.unsw.edu.au> * rsvg-shapes.c: Bilinear interpolation for images diff --git a/rsvg-shapes.c b/rsvg-shapes.c index 1f27cfd7..154fa9c2 100644 --- a/rsvg-shapes.c +++ b/rsvg-shapes.c @@ -767,8 +767,6 @@ RsvgDefsDrawable * rsvg_push_def_group (RsvgHandle *ctx, const char * id) { RsvgDefsDrawableGroup *group; - if (!ctx->in_defs) - return NULL; group = g_new (RsvgDefsDrawableGroup, 1); group->children = g_ptr_array_new(); @@ -793,8 +791,7 @@ void rsvg_pop_def_group (RsvgHandle *ctx) { RsvgDefsDrawableGroup * group; - if (!ctx->in_defs) - return; + group = (RsvgDefsDrawableGroup *)ctx->current_defs_group; if (group == NULL) return; @@ -806,24 +803,23 @@ rsvg_handle_path (RsvgHandle *ctx, const char * d, const char * id) { if (!ctx->in_defs) rsvg_render_path (ctx, d); - else { + - RsvgDefsDrawablePath *path; - - path = g_new (RsvgDefsDrawablePath, 1); - path->d = g_strdup(d); - rsvg_state_clone (&path->super.state, rsvg_state_current (ctx)); - path->super.super.type = RSVG_DEF_PATH; - path->super.super.free = rsvg_defs_drawable_path_free; - path->super.draw = rsvg_defs_drawable_path_draw; - path->super.draw_as_svp = rsvg_defs_drawable_path_draw_as_svp; - rsvg_defs_set (ctx->defs, id, &path->super.super); - - path->super.parent = (RsvgDefsDrawable *)ctx->current_defs_group; - if (path->super.parent != NULL) - rsvg_defs_drawable_group_pack((RsvgDefsDrawableGroup *)path->super.parent, - &path->super); - } + RsvgDefsDrawablePath *path; + + path = g_new (RsvgDefsDrawablePath, 1); + path->d = g_strdup(d); + rsvg_state_clone (&path->super.state, rsvg_state_current (ctx)); + path->super.super.type = RSVG_DEF_PATH; + path->super.super.free = rsvg_defs_drawable_path_free; + path->super.draw = rsvg_defs_drawable_path_draw; + path->super.draw_as_svp = rsvg_defs_drawable_path_draw_as_svp; + rsvg_defs_set (ctx->defs, id, &path->super.super); + + path->super.parent = (RsvgDefsDrawable *)ctx->current_defs_group; + if (path->super.parent != NULL) + rsvg_defs_drawable_group_pack((RsvgDefsDrawableGroup *)path->super.parent, + &path->super); } void diff --git a/rsvg-styles.c b/rsvg-styles.c index d44e92a3..40eb24d3 100644 --- a/rsvg-styles.c +++ b/rsvg-styles.c @@ -1435,7 +1435,7 @@ rsvg_push_discrete_layer (RsvgHandle *ctx) pixbuf = ctx->pixbuf; if (state->filter == NULL && state->opacity == 0xFF && - !state->backgroundnew && state->mask == NULL && !state->adobe_blend) + !state->backgroundnew && state->mask == NULL && !state->adobe_blend && ctx->in_defs > 0) return; state->save_pixbuf = pixbuf; @@ -1602,7 +1602,8 @@ rsvg_composite_layer(RsvgHandle *ctx, RsvgState *state, GdkPixbuf *tos, GdkPixbu intermediate = NULL; if (state->filter == NULL && state->opacity == 0xFF && - !state->backgroundnew && state->mask == NULL && !state->adobe_blend) + !state->backgroundnew && state->mask == NULL && !state->adobe_blend + && ctx->in_defs > 0) return; operationsleft = 0; @@ -1687,7 +1688,8 @@ rsvg_pop_discrete_layer(RsvgHandle *ctx) state = rsvg_state_current(ctx); if (state->filter == NULL && state->opacity == 0xFF && - !state->backgroundnew && state->mask == NULL && !state->adobe_blend) + !state->backgroundnew && state->mask == NULL && !state->adobe_blend + && ctx->in_defs > 0) return; tos = ctx->pixbuf; |