summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDom Lachowicz <doml@src.gnome.org>2003-01-30 17:20:03 +0000
committerDom Lachowicz <doml@src.gnome.org>2003-01-30 17:20:03 +0000
commit9e770aaa727dad06c25bb4de149d4a10e5bd101d (patch)
treec0a90a270c5abab7d7570efb9011da8d57281ed6
parent5f0ab1d0d4f8568af4b67e39b7aa61709e2322d1 (diff)
downloadlibrsvg-9e770aaa727dad06c25bb4de149d4a10e5bd101d.tar.gz
fix scaling bug when vbox isn't present
-rw-r--r--ChangeLog4
-rw-r--r--rsvg.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index a9192e16..1748a518 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/rsvg.c b/rsvg.c
index 93c97323..6986c2c9 100644
--- a/rsvg.c
+++ b/rsvg.c
@@ -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);