[planner: 45/61] relation-arrow: Drop unused USE_AFFINE code




commit 2c0ce47ab0659a6240676d556e68737a6a946659
Author: Mart Raudsepp <leio gentoo org>
Date:   Fri Jan 1 20:13:53 2021 +0200

    relation-arrow: Drop unused USE_AFFINE code
    
    The GTK3 port of libgnomecanvas won't have gnome_canvas_item_i2c_affine,
    nor will we have libart_lgpl, so just drop the currently unused code paths.

 src/planner-relation-arrow.c | 25 -------------------------
 1 file changed, 25 deletions(-)
---
diff --git a/src/planner-relation-arrow.c b/src/planner-relation-arrow.c
index e035a239..e19f774d 100644
--- a/src/planner-relation-arrow.c
+++ b/src/planner-relation-arrow.c
@@ -29,8 +29,6 @@
 #include "planner-gantt-row.h"
 #include "planner-relation-arrow.h"
 
-#undef USE_AFFINE
-
 #define MIN_SPACING 4
 #define ARROW_SIZE 6
 
@@ -723,14 +721,9 @@ relation_arrow_draw (GnomeCanvasItem *item,
 {
        PlannerRelationArrow     *arrow;
        PlannerRelationArrowPriv *priv;
-#ifdef USE_AFFINE
-       gdouble                   i2c[6];
-       ArtPoint                  i1, i2, c1, c2;
-#else
        gdouble                   i2w_dx;
        gdouble                   i2w_dy;
        gdouble                   dx1, dy1, dx2, dy2;
-#endif
        gint                      cx1, cy1, cx2, cy2;
        GdkGC                    *gc;
        GdkPoint                  points[4];
@@ -752,24 +745,7 @@ relation_arrow_draw (GnomeCanvasItem *item,
        cx2 = 0;
        cy2 = 0;
 
-#ifdef USE_AFFINE
-       /* Get item area in canvas coordinates. */
-       gnome_canvas_item_i2c_affine (item, i2c);
-#endif
-
        for (i = 0; i < priv->num_points - 1; i++) {
-#ifdef USE_AFFINE
-               i1.x = priv->points[i].x;
-               i1.y = priv->points[i].y;
-               i2.x = priv->points[i+1].x;
-               i2.y = priv->points[i+1].y;
-               art_affine_point (&c1, &i1, i2c);
-               art_affine_point (&c2, &i2, i2c);
-               cx1 = floor (c1.x + 0.5) - x;
-               cy1 = floor (c1.y + 0.5) - y;
-               cx2 = floor (c2.x + 0.5) - x;
-               cy2 = floor (c2.y + 0.5) - y;
-#else
                i2w_dx = 0.0;
                i2w_dy = 0.0;
                gnome_canvas_item_i2w (item, &i2w_dx, &i2w_dy);
@@ -795,7 +771,6 @@ relation_arrow_draw (GnomeCanvasItem *item,
                cy1 -= y;
                cx2 -= x;
                cy2 -= y;
-#endif
 
                gdk_draw_line (drawable,
                               gc,


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