Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2003:
[Freeciv-Dev] Re: (PR#3727) Rectangular selection with right-click-and-d
Home

[Freeciv-Dev] Re: (PR#3727) Rectangular selection with right-click-and-d

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: a-l@xxxxxxx
Subject: [Freeciv-Dev] Re: (PR#3727) Rectangular selection with right-click-and-drag
From: "rwetmore@xxxxxxxxxxxx" <rwetmore@xxxxxxxxxxxx>
Date: Fri, 21 Mar 2003 05:25:43 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Jason is correct.

Under the current regime, passing unnormalized map coordinates or
working with them is verboten, even if it makes the task impossibly
complex.

But you really do not want a rectangle in map coordinates here,
rather one in the GUI window the user sees. Iterating over GUI
coordinates with a transformation to map coordinates anytime you
need map values will guarantee you the correct GUI rectangle
without worrying about any topology issues other than understanding
when a GUI position is flagged unreal by the transformation, i.e.
is a black tile.

Something like the city_map_checked_iterate macro that combines
GUI iteration with map transformation and realness checks might
prove useful for many GUI operations of this type.

A key advantage to doing this would stop people from rolling their
own private versions. It would also make it easier for others to
code such operations without the need to fully understand the
topology issues packaged in the iterator layer, and without having
them explicitly coded into GUI functions.

Cheers,
RossW
=====

Jason Short wrote:
> a-l@xxxxxxx wrote:
> 
>>Parent: (PR#3529) Map Control patch
[...]
> It should eventually be possible for the rectangle to turn out 
> rectangular in iso-view as well.  To make this change easier, I think 
> update_rectangle should take the *canvas* coordinates of the mouse, not 
> the tile coordinates.  In fact, I think if you do everything in canvas 
> coordinates all of the wrapping issues will end up being much easier.
> -----
[...]
> jason




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