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


Previous by date: 1 Feb 2006 16:12:42 +0000 Re: segmentation fault, Greg Haerr
Next by date: 1 Feb 2006 16:12:42 +0000 VNC Server for Nanox, Pete Klemm
Previous in thread: 1 Feb 2006 16:12:42 +0000 Re: Images not drawn (FLTK+nxlib app with nano-X), Greg Haerr
Next in thread: 1 Feb 2006 16:12:42 +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: "Martin Kajdas" ####@####.####
Date: 1 Feb 2006 16:12:42 +0000
Message-Id: <CF2BB830A62F914F848E5AD5FFF57AC22914BD@mkmail.MKPROD.COM>

Regarding 'the MWIMAGEBITS typedef is unsigned short'
I verified that the images with widths multiple of 16 pixels are drawn correctly.
Others are trimmed to smaller size (multiple of 16).

Looks like the image width is rounded down to multiple of 16 instead of up.
Maybe the rounding problem is in the nxlib before it calls microwindows.
Martin



-----Original Message-----
From: Greg Haerr ####@####.####
Sent: Tuesday, January 31, 2006 7:33 AM
To: Martin Kajdas
Cc: ####@####.####
Subject: Re: [nanogui] Images not drawn (FLTK+nxlib app with nano-X)


> 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



Previous by date: 1 Feb 2006 16:12:42 +0000 Re: segmentation fault, Greg Haerr
Next by date: 1 Feb 2006 16:12:42 +0000 VNC Server for Nanox, Pete Klemm
Previous in thread: 1 Feb 2006 16:12:42 +0000 Re: Images not drawn (FLTK+nxlib app with nano-X), Greg Haerr
Next in thread: 1 Feb 2006 16:12:42 +0000 Re: Images not drawn (FLTK+nxlib app with nano-X), Greg Haerr


Powered by ezmlm-browse 0.20.