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: "Mike Kaufman" <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 20 Mar 2003 10:58:20 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Thu, Mar 20, 2003 at 10:43:32AM -0800, Jason Short wrote:
> I'm not sure, but I don't think this will always work.
> 
> One pathological case is where the rectangle covers the entire map with 
> the current topology.  Now we'll end up with what should be a huge 
> rectangle but we'll think it is a tiny rectangle.
> 
>    map.xsize = 80
>    map.ysize = 50
>    (x0,y0,w,h) = (5, 0, 81, 50)
>    (x0,y0,x1,y1) = (5,0,6,50)
> 
> I think this can happen even in reasonable conditions with a wrapping 
> isometric map.  Here you can wrap around and get a situation like above 
> even without having a huge rectangle.
> 
> None of this will be a problem as long as the mapview doesn't scroll and 
> all positions are visible on the mapview.  But this isn't the case...

hmm, well you're welcome to try this yourself. This is 'production' code in
the 1.14.0 civworld patch. But as of now, civworld doesn't allow you to
scroll dragging your rectangle along with it. It would be nice to have such
an ability.

> I think the best solution is to track width and height rather than 
> last_x and last_y.

perhaps.

-mike



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