nanogui: Images not drawn (FLTK+nxlib app with nano-X)
Subject:
Re: [nanogui] Images not drawn (FLTK+nxlib app with nano-X)
From:
"Greg Haerr" ####@####.####
Date:
31 Jan 2006 15:33:35 +0000
Message-Id: <042a01c6267b$af885c20$6401a8c0@winXP>
> I would like to know if it makes sense to you and why GrSetGCClipOrigin()
did not do it correctly?
> Why the call to GrOffsetRegion() is necessary?
Martin -
I don't understand this yet either. Before your fix, the region is
offset
in the GsPrepareWindow code, which ultimately calls GdOffsetRegion.
Your fix sets the region offset immediately...
> If it makes sense to you, then you can check this into nxlib CVS.
Yes, I'll add it.
> The only problem now is that some of my images are slightly clipped on the
right edge. I think this is a rounding to the byte/word(?) boundary.
> Is there a problem with image widths not divisible by 8?
Yes - the MWIMAGEBITS typedef is unsigned short, which requires
images to be a multiple of 16 (two bytes). It seems this could be a problem
with X11 images being allowed with no short-padded boundary. However,
this should cause the images to be one dot too large, not clipped. Please
comment.
Regards,
Greg