[futurebasic] Coordinates

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 2009 : Group Archive : Group : All Groups

From: Brian Heibert <heibert@...>
Date: Sun, 18 Oct 2009 17:02:20 -0400
One thing I am not good at at all is coordinates

I try not to bug the list about this normally;  I go to my Dad who is  
a math wiz

But he couldn't figure it out this time

I have a rectangle
SetRect(SampleRect, 95,70,250,170)

I want to be able to fill the rectangle with different colors (one  
color at a time; each time the user runs the menuitem to select the  
color...
tried this...
BOX FILL 200,150 TO 400,170
but it didn't fill the box right
also tried
95,70 TO 250,170
and it still didn't fill in the box

Can someone take a look at this and tell me
the right coordinates?

I am sorry for bugging the list about this; but my math skills  
(numbers, etc.) suck

CLEAR LOCAL
LOCAL FN DisplayColorValues (@RGBOut AS POINTER TO RGBColor)
'---> Variables
DIM SampleRect AS RECT
DIM cyan&,magenta&,yellow&
'---> Get CMY values.
cyan&    = RGBOut.red   AND &FFFF
magenta& = RGBOut.green AND &FFFF
yellow&  = RGBOut.blue  AND &FFFF
CALL moveto (0,0)
'~Coordinates
RGBForeColor(#RGBOut)
SetRect(SampleRect, 95,70,250,170)
//BOX 970,610 TO 510,12
PaintRect(SampleRect)
BOX FILL 200,150 TO 400,170
COLOR _zBlack'reset color to black
END FN

Brian