[Freeciv-Dev] Re: [FreeCiv-Cvs] vas: (PR#8427): show units immediately a
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] Re: [FreeCiv-Cvs] vas: (PR#8427): show units immediately after the uni... |
From: |
"Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx> |
Date: |
Wed, 31 Mar 2004 08:37:58 -0800 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8427 >
When I use this popup I get the following:
(civclient:13672): GdkPixbuf-CRITICAL **: file gdk-pixbuf-scale.c: line
120 (gdk_pixbuf_composite): assertion `dest_x >= 0 && dest_x +
dest_width <= dest->width' failed
and lots of little dots show up on the image.
I believe part of the problem is the width and height aren't clipped as
they are in pixmap_put_sprite():
gdk_draw_drawable(pixmap, civ_gc, ssprite->pixmap,
offset_x, offset_y,
pixmap_x + offset_x, pixmap_y + offset_y,
MIN(width, MAX(0, ssprite->width - offset_x)),
MIN(height, MAX(0, ssprite->height - offset_y)));
With this patch the error messages stay but the little dots go away.
P.S. Are you sure gdk_pixbuf_composite() is the right function here?
jason
freeciv@xxxxxxxxxxxxxxxxxxx wrote:
> This is an automated notification of a change to freeciv cvs,
> on Wed Mar 31 07:09:09 PST 2004 = Wed Mar 31 15:09:09 2004 (GMT)
> by Vasco Alexandre da Silva Costa <vasc@xxxxxxxxxxxxxxx>
>
> ---- Files affected:
>
> freeciv/client mapctrl_common.c mapctrl_common.h
> freeciv/client/gui-gtk dialogs.c
> freeciv/client/gui-win32 dialogs.c
> freeciv/client/gui-xaw dialogs.c
>
> ---- Log message:
> Tag: HEAD
>
> (PR#8427): show units immediately after the unit they are transported by.
>
> Patch by Jason Dorje Short <jdorje@xxxxxxxxxxxxxxxxxxxxx>.
>
>
? cma_weirdness
? data/civ3
? data/womoks
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.111
diff -u -r1.111 mapview.c
--- client/gui-gtk-2.0/mapview.c 31 Mar 2004 15:05:30 -0000 1.111
+++ client/gui-gtk-2.0/mapview.c 31 Mar 2004 16:37:11 -0000
@@ -735,6 +735,9 @@
struct Sprite *sprite,
int offset_x, int offset_y, int width, int height)
{
+ width = MIN(width, MAX(0, sprite->width - offset_x));
+ height = MIN(height, MAX(0, sprite->height - offset_y));
+
switch (pcanvas->type) {
case CANVAS_PIXMAP:
pixmap_put_sprite(pcanvas->v.pixmap, canvas_x, canvas_y,
|
|