]> granicus.if.org Git - graphviz/commitdiff
core plugin svg_rgradstyle: treat 'angle' as a double instead of a float
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 7 Mar 2022 04:44:58 +0000 (20:44 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 12 Mar 2022 18:54:29 +0000 (10:54 -0800)
This is consistent with how `angle` is derived from `gradient_angle` elsewhere
in this plugin and it squashes a -Wconversion warning.

plugin/core/gvrender_core_svg.c

index f02770a27dac0b1ffe498d66372cf8a85025f90f..5ffed5ad86d0a5b90f6e9f306297851f51e29e5c 100644 (file)
@@ -543,13 +543,12 @@ static int svg_gradstyle(GVJ_t * job, pointf * A, int n)
  */
 static int svg_rgradstyle(GVJ_t * job)
 {
-    float angle;
     int ifx, ify;
     static int rgradId;
     int id = rgradId++;
 
     obj_state_t *obj = job->obj;
-    angle = obj->gradient_angle * M_PI / 180;  //angle of gradient line
+    double angle = obj->gradient_angle * M_PI / 180;   //angle of gradient line
     if (angle == 0.) {
        ifx = ify = 50;
     } else {