Hi there.
Reposting for wider input with further comments based on more testing.
Below is a list of problems I had with the Win32 version of "i.points",
using the native XDriver rather than X11.
Has anyone noted similar problems with "i.points" under Unix?
Cheers
Mike Thomas
----- Original Message -----
From: "Mike Thomas" <miketh@brisbane.paradigmgeo.com>
To: <wingrass@grass.itc.it>
Sent: Thursday, December 06, 2001 3:39 PM
Subject: [winGRASS] XGetImage/XPutImage in libG11.
Hi all.
I have just checked into CVS some new work on the XPut/GetImage() problem
for libG11, which is designed to support the Panel save and restore code
used extensively in, for example, "i.points".Panel save and restore don't work yet, although the program no longer
crashes as it did when XGetImage() returned NULL.Outstanding bugs can be seen by running "i.points" and
1. Watching the twin horizontal lines across the center of the monitor,
which on my computer at least, end up displaced upwards by a small amount
after the panel is replaced.
One pixel to be precise.
2. Using the zoom/point menu, which seems to cause random images to appear
when the panel is restored - sometimes black, sometimes fragments of the
image.3. Looking at the code for XPutImage() in "xlib.c", the call to
SetDIBitsToDevice{} needs the source "y" value set to the top left rather
than the bottom left corner of the incoming image in order to get some
semblance of the saved panel to reappear - otherwise, if set to "sy +
height -1" as it used to be, rather than "sy" as currently checked in, you
get a white background (possibly a refresh problem?).
Actually, the white background is just the leftovers of the menu - ignore
this theory about refresh.
4. Resizing the XDriver during "i.points" hangs both the display and the
Grass shell. Is this true on Unix too?I believe that I am missing something about which location the images
should
be written to (point 3 above), and their orientation (bottom left vs top
left).I have checked that one image obtained by XGetImage() and passed through
panel save and restore, finally arriving at XPutImage() is preserved
through
those steps exactly - so the display writing phase with
SetDIBitsToDevice{}
is definitely going wrong. It may be, of course, that other images are
not
preserved.
Furthwe testing shows that other images are also preserved from capture to
the point before redisplay.
Cheers
Mike Thomas
_______________________________________________
winGRASS mailing list
winGRASS@grass.itc.it
http://grass.itc.it/mailman/listinfo/wingrass