]> granicus.if.org Git - graphviz/commitdiff
remove commented out code in gcanvas
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 5 May 2021 03:07:33 +0000 (20:07 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 12 May 2021 01:46:36 +0000 (18:46 -0700)
cmd/lefty/ws/gtk/gcanvas.c

index 5c1bdcbc63716ab5dc8a77aeaeb008d06cdcd3a5..52bd99e6ef021dd60ebdce892768aabfc78f5bf5 100644 (file)
@@ -196,9 +196,6 @@ int GCcreatewidget(Gwidget_t * parent, Gwidget_t * widget,
        WCU->colors[i].inuse = FALSE;
 
     WCU->gattr.color = 1;
-/*     gdk_gc_set_background(GC, widget->w->style->white_gc);
-       gdk_gc_set_foreground(GC, widget->w->style->black_gc);
-*/
 
     WCU->gattr.width = 0;
     WCU->gattr.mode = 0;
@@ -346,8 +343,6 @@ int GCgetwidgetattr(Gwidget_t * widget, int attrn, Gwattr_t * attrp)
            attrp[ai].u.i = width;
            break;
        case G_ATTRCURSOR:
-/*                             attrp[ai].u.t = (curcursori == -1) ? "default" : cursormap[curcursori].name;
-*/
            attrp[ai].u.t = (curcursori == -1) ? "default" : "watch";
            break;
        case G_ATTRCOLOR:
@@ -456,10 +451,6 @@ int GCline(Gwidget_t * widget, Gpoint_t gp1, Gpoint_t gp2, Ggattr_t * ap)
     else
        gr.o.y = gp2.y, gr.c.y = gp1.y;
 
-/*     if(!ISVISIBLE(gr))
-               return 1;
-*/
-
     pp1 = pdrawtopix(widget, gp1), pp2 = pdrawtopix(widget, gp2);
     setgattr(widget, ap);
     gdk_draw_line(widget->w->window, GC, pp1.x, pp1.y, pp2.x, pp2.y);
@@ -476,9 +467,6 @@ int GCbox(Gwidget_t * widget, Grect_t gr, Ggattr_t * ap)
        p.x = gr.o.x, gr.o.x = gr.c.x, gr.c.x = p.x;
     if (gr.o.y > gr.c.y)
        p.y = gr.o.y, gr.o.y = gr.c.y, gr.c.y = p.y;
-/*     if(!ISVISIBLE(gr))
-               return 1;
-*/
 
     pr = rdrawtopix(widget, gr);
     setgattr(widget, ap);
@@ -510,9 +498,6 @@ int GCpolygon(Gwidget_t * widget, int gpn, Gpoint_t * gpp, Ggattr_t * ap)
        gr.c.x = min(gr.c.x, gpp[i].x);
        gr.c.y = min(gr.c.y, gpp[i].y);
     }
-/*     if(!ISVISIBLE(gr))
-               return 1;
-*/
     if (gpn + 1 > Gppn) {
        n = (((gpn + 1) + PPINCR - 1) / PPINCR) * PPINCR;
        Gppp = Marraygrow(Gppp, (long) n * PPSIZE);
@@ -624,9 +609,6 @@ int GCarc(Gwidget_t * widget, Gpoint_t gc, Gsize_t gs, double ang1,
 
     gr.o.x = gc.x - gs.x, gr.o.y = gc.y - gs.y;
     gr.c.x = gc.x + gs.x, gr.c.y = gc.y + gs.y;
-/*     if(!ISVISIBLE(gr))
-               return 1;
-*/
 
     pc = pdrawtopix(widget, gc), ps = sdrawtopix(widget, gs);
     setgattr(widget, ap);
@@ -732,10 +714,6 @@ int GCtext(Gwidget_t * widget, Gtextline_t * tlp, int n, Gpoint_t go,
     pr.c.x = po.x + w / 2, pr.c.y = po.y + h;
     gr = rpixtodraw(widget, pr);
 
-/*     if(!ISVISIBLE(gr))
-               return 1;
-*/
-
     for (i = 0; i < n; i++) {
        switch (tlp[i].j) {
        case 'l':
@@ -1006,32 +984,11 @@ static void setgattr(Gwidget_t * widget, Ggattr_t * ap)
     if (color != WCU->gattr.color) {
 
        WCU->gattr.color = color;
-       /*if (ap->mode == GDK_XOR) {
-          gdk_gc_set_foreground (GC, widget->w->style->white_gc);
-          }
-          else {
-        */
        gdk_gc_set_foreground(GC, &WCU->colors[WCU->gattr.color].color);
-       /* } */
-
-/*         if (Gdepth == 1) {
-               cp = &WCU->colors[color].color;
-               intens = (0.3 * cp->blue + 0.59 * cp->red +
-                               0.11 * cp->green) / 65535.0;
-               pati = (intens <= 0.0625) ? 16 :
-                           -16.0 * (log (intens) / 2.7725887222);
-               XSetTile (Gdisplay, GC, WCU->grays[pati]);
-            }
-*/
     }
     mode = ap->mode;
     if (mode != WCU->gattr.mode) {
        WCU->gattr.mode = mode;
-/*         XSetFunction (Gdisplay, GC, WCU->gattr.mode);
-           if (mode == GDK_XOR)
-               gdk_gc_set_foreground (GC, &WCU->colors[0].color);
-            else
-*/
        gdk_gc_set_foreground(GC, &WCU->colors[WCU->gattr.color].color);
     }
     width = ap->width;