diff options
author | Robert Staudinger <robsta@src.gnome.org> | 2006-02-05 09:03:18 +0000 |
---|---|---|
committer | Robert Staudinger <robsta@src.gnome.org> | 2006-02-05 09:03:18 +0000 |
commit | 5dde093dd8fb17419e77a4a266858c243951791b (patch) | |
tree | f79c8cf44a145719754acce23aa8025da8be7226 | |
parent | 482084be9599383b296c579c4286aafa671f736c (diff) | |
download | librsvg-5dde093dd8fb17419e77a4a266858c243951791b.tar.gz |
add props "width", "height", "em", "ex" (all read only)
* rsvg-gobject.c: add props "width", "height", "em", "ex" (all read only)
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | rsvg-gobject.c | 30 |
2 files changed, 27 insertions, 5 deletions
@@ -1,6 +1,6 @@ 2006-02-04 Rob Staudinger <robert.staudinger@gmail.com> - * rsvg-gobject.c: add props "width", "height" (read only) + * rsvg-gobject.c: add props "width", "height", "em", "ex" (all read only) * rsvg.h: fix doc after cairo rendering renaming 2006-02-04 Dom Lachowicz <cinamod@hotmail.com> diff --git a/rsvg-gobject.c b/rsvg-gobject.c index 635b7f93..b2b44108 100644 --- a/rsvg-gobject.c +++ b/rsvg-gobject.c @@ -30,6 +30,8 @@ enum { PROP_BASE_URI, PROP_WIDTH, PROP_HEIGHT, + PROP_EM, + PROP_EX, PROP_TITLE, PROP_DESC, PROP_METADATA, @@ -164,6 +166,14 @@ get_property (GObject *instance, rsvg_handle_get_dimensions (self, &dim); g_value_set_int (value, dim.height); break; + case PROP_EM: + rsvg_handle_get_dimensions (self, &dim); + g_value_set_double (value, dim.em); + break; + case PROP_EX: + rsvg_handle_get_dimensions (self, &dim); + g_value_set_double (value, dim.ex); + break; case PROP_TITLE: g_value_set_string (value, rsvg_handle_get_title (self)); break; @@ -213,18 +223,30 @@ class_init (RsvgHandleClass *klass) (GParamFlags)(G_PARAM_READWRITE | G_PARAM_CONSTRUCT))); g_object_class_install_property (gobject_class, - PROP_DPI_Y, - g_param_spec_double ("width", _("Image width"), + PROP_WIDTH, + g_param_spec_int ("width", _("Image width"), _("Image width"), 0, G_MAXINT, 0, (GParamFlags)(G_PARAM_READABLE))); g_object_class_install_property (gobject_class, - PROP_DPI_Y, - g_param_spec_double ("height", _("Image height"), + PROP_HEIGHT, + g_param_spec_int ("height", _("Image height"), _("Image height"), 0, G_MAXINT, 0, (GParamFlags)(G_PARAM_READABLE))); g_object_class_install_property (gobject_class, + PROP_EM, + g_param_spec_double ("em", _("em"), + _("em"), 0, G_MAXDOUBLE, 0, + (GParamFlags)(G_PARAM_READABLE))); + + g_object_class_install_property (gobject_class, + PROP_EX, + g_param_spec_double ("ex", _("ex"), + _("ex"), 0, G_MAXDOUBLE, 0, + (GParamFlags)(G_PARAM_READABLE))); + + g_object_class_install_property (gobject_class, PROP_TITLE, g_param_spec_string ("title", _("Title"), _("SVG file title"), NULL, |