Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: zoom
Home

[Freeciv-Dev] Re: zoom

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <rf13@xxxxxxxxxxxxxxxxxxxxxx>
Cc: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: zoom
From: Karl-Ingo Friese <kif@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 29 Oct 2001 13:56:11 +0100 (CET)

On Mon, 29 Oct 2001, Raimar Falke wrote:

> How many zoom levels are this? How many sprites? Do you use a gdk/gtk
> method or a selfmade?

I use gtk_scale_sprite - the same I used when scaling the flag sprites
for the players report. So its "selfmade" ;)

At initializing time, scaled tiles/unit/city/etc-sprites are created
for all zooom levels. Currently this is handled by a define which sets
the minimum tilewidth, for example 15. Lets assume tileset is trident
(30x30), then 15 zoomn levels will be calculated (29x29, 28x28, ...
15 x 15).

After that, all that is needed to actualy zoom is to exchange pointers,
change a few variables and redraw map. Zooming itself is pretty smooth.
Initialization takes a few seconds.

Ingo

-- 

Karl-Ingo Friese
kif@xxxxxxxxxxxxxxxxxxxxxxxxxx



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