Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] (PR#10476) bug when drawing city overlays
Home

[Freeciv-Dev] (PR#10476) bug when drawing city overlays

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#10476) bug when drawing city overlays
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 7 Oct 2004 22:32:27 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10476 >

This should fix the problem (as well as another similar stipple-origin
problem) for the gtk, gtk2, and xaw clients (only the gtk2 client is
tested).

jason

? 1
? 2
? newtiles
Index: client/gui-gtk/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/mapview.c,v
retrieving revision 1.232
diff -u -r1.232 mapview.c
--- client/gui-gtk/mapview.c    1 Oct 2004 17:40:28 -0000       1.232
+++ client/gui-gtk/mapview.c    8 Oct 2004 05:25:49 -0000
@@ -716,6 +716,7 @@
   gdk_gc_set_clip_mask(fill_tile_gc, psprite->mask);
   gdk_gc_set_foreground(fill_tile_gc, colors_standard[COLOR_STD_BLACK]);
   gdk_gc_set_stipple(fill_tile_gc, black50);
+  gdk_gc_set_ts_origin(fill_tile_gc, canvas_x, canvas_y);
 
   gdk_draw_rectangle(pcanvas->pixmap, fill_tile_gc, TRUE,
                     canvas_x, canvas_y, psprite->width, psprite->height);
@@ -814,6 +815,7 @@
     return;
   }
 
+  gdk_gc_set_ts_origin(fill_tile_gc, canvas_x, canvas_y);
   gdk_gc_set_foreground(fill_tile_gc, colors_standard[color]);
 
   if (is_isometric) {
Index: client/gui-gtk-2.0/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/mapview.c,v
retrieving revision 1.142
diff -u -r1.142 mapview.c
--- client/gui-gtk-2.0/mapview.c        1 Oct 2004 17:40:28 -0000       1.142
+++ client/gui-gtk-2.0/mapview.c        8 Oct 2004 05:25:49 -0000
@@ -775,6 +775,7 @@
   gdk_gc_set_clip_mask(fill_tile_gc, psprite->mask);
   gdk_gc_set_foreground(fill_tile_gc, colors_standard[COLOR_STD_BLACK]);
   gdk_gc_set_stipple(fill_tile_gc, black50);
+  gdk_gc_set_ts_origin(fill_tile_gc, canvas_x, canvas_y);
 
   gdk_draw_rectangle(pcanvas->v.pixmap, fill_tile_gc, TRUE,
                     canvas_x, canvas_y, psprite->width, psprite->height);
@@ -884,6 +885,7 @@
     return;
   }
 
+  gdk_gc_set_ts_origin(fill_tile_gc, canvas_x, canvas_y);
   gdk_gc_set_foreground(fill_tile_gc, colors_standard[color]);
 
   if (is_isometric) {
Index: client/gui-xaw/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/mapview.c,v
retrieving revision 1.182
diff -u -r1.182 mapview.c
--- client/gui-xaw/mapview.c    1 Oct 2004 17:40:28 -0000       1.182
+++ client/gui-xaw/mapview.c    8 Oct 2004 05:25:49 -0000
@@ -484,6 +484,7 @@
     XSetClipMask(display, fill_tile_gc, psprite->mask);
   }
   XSetStipple(display, fill_tile_gc, gray50);
+  XSetTSOrigin(display, fill_tile_gc, canvas_x, canvas_y);
   XSetForeground(display, fill_tile_gc, colors_standard[COLOR_STD_BLACK]);
 
   XFillRectangle(display, pcanvas->pixmap, fill_tile_gc,
@@ -811,6 +812,7 @@
     return;
   }
 
+  XSetTSOrigin(display, fill_tile_gc, canvas_x, canvas_y);
   XSetForeground(display, fill_tile_gc, colors_standard[color]);
   XFillRectangle(display, pcanvas->pixmap, fill_tile_gc,
                 canvas_x, canvas_y,

[Prev in Thread] Current Thread [Next in Thread]