From pierre@audiovu.com Tue May 2 14:29:50 2000 Return-Path: Received: from mgate.uni-hannover.de by hgeo02.geog.uni-hannover.de (SMI-8.6/SMI-SVR4) id OAA04674; Tue, 2 May 2000 14:29:50 +0100 Received: from postfix1.free.fr by mgate.uni-hannover.de (PP) with SMTP; Tue, 2 May 2000 14:35:02 +0200 Received: from saturne.audiovu.com (strasbourg-23-128.dial.proxad.net [213.228.23.128]) by postfix1.free.fr (Postfix) with ESMTP id 4371C28208 for ; Tue, 2 May 2000 14:34:43 +0200 (MEST) Received: from localhost (localhost [[UNIX: localhost]]) by saturne.audiovu.com (8.9.3/8.8.7) id OAA24944 for neteler@geog.uni-hannover.de; Tue, 2 May 2000 14:35:14 +0200 From: Pierre de Mouveaux Reply-To: pmx@audiovu.com To: Markus Neteler Subject: Layered Xdriver Date: Tue, 2 May 2000 13:15:22 +0200 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <00050214130500.24798@saturne.audiovu.com> Content-Transfer-Encoding: quoted-printable Sender: pierre@audiovu.com Status: RO X-Status: A Content-Length: 3955 Lines: 127 Hello Markus, Following the "display=3Dx1" option, I have built a quite functionnal - b= ut unfinished - layered X11 driver. What you get: ---------- Many layers. Compatible with the frames system. Choose layer. Erase layer. Show/hide layers. Refresh screen. Show all visible layers (not marked as hidden) and shows all layers (even marked hidden). All drawings done off-screen, through a "scratch layer", with generated l= ayers masks (transparencies). No flicker when combining layers. A "by-default" unsaved screen layer, compatible with the on-screen tools = like d.rhumbline, or d.zoom. A "d.layers" module, to control the screen in the "Grass way" ;) What you don't get YET: ----------------- Orgering of layers. Creation / destruction of layers (fix number). This i= s a limitation that will be removed very soon, the internals are already ther= e (from the beginning), but I can't debug anything, and I concentrate on the X11 = stuff. Removal of the pinternal infos when removing a single layer (d.what.rast = will still query by default the removed map). This needs a modification of man= y internal stuff, that needs to be done carrefully in order not to break ex= isting code. Clean libraries extensions. Drawbacks and Notes: ---------------- The d.xxx modules needs some slight updates. In essence, a "BeginDrawing"= and an "EndDrawing" call. Will be put into a light extension of the display l= ib. At this time, I do it "by hand" in the modules (i.e. talk to the driver dire= ctly. These call will be cleanely embeded in the libraries). NOTE: modules like d.zoom that draw non-permanent infos onscreen don't ne= ed to be updated, and are handled automatically. I only modified d.rast, d.vect and d.erase. (d.erase internals proved to = be unconsistant withe the grass libraries. When you dig in Grass, you someti= mes find funny things...) Maybe other modules will need carrefull attention, as the notion of "eras= ing" in grass is "fill this rectangle with black (or other) color" (A liberal= amount of these calls can be found buried deep into the grass libraries code ...= ) But in a multilayered display system, "erase" means "make transparent". A= t the moment, I feel I have been able to handle it gracefully, even the "backgr= ound color" option of d.erase. The "pads", that holds the infos burried into the driver (name of map dis= played, or the region displayed, used by d.what.rast) needs updates, to add the n= otion of layering. This must be done wile keeping backward compatibility. The drivers calls have been augmented (about 10 new **internal** driver functions, developers won't use them). The standard X11 driver will be up= dated to gracefully ignore these calls. Finally, the X driver on wich this layered driver is based, has a VERY ba= d behaviour regarding X events. It will need a complete update to get local= popup menus into the window (Show/hide layers menu, for instance.) Not so easy,= as the standard Grass mouse handling in the driver will also need to be rewritte= n. Current status: ---------- Well, as far as I'm concerned, it works ;).=20 Again, as there are many (small) modifications of the internals of Grass,= I want to be sure it works. Then, I will send an update. If you want to test, I will send you a (large!) patch file. Please, **don= 't put in CVS**. I won't be OK to debug an unfinished release. In no way. All the modifications I've done in Grass since one month are a quite big amount of work, although I work quite fast. But I don't want to loose tim= e to "fix problems" that for me are only perfectly planned future steps.=20 Layered X11 driver and free access to every window (with the "device=3D" = option) opens the road for a big evolution in the Grass display usage. I personal= ly think it's a necessity. When we will get a "display command history" in an usable form (d.save is= not a good tool), things will be even much better. Bye, Pierre.