]> granicus.if.org Git - graphviz/commitdiff
smyrna: abbreviate some accumulations
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 14 Jan 2023 05:22:16 +0000 (21:22 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 15 Jan 2023 16:59:31 +0000 (08:59 -0800)
cmd/smyrna/draw.c

index 59386b7ed78e399156d716abc17a7f57b8b63c78..0a7baaaa7bfa633d05aeed57adb8cc48b2b428fa 100644 (file)
@@ -123,7 +123,7 @@ static void DrawBeziers(sdot_op* o, int param)
     int filled;
     xdot_op *  op=&o->op;
     xdot_point* ps = op->u.bezier.pts;
-    view->Topview->global_z = view->Topview->global_z + o->layer*LAYER_DIFF;
+    view->Topview->global_z += o->layer * LAYER_DIFF;
 
     if (op->kind == xd_filled_bezier)
        filled = 1;
@@ -145,7 +145,7 @@ static void DrawEllipse(sdot_op*  o, int param)
     int i = 0;
     int filled;
     xdot_op * op=&o->op;
-    view->Topview->global_z=view->Topview->global_z+o->layer*LAYER_DIFF;
+    view->Topview->global_z += o->layer * LAYER_DIFF;
     set_options(param);
     x = op->u.ellipse.x - dx;
     y = op->u.ellipse.y - dy;
@@ -189,7 +189,7 @@ static void DrawEllipse(sdot_op*  o, int param)
 static void DrawPolygon(sdot_op * o, int param)
 {
     xdot_op *  op=&o->op;
-    view->Topview->global_z=view->Topview->global_z+o->layer*LAYER_DIFF;
+    view->Topview->global_z += o->layer * LAYER_DIFF;
 
     set_options(param);
 
@@ -219,7 +219,7 @@ static void DrawPolygon(sdot_op * o, int param)
 static void DrawPolyline(sdot_op* o, int param)
 {
     xdot_op * op=&o->op;
-    view->Topview->global_z=view->Topview->global_z+o->layer*LAYER_DIFF;
+    view->Topview->global_z += o->layer * LAYER_DIFF;
 
     if (param == 0)
        glColor4f(view->penColor.R, view->penColor.G, view->penColor.B,
@@ -339,7 +339,7 @@ static void EmbedText(sdot_op* o, int param)
 
        GLfloat x,y;
        glColor4f(view->penColor.R,view->penColor.G,view->penColor.B,view->penColor.A);
-       view->Topview->global_z=view->Topview->global_z+o->layer*LAYER_DIFF+0.05;
+       view->Topview->global_z += o->layer * LAYER_DIFF + 0.05;
        switch (o->op.u.text.align)
        {
                case xd_left: