[librsvg] rsvg-filter.c: "azimuth", "elevation", "limitingConeAngle" are numbers, not angles



commit fe148d81bd76d3df79017108cef33a1303ad2981
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Mar 23 11:04:32 2017 -0600

    rsvg-filter.c: "azimuth", "elevation", "limitingConeAngle" are numbers, not angles
    
    Per the spec, these attributes specity plain numbers, which are
    interpreted as degrees.  They are not CSS/SVG angle values with
    deg/rad/grad units.

 rsvg-filter.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/rsvg-filter.c b/rsvg-filter.c
index 4c6fc9a..a4623ef 100644
--- a/rsvg-filter.c
+++ b/rsvg-filter.c
@@ -4361,11 +4361,11 @@ rsvg_node_light_source_set_atts (RsvgNode *node, gpointer impl, RsvgHandle *hand
     const char *value;
 
     if ((value = rsvg_property_bag_lookup (atts, "azimuth")))
-        data->azimuth = rsvg_css_parse_angle (value) / 180.0 * M_PI;
+        data->azimuth = g_ascii_strtod (value, NULL) / 180.0 * M_PI;
     if ((value = rsvg_property_bag_lookup (atts, "elevation")))
-        data->elevation = rsvg_css_parse_angle (value) / 180.0 * M_PI;
+        data->elevation = g_ascii_strtod (value, NULL) / 180.0 * M_PI;
     if ((value = rsvg_property_bag_lookup (atts, "limitingConeAngle")))
-        data->limitingconeAngle = rsvg_css_parse_angle (value) / 180.0 * M_PI;
+        data->limitingconeAngle = g_ascii_strtod (value, NULL) / 180.0 * M_PI;
     if ((value = rsvg_property_bag_lookup (atts, "x")))
         data->x = data->pointsAtX = rsvg_length_parse (value, LENGTH_DIR_HORIZONTAL);
     if ((value = rsvg_property_bag_lookup (atts, "y")))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]