Commit 260693a3 authored by Dom Lachowicz's avatar Dom Lachowicz

fix bug #131644

parent cfe82bf5
2004-01-15 Dom Lachowicz <cinamod@hotmail.com>
* rsvg-css.c:
* test-rsvg.c: Fix bug #131644
2004-01-12 Dom Lachowicz <cinamod@hotmail.com>
* rsvg-shapes.c: Fix bug #124075
......
......@@ -567,19 +567,19 @@ rsvg_css_parse_angle (const char * str)
double
rsvg_css_parse_frequency (const char * str)
{
double hz;
double f_hz;
char *end_ptr;
hz = g_ascii_strtod (str, &end_ptr);
f_hz = g_ascii_strtod (str, &end_ptr);
/* todo: error condition - figure out how to best represent it */
if ((hz == -HUGE_VAL || hz == HUGE_VAL) && (ERANGE == errno))
if ((f_hz == -HUGE_VAL || f_hz == HUGE_VAL) && (ERANGE == errno))
return 0.0;
if (end_ptr && !strcmp(end_ptr, "kHz"))
return hz * 1000.;
return f_hz * 1000.;
return hz;
return f_hz;
}
/*
......
......@@ -46,14 +46,14 @@ main (int argc, const char **argv)
char * format = "png";
struct poptOption options_table[] = {
{ "dpi" , 'd', POPT_ARG_DOUBLE, &dpi, 0, "pixels per inch", "<float>"},
{ "x-zoom", 'x', POPT_ARG_DOUBLE, &x_zoom, 0, "x zoom factor", "<float>" },
{ "y-zoom", 'y', POPT_ARG_DOUBLE, &y_zoom, 0, "y zoom factor", "<float>" },
{ "width", 'w', POPT_ARG_INT, &width, 0, "width", "<int>" },
{ "height", 'h', POPT_ARG_INT, &height, 0, "height", "<int>" },
{ "quality", 'q', POPT_ARG_INT, &quality, 0, "JPEG quality", "<int>"},
{ "format", 'f', POPT_ARG_STRING, &format, 0, "save format", "[png, jpeg]"},
{ "version", 'v', POPT_ARG_NONE, &bVersion, 0, "show version information", NULL },
{ "dpi" , 'd', POPT_ARG_DOUBLE, NULL, 0, "pixels per inch", "<float>"},
{ "x-zoom", 'x', POPT_ARG_DOUBLE, NULL, 0, "x zoom factor", "<float>" },
{ "y-zoom", 'y', POPT_ARG_DOUBLE, NULL, 0, "y zoom factor", "<float>" },
{ "width", 'w', POPT_ARG_INT, NULL, 0, "width", "<int>" },
{ "height", 'h', POPT_ARG_INT, NULL, 0, "height", "<int>" },
{ "quality", 'q', POPT_ARG_INT, NULL, 0, "JPEG quality", "<int>"},
{ "format", 'f', POPT_ARG_STRING, NULL, 0, "save format", "[png, jpeg]"},
{ "version", 'v', POPT_ARG_NONE, NULL, 0, "show version information", NULL },
POPT_AUTOHELP
POPT_TABLEEND
};
......@@ -62,6 +62,15 @@ main (int argc, const char **argv)
gint n_args = 0;
GdkPixbuf *pixbuf;
options_table[0].arg = &dpi;
options_table[1].arg = &x_zoom;
options_table[2].arg = &y_zoom;
options_table[3].arg = &width;
options_table[4].arg = &height;
options_table[5].arg = &quality;
options_table[6].arg = &format;
options_table[7].arg = &bVersion;
popt_context = poptGetContext ("rsvg", argc, argv, options_table, 0);
poptSetOtherOptionHelp(popt_context, "[OPTIONS...] file.svg file.png");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment