nanogui: Re: Redraw of a partial area in a FLTK Button


Previous by date: 10 Dec 2010 22:19:29 -0000 Test - please ignore, Alex Holden
Next by date: 10 Dec 2010 22:19:29 -0000 Nano-X v0.92 released, NXLIB v0.46 released, Greg Haerr
Previous in thread:
Next in thread:

Subject: Re: Redraw of a partial area in a FLTK Button
From: "Greg Haerr" ####@####.####
Date: 10 Dec 2010 22:19:29 -0000
Message-Id: <04aa01cb98b8$4e1a4520$6964a8c0@winXP>

> The gui runs upon FLTK 1.10 final. I have several modules where I can
> switch to. So my problem is that, when I switch from a subscreen to the
> main screen, a part of the area of one button is in the main screen is
> redrawn false. This area is exactly the area of the other button in the
> subscreen I use to get back to the main screen. The buttons have own
> designed background images, which I implemented to the gui via fluid. The
> format of the button pictures is png.
> putTrueColorImage depth 16 pixtype 10 src 0,0 wxh 103,81 dst 647,250

> The last line is the wrong redrawn area. I use nano-X version 0.92 RC2 and
> nxlib 0.46. Do you have any ideas where to locate the failure?

Michael -

I have found and fixed what I think to be your problem.  The fixes are
in the git repository for nano-X and NXLIB.  The long story short is that
there are two problems.  The first fix is that
nxlib/SetClip.c::XsetClipOrigin()
needs to have the call to GrOffsetClipRegion removed.  This was in
a patch that I accepted in April, and is incorrect.

At some point in 0.92, high-byte alpha 255 was introduced into
all colors, for preperation to porter duff compositing operations
being implemented.  Some code in
nanox/nxutil.c::GrNewRegionFromPixmap() compares a pixel
value to 0, whereas it needs to have the high byte stripped
off, because alpha is likely != 0.  This required a one line fix in
this function and in GrNewBitmapFromPixmap.

If you don't want to run the newer development code, then you
might try the first fix above, then the second (look at the Dec 7
commit for details).

Let me know that this fixes your problem.

Regards,




Previous by date: 10 Dec 2010 22:19:29 -0000 Test - please ignore, Alex Holden
Next by date: 10 Dec 2010 22:19:29 -0000 Nano-X v0.92 released, NXLIB v0.46 released, Greg Haerr
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.