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


Previous by date: 7 Feb 2006 02:56:13 +0000 Re: nano-X keyboard - Error at startup, Greg Haerr
Next by date: 7 Feb 2006 02:56:13 +0000 Re: MicroWindows & blackfin, Marshia R.
Previous in thread: 7 Feb 2006 02:56:13 +0000 Re: Images not drawn (FLTK+nxlib app with nano-X), Martin Kajdas
Next in thread: 7 Feb 2006 02:56:13 +0000 Re: Images not drawn (FLTK+nxlib app with nano-X), Martin Kajdas

Subject: Re: [nanogui] Images not drawn (FLTK+nxlib app with nano-X)
From: "Greg Haerr" ####@####.####
Date: 7 Feb 2006 02:56:13 +0000
Message-Id: <020d01c62b91$0f1e15c0$6401a8c0@winXP>

 >   I traced the code thru devdraw.c::GdArea and the image is correctly
drawn in memory.
>I printed the number of calls to drawpoint/drawrow with x,y locations and
it makes sense for the image.
> However, it then calls GdBlit and here for some reason it falls to 'Partly
clipped' area of code

I don't get it.  GdArea doesn't call GdBlit....  Are you sure you're
debugging the
original GrArea call?  GrArea uses GdArea, which always draws pixels
one by one, using drawpint and drawrow, like you state above.  Are you
drawing into an offscreen window, and then using GrCopyArea, which
will use GdBlit??

Regards,

Greg



I traced the code inside GdBlit (devdraw.c):
The problem is that the value prc->right calculated for each line of the
image is rounded down (for this image) to multiple of 16 pixels of the
image.

I checked GdArea() and GdClipPoint() but the generated arrays I believe are
OK (I will verify this tomorrow).

There are some calls to:

XSetClipOrigin(456,36)
XSetClipOrigin(0,0)
GdOffsetRegion(456,36)
GdSetRectRegion(0, 0, 490, 405)
GdSetClipRegion(0,23,0,23)

before dstpsd->Blit() gets called which may have something to do with the
problem but I could not figure where the image data (right clip) gets
modified.

If I modify the prc->right before calling dstpsd->Blit(), the image comes
out complete but with the background being black instead of transparent
(makes sense because of my prc->right values being too large).

Martin


-----Original Message-----

I traced the code thru devdraw.c::GdArea and the image is correctly drawn in
memory.
I printed the number of calls to drawpoint/drawrow with x,y locations and it
makes sense for the image.

However, it then calls GdBlit and here for some reason it falls to 'Partly
clipped' area of code.
The parameters are:
dstx = 456
dsty = 36
width = 24
height = 24
srcx = 0
srcy = 0

I believe these are OK and the size of array is good, but what makes is
partly clipped?
I will work on this but any suggestions are welcomed.

Martin



-----Original Message-----

> If GrArea converts MWPF_TRUECOLOR565 to MWPF_RGB format then that is where
the problem is.
> Let me know what can I do next.

All your results look good so far.  Next step is to debug devdraw.c::GdArea.
I've checked this routine pretty well, there is code that attempts
to find multiple points of the same color.  I'd add debug statements
that just show GdArea is called with the correct width and pixtype,
and then each dot for the full width is displayed.

Regards,

Greg


---------------------------------------------------------------------
To unsubscribe, e-mail: ####@####.####
For additional commands, e-mail: ####@####.####



Previous by date: 7 Feb 2006 02:56:13 +0000 Re: nano-X keyboard - Error at startup, Greg Haerr
Next by date: 7 Feb 2006 02:56:13 +0000 Re: MicroWindows & blackfin, Marshia R.
Previous in thread: 7 Feb 2006 02:56:13 +0000 Re: Images not drawn (FLTK+nxlib app with nano-X), Martin Kajdas
Next in thread: 7 Feb 2006 02:56:13 +0000 Re: Images not drawn (FLTK+nxlib app with nano-X), Martin Kajdas


Powered by ezmlm-browse 0.20.