Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2004:
[Freeciv-Dev] (PR#8360) semi-visible areas of the canvas
Home

[Freeciv-Dev] (PR#8360) semi-visible areas of the canvas

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#8360) semi-visible areas of the canvas
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 24 Mar 2004 12:30:42 -0800
Reply-to: rt@xxxxxxxxxxx

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

In gui-sdl (and, I think, gui-fs) there are some parts of the canvas 
rectangle that are partially visible.  For instance in gui-sdl some 
widgets (like the overview) are displayed directly on top of the 
mapview, with partial transparency.

For tiles underneath this region tile_visible_mapcanvas should return 
TRUE, but tile_visible_and_not_on_border_mapcanvas should return FALSE. 
  In other words we need some extra handling in 
tile_visible_and_not_on_border_mapcanvas to handle it.

There are two possible ways to do this:

1.  Add a new GUI function.  After 
tile_visible_and_not_on_border_mapcanvas is called this function will be 
called, and it's return value will be returned.

2.  Let the GUI specify "concealed rectangles" of the mapview.  For 
instance the GUI would call

   mapview_set_hidden_rect(x, y, w, h);

for each rectangle [x,x+w) * [y,y+h) that is concealed in this way. 
tile_visible_and_not_on_border_mapcanvas will then iterate over the list 
of such rectangles and return FALSE for any tile that is partially 
concealed by one.  A second function mapview_clear_hidden_rects() will 
be needed as well.


In both cases there will be major problems if any part of the center 
tile is ever hidden.

jason




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#8360) semi-visible areas of the canvas, Jason Short <=