diff options
author | Dom Lachowicz <doml@src.gnome.org> | 2003-01-30 17:20:03 +0000 |
---|---|---|
committer | Dom Lachowicz <doml@src.gnome.org> | 2003-01-30 17:20:03 +0000 |
commit | 9e770aaa727dad06c25bb4de149d4a10e5bd101d (patch) | |
tree | c0a90a270c5abab7d7570efb9011da8d57281ed6 | |
parent | 5f0ab1d0d4f8568af4b67e39b7aa61709e2322d1 (diff) | |
download | librsvg-9e770aaa727dad06c25bb4de149d4a10e5bd101d.tar.gz |
fix scaling bug when vbox isn't present
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | rsvg.c | 8 |
2 files changed, 8 insertions, 4 deletions
@@ -1,3 +1,7 @@ +2003-01-30 Dom Lachowicz <cinamod@hotmail.com> + + * rsvg.c (rsvg_start_svg): s/TRUE/FALSE to fix scaling vbox issue + 2003-01-29 Dom Lachowicz <cinamod@hotmail.com> * rsvg-paint-server.[ch]: Handle objectBoundingBox units for linear gradients, radialGradients. Radial are untested and do not work properly. @@ -84,7 +84,7 @@ rsvg_start_svg (RsvgHandle *ctx, const xmlChar **atts) double y_zoom = 1.; double vbox_x = 0, vbox_y = 0, vbox_w = 0, vbox_h = 0; - gboolean has_vbox = TRUE; + gboolean has_vbox = FALSE; if (atts != NULL) { @@ -135,8 +135,8 @@ rsvg_start_svg (RsvgHandle *ctx, const xmlChar **atts) if (!has_vbox) { - x_zoom = (width < 0 || new_width < 0) ? 1 : (double) new_width / width; - y_zoom = (height < 0 || new_height < 0) ? 1 : (double) new_height / height; + x_zoom = (width < 0 || new_width < 0) ? 1 : (double) new_width / width; + y_zoom = (height < 0 || new_height < 0) ? 1 : (double) new_height / height; } else { @@ -152,7 +152,7 @@ rsvg_start_svg (RsvgHandle *ctx, const xmlChar **atts) new_width = (width == -1 ? new_width : width); new_height = (height == -1 ? new_height : height); } - + /* Scale size of target pixbuf */ state = &ctx->state[ctx->n_state - 1]; art_affine_scale (state->affine, x_zoom, y_zoom); |