Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2004:
[Freeciv-Dev] (PR#4004) A canvas_iterate macro for mapview
Home

[Freeciv-Dev] (PR#4004) A canvas_iterate macro for mapview

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#4004) A canvas_iterate macro for mapview
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 21 Apr 2004 15:38:27 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=4004 >

> [glip - Thu Apr 17 18:28:06 2003]:

> I drew a couple of iso example on a piece of paper and I think that
> "catching all tiles that overlap" can produce rather strange shapes.  I
> think "all tiles whose centers are in the rectangle" is both nicer 
> visually and easier to implement.

If we consider iso tiles as actual diamond shapes then we'll get weird
shapes.  But if we consider them as rectangles we don't have this
problem.  (Note that the tiles aren't really diamonds anyway; unit
sprites can be pretty much any shape they want.)

However we do need to concern ourselves with the different parts of the
rectangles (non-iso view has 1 part, iso-view has 6 parts - each part is
itself a rectangle).  If any part of the tile covers the GUI rectangle
we're iterating over, we need to include that tile in the iteration
(consider if the iteration is used for update_map_canvas, for instance).

jason



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