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: <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Cc: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: zoom
From: Karl-Ingo Friese <kif@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 30 Oct 2001 10:36:09 +0100 (CET)

On Mon, 29 Oct 2001, Jason Dorje Short wrote:

> > After that, the zoom itself is smooth.
> >
> > Download teamciv and try for yourself ;)
>
> I must say, that is pretty sweet.

Why, thank you.

> A couple ideas:
>
> - You should be able to zoom in as well as zoom out from the original
> size.

Yes. I had that before. But there was a major graphical glitch when
zooming in (resulting in large gaps between the tile sprites) which
I could not find after a couple of hours. So I went for the easiest
solution for now - and disabled it. But I will have a look at it
again.

> - When zooming, it would be nice for the zoom to occur around the center
> of the screen rather than keeping the same map_view_x0, map_view_y0.
> That is, at the start of do_scale you should have:

True. IMHO the "best" way would be that zooming in would focus on
the centered tile. The only problem is that this does not work because
the tilewidth changes after zoom. The result is that zooming with
focus on the center will look exteremely jumpy. The best solution would
be if there was a way to guarantee a map redraw where a specific pixel
in the middle will be exactly the same as before (only in the scaled
position). But thats tricky.

> overview is always aligned to the nearest tile, zooming around a tile
> other than map_view_x0, map_view_y0 gives very ugly results.  Oh well.

Yes :(

> - Scaling the pixmaps when you first try to zoom is questionable.  At

For sure. This was just the most easy way to implement it at first time.
A better solution needs to be found. Like a menue item: "enable zoom"
which starts the initializing and enables +/-.

> do the scaling (GTK can use threads, I'm told).  OTOH, if you never use

Threads. Now _that_ sounds interesting. Could anyone (Vasco ?) give
me a hint how to use them (at least where to start reading) ? I never
worked with threads, but am very willing to try them out.

Ingo

-- 

Karl-Ingo Friese
kif@xxxxxxxxxxxxxxxxxxxxxxxxxx



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