[Freeciv-Dev] (PR#10172) flags in the gtk2 unit popup
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://RT::WebBaseURL.not.configured:80/Ticket/Display.html?id=10172 >
In the gtk2 unit popup the flags aren't drawn right. See the screenshot.
This patch fixes it. See
http://developer.gnome.org/doc/API/2.0/gdk-pixbuf/gdk-pixbuf-scaling.html#gdk-pixbuf-composite
to see why the "offset" parameters to the function don't do what you'd
expect. This won't work if canvas_put_sprite is given an
offset...fortunately it never is (and hopefully never will be).
jason
? freeciv.spec
? settler_recursion_crash
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.136
diff -u -r1.136 mapview.c
--- client/gui-gtk-2.0/mapview.c 15 Sep 2004 19:49:09 -0000 1.136
+++ client/gui-gtk-2.0/mapview.c 18 Sep 2004 01:11:49 -0000
@@ -675,12 +675,13 @@
src = sprite_get_pixbuf(sprite);
dst = pcanvas->v.pixbuf;
+ assert(offset_x == 0 && offset_y == 0);
gdk_pixbuf_composite(src, dst, canvas_x, canvas_y,
MIN(width,
MIN(gdk_pixbuf_get_width(dst), gdk_pixbuf_get_width(src))),
MIN(height,
MIN(gdk_pixbuf_get_height(dst), gdk_pixbuf_get_height(src))),
- -offset_x, -offset_y, 1.0, 1.0, GDK_INTERP_NEAREST, 255);
+ canvas_x, canvas_y, 1.0, 1.0, GDK_INTERP_NEAREST, 255);
}
break;
default:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#10172) flags in the gtk2 unit popup,
Jason Short via RT <=
|
|