Problem with a function in xlib

Moderator: tr1p1ea

Post Reply
Gert-Jan
New Member
Posts: 42
Joined: Mon 06 Feb, 2006 5:18 pm

Problem with a function in xlib

Post 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 ;)
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

isnt it supposed to do that?
Gert-Jan
New Member
Posts: 42
Joined: Mon 06 Feb, 2006 5:18 pm

Post 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
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

i never had any problems with it though.. are you sure you're drawing it Over something adn not Under it?
Gert-Jan
New Member
Posts: 42
Joined: Mon 06 Feb, 2006 5:18 pm

Post 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
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

then maybe that's the whole point of it..
you can draw a black rect and invert everything but the edge.
Gert-Jan
New Member
Posts: 42
Joined: Mon 06 Feb, 2006 5:18 pm

Post by Gert-Jan »

yea, but that's kinda slow in basic
Gert-Jan
New Member
Posts: 42
Joined: Mon 06 Feb, 2006 5:18 pm

Post 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
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post 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?
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post 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.
Image
Gert-Jan
New Member
Posts: 42
Joined: Mon 06 Feb, 2006 5:18 pm

Post by Gert-Jan »

ok will try that, thank you
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

Ummm, maybe there is a problem with it, ill take a look ... o_o.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post 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)
Post Reply