summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDom Lachowicz <doml@src.gnome.org>2003-02-02 19:24:33 +0000
committerDom Lachowicz <doml@src.gnome.org>2003-02-02 19:24:33 +0000
commit69af5b43c6617cdff68d0fc22fcdd27703cf4b51 (patch)
tree2a4039ae6f479922de7ab165327d60143bb8ffbc
parent35ea3da3f32ba9c4fedb776c1d3c31b3649c9126 (diff)
downloadlibrsvg-69af5b43c6617cdff68d0fc22fcdd27703cf4b51.tar.gz
handle RX not specified when RY is
-rw-r--r--ChangeLog4
-rw-r--r--rsvg-shapes.c2
-rw-r--r--rsvg.h4
3 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index eae340f2..e08e5855 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-02-02 Dom Lachowicz <cinamod@hotmail.com>
+
+ * rsvg-shapes.c (rect): Handle missing RX when RY is specified (http://www.w3.org/TR/SVG11/shapes.html#RectElement)
+
=== librsvg 2.2.2 ===
2003-02-01 Dom Lachowicz <cinamod@hotmail.com>
diff --git a/rsvg-shapes.c b/rsvg-shapes.c
index 9425c364..51b5e3df 100644
--- a/rsvg-shapes.c
+++ b/rsvg-shapes.c
@@ -481,6 +481,8 @@ rsvg_start_rect (RsvgHandle *ctx, const xmlChar **atts)
if (got_rx && !got_ry)
ry = rx;
+ else if (got_ry && !got_rx)
+ rx = ry;
if (x < 0. || y < 0. || w < 0. || h < 0. || rx < 0. || ry < 0.)
return;
diff --git a/rsvg.h b/rsvg.h
index 86298f69..54771e3e 100644
--- a/rsvg.h
+++ b/rsvg.h
@@ -39,7 +39,11 @@ GQuark rsvg_error_quark (void) G_GNUC_CONST;
typedef struct RsvgHandle RsvgHandle;
/**
+ * RsvgSizeFunc
* Function to let a user of the library specify the SVG's dimensions
+ * @width: the ouput width the SVG should be
+ * @height: the output height the SVG should be
+ * @user_data: user data
*/
typedef void (* RsvgSizeFunc) (gint *width,
gint *height,