Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2004:
[Freeciv-Dev] Re: [FreeCiv-Cvs] vas: (PR#8427): show units immediately a
Home

[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: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [FreeCiv-Cvs] vas: (PR#8427): show units immediately after the uni...
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Wed, 31 Mar 2004 10:55:42 -0800
Reply-to: rt@xxxxxxxxxxx

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

On Wed, 31 Mar 2004, Jason Short wrote:

>
> <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.

Turns out the problem was due to the offset being negative. It seems to
be fixed now. I also added some clipping to silence the asserts which
seems to be ok.

> P.S.  Are you sure gdk_pixbuf_composite() is the right function here?

gdk_pixbuf_composite is for overlaying GdkPixbufs on GdkPixbuf, which is
the case.

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa




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