From 69af5b43c6617cdff68d0fc22fcdd27703cf4b51 Mon Sep 17 00:00:00 2001 From: Dom Lachowicz Date: Sun, 2 Feb 2003 19:24:33 +0000 Subject: handle RX not specified when RY is --- ChangeLog | 4 ++++ rsvg-shapes.c | 2 ++ rsvg.h | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index eae340f2..e08e5855 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-02-02 Dom Lachowicz + + * 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 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, -- cgit v1.2.1