Page 1 of 1

Problem with a function in xlib

Posted: Fri 29 Sep, 2006 5:01 pm
by Gert-Jan
Hi, is it possible that there is a problem with this function
usage: real(12,Shape_Type,x1,y1,x2,y2,DrawShape_UpdateLCD
If i choose the drawshape 5 = DrawRectOutlineBlackFillWhite
I see the rectangle, outline black; but it isn't filled with white, or i might be using it wrong ;)

Posted: Fri 29 Sep, 2006 5:44 pm
by King Harold
isnt it supposed to do that?

Posted: Fri 29 Sep, 2006 6:12 pm
by Gert-Jan
If i hear the name DrawRectOutlineBlackFillWhite
i think of a rectangle, outline black, filled white. But the box doesnt get white, you see the background

Posted: Fri 29 Sep, 2006 6:16 pm
by King Harold
i never had any problems with it though.. are you sure you're drawing it Over something adn not Under it?

Posted: Fri 29 Sep, 2006 6:21 pm
by Gert-Jan
yes, i draw it over something, i tried several things. To make sure i was drawing over something, i putted a pauze after the drawing command, and still i see the background

Posted: Sat 30 Sep, 2006 8:13 am
by King Harold
then maybe that's the whole point of it..
you can draw a black rect and invert everything but the edge.

Posted: Sat 30 Sep, 2006 9:47 am
by Gert-Jan
yea, but that's kinda slow in basic

Posted: Sat 30 Sep, 2006 12:36 pm
by Gert-Jan
Just try this, make a program in basic with this code (make sure xlib is installed ;))

Code: Select all

ClrDraw
For(x,0,94)
For(y,0,62)
Pxl-On(y,x)
End
End
real(12,5,0,50,94,63,1
And see what happens

Posted: Sat 30 Sep, 2006 1:05 pm
by King Harold
why dont you use Shade(-10,10,-10,10, whatever it was?
or real(12, whatever it is
to make it black first, or atleast fill with lines..

but, as i said, you can use 2 xLIB commands to do the trick, right?

Posted: Sat 30 Sep, 2006 4:31 pm
by threefingeredguy
Why don't you just draw a black filled rect and then XOR a 1-pixel smaller one on, as was suggested. You won't notice any speed difference.

Posted: Sat 30 Sep, 2006 7:53 pm
by Gert-Jan
ok will try that, thank you

Posted: Sun 01 Oct, 2006 6:26 am
by tr1p1ea
Ummm, maybe there is a problem with it, ill take a look ... o_o.

Posted: Tue 10 Oct, 2006 6:07 pm
by King Harold
I thought it would be funny to mess around with it but I couldn't reproduce the bug.
(however, I noticed (again) that inverting a not-filled rectangle omits its corners)