Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] Re: (PR#2509) unification of update_map_canvas
Home

[Freeciv-Dev] Re: (PR#2509) unification of update_map_canvas

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2509) unification of update_map_canvas
From: "Rafa³ Bursig via RT" <rt@xxxxxxxxxxxxxx>
Date: Sat, 7 Dec 2002 05:05:53 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Dnia 2002.12.07 04:06 Jason Short via RT napisa³(a):
> 
> This patch unifies update_map_canvas() over most GUIs.
> 
> This requires the creation of three new GUI functions: put_one_tile,
> put_one_tile_iso, and flush_mapcanvas:
> 
> * put_one_tile is a frontend for pixmap_put_tile in most GUIs.  It
> draws
> a single tile to the backing store in non-iso mode.
> 
> * put_one_tile_iso is similar to what was put_one_tile in most GUIs.
> The difference is it is given the canvas position rather than finding
> it
> itself.  It draws a single tile (or part of one) to the backing store
> in
> iso mode.  Note that the drawing systems of gui-win32 and gui-sdl may
> not be easily compatible with this system.
> 
> * flush_mapcanvas writes a rectangular portion of the backing store to
> the display.
> 
> This patch is not ready for inclusion: there is no SDL or MUI support,
> and win32 support is poor.  Win32 is the major problem here, since the
> current drawing system seems to depend on clever use of buffering
> instead of the partial-tile drawing that is used by gtk, gtk2, and
> mui.
> To fix this cleanly may mean providing support for both drawing
> systems
> (gui-sdl, by the way, also uses the clever buffering method) - but
> this
> may mean adding up to two new GUI functions.
> 
> The advantage of the patch is that it removes hundreds of lines of
> duplicate code.  In particular, the introduction of flush_mapcanvas
> will
> allow a lot of streamlining of the drawing process to get rid of
> spurious redraws.  And it another step toward minimizing the
> iso/non-iso
> differences in the GUI code.
> 
I don't like it. (This code extort on sdlclient whorse flush metod )
I prefer solution when "write_to_screen" go to 
put_one_tile/put_one_tile_iso parms. And each client make his own 
buffering method.

The additional advantage is that we can call 
put_one_tile/put_one_tile_iso directly from "refresh_tile_mapcanvas(int 
x, int y, bool write_to_screen)"

flush_mapcanvas(void) funct. shoult replace update_map_canvas_visible() 
in unqueue_mapview_update(void) and be defined in gui-side.

Rafal

----------------------------------------------------------------------
Portal INTERIA.PL zaprasza... >>> http://link.interia.pl/f167c 





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