nanogui: Images not drawn (FLTK+nxlib app with nano-X)


Previous by date: 8 Feb 2006 15:13:02 +0000 regarding flashplayer on nanox, krishna_mca52.sify.com
Next by date: 8 Feb 2006 15:13:02 +0000 Re: regarding flashplayer on nanox, Greg Haerr
Previous in thread: 8 Feb 2006 15:13:02 +0000 Re: Images not drawn (FLTK+nxlib app with nano-X), Greg Haerr
Next in thread: 8 Feb 2006 15:13:02 +0000 Re: Images not drawn (FLTK+nxlib app with nano-X), Greg Haerr

Subject: Re: [nanogui] Images not drawn (FLTK+nxlib app with nano-X)
From: ####@####.####
Date: 8 Feb 2006 15:13:02 +0000
Message-Id: <020820061512.17149.43EA0A690003316A000042FD21602807419C0E0B060E05@att.net>

Greg,

Last night I came to conclusion that my debug message logging is not exactly right.
I log messages from the app, nxlib, libnano-X and nano-X all into one stream.
Because of the client/server delays, they do not show syncronized correctly (looks like mess).
Therefore I will present the client and server messages separately but your conclusion is correct one.
The problem appears to be in GrNewRegionFromPixmap.
The rounding error and the image clipping I am talking about are the same thing, cause and effect.

app + libnano-X + nxlib send:

XCreatePixmap
XSetClipMask
XSetClipOrigin(456,36 = origin of image)
XSetClipOrigin(0,0   = origin of window)

result in (simplified) nano-X calls:

putTrueColorImage
GdArea
GdSetRectRegion
GdBitmap
GrNewRegionFromPixmap
GrUnionRectWithRegion      <----
GdOffsetRegion
SetExtents
GdSetClipRegion
GdBlit

Looks like the problem occurs between GrNewRegionFromPixmap (generates correct image) and GrUnionRectWithRegion (generates incorrect clipping rectangles)

I will get back to this problem tomorrow.
Martin


> The call to XSetClipMask also triggers: GrNewRegionFromPixmap and
client.c::GrUnionRectWithRegion calls which I believe generate the clipping
rectangles.
The sequence I described below also follows 32x32 images which are shown
properly.
The sequence is not the issue even though it is a mystery to me, just the
clipping rectangles (extents) created.

Martin -
    Sounds like a complex mess.  Typical of FLTK and X11, I believe.

I'd bet the bug is in GrNewRegionFromPixmap.  This routine,
called from XSetClipMask, tries to create a clipping region
from a MONOCHROME pixmap.  That is, it attempts to
build a mask (which is XSetClipMask's function), so that
only the 1-bits in the mono bitmap are used to display a
color pixmap later, likely.

You'll need to check that the pixmap that is actually sent to
XSetClipMask is in fact a mono bitmap.  If so, then you'll
need to debug nanox/nxutil::GrNewRegionFromPixmap().
The bug is very unlikely in the region code, but rather in
the code that traces the 1's and 0's in the pixmap,
and builds an incorrect clipping region.

Regards,

Greg

Previous by date: 8 Feb 2006 15:13:02 +0000 regarding flashplayer on nanox, krishna_mca52.sify.com
Next by date: 8 Feb 2006 15:13:02 +0000 Re: regarding flashplayer on nanox, Greg Haerr
Previous in thread: 8 Feb 2006 15:13:02 +0000 Re: Images not drawn (FLTK+nxlib app with nano-X), Greg Haerr
Next in thread: 8 Feb 2006 15:13:02 +0000 Re: Images not drawn (FLTK+nxlib app with nano-X), Greg Haerr


Powered by ezmlm-browse 0.20.