[futurebasic] Re: [Q] drawing in colour...

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 1997 : Group Archive : Group : All Groups

From: BMichael <BMichael@...>
Date: Fri, 12 Dec 1997 02:20:52 EST
>Okay I have to be doing something wrong. According to Inside Mac when I set
>the ForeColor and draw it should show up in that colour. It don't. Least
>not on my window. Change the color using any of the colour commands and it
>will be displayed in B&W. But if you use the OLD colour command and print
>something, it shows up in colour. Weird.
>
>Someone want to point out why this is so? Seems illogical to me.

The problem seems to be somewhere in your code _other_ than in the 
color-setting stuff. I put in the following, cut down drastically from 
the code you posted, and it worked fine;

CLEAR LOCAL
LOCAL FN drawPlot
  DIM rect;8
  DIM oldFore;6:                                 'old foreground colour
  DIM newFore;0,dR,dG,dB
  CALL GETFORECOLOR(#@oldFore):            'record the old foreground 
colour
  CALL PENMODE(_patCopy)
  dR=0:dG=0:dB=65535                              'your case 2
  CALL RGBFORECOLOR(#@newFore):                   'set new colour
  CALL MOVETO(0,0)                                'dummy drawing
  CALL LINETO(400,400)
  CALL RGBFORECOLOR(#@oldFore):                   'set old colour
  CALL PENNORMAL
END FN

WINDOW 1,"",(0,0)-(600,400),_docNoGrow
FN drawPlot
WHILE NOT MOUSE(_down)
  DELAY 100
WEND

END

Bill