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: undisclosed-recipients:;
Subject: [Freeciv-Dev] Re: (PR#3727) Rectangular selection with right-click-and-drag
From: "a-l@xxxxxxx" <a-l@xxxxxxx>
Date: Sun, 23 Mar 2003 06:19:51 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Fri, 21 Mar 2003 05:25:43 -0800
"rwetmore@xxxxxxxxxxxx" <rwetmore@xxxxxxxxxxxx> wrote:

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

Ok. But may I work with an unreal tile? I still need to use one tile
as anchor, because I want my rectangle bigger than the mapview.

If you think that's a horrible idea, there's no problem as it only
means the starting point of the rectangle would have to be real.

Irrespective of that, I would prefere rectangle able to encompass
real tiles displayed in-water with unreal ones. And I intend to do it
without using gui-specific line drawing.

So I want to change get_map_xy() and the corresponding
canvas_pos_to_map_pos() from "void" to "bool", like their reverse
functions, to check if a set of canvas coordinates visually represent
a real tile. It'd be a simple patch.

Currently, they just yield nearest_real_pos() and return nothing.


Arnstein


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



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