[futurebasic] Re: [FB] Drawing Question

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

From: PZ <pierrezippi@...>
Date: Sat, 23 Oct 2010 14:33:25 -0500
This example works in FB 4.4.3

CLEAR LOCAL
DIM mPt&;0,mV2,mH2
local FN DrawLine
PEN ,,, _srcXor, 3     'set pen mode

While FN StillDown     'DO
CALL GETMOUSE(mPt&)

PLOT 0,mV2 TO WINDOW(_width),mV2
flushwindowbuffer
DELAY 50
PLOT 0,mV2 TO WINDOW(_width),mV2
flushwindowbuffer

WEND
CALL PENNORMAL
end fn

window 1

ON MOUSE FN DrawLine

do
HandleEvents
until gFBQuit




> From: Tom Russell <tsrdatatech@...>
> Reply-To: <futurebasic@...>
> Date: Sat, 23 Oct 2010 14:14:29 -0400
> To: <futurebasic@...>
> Subject: Re: [FB] Drawing Question
> 
> this mPt&;0 throws an alias exception error for me. Is there something else
> I need to add in?
> 
> On Sat, Oct 23, 2010 at 1:54 PM, PZ <pierrezippi@...> wrote:
> 
>> getmouse is toolbox
>> you will need to dim the pointer like this:
>> 
>> DIM mPt&;0,mV2,mH2
>> 
>> 
>> 
>>> From: Tom Russell <tsrdatatech@...>
>>> Reply-To: <futurebasic@...>
>>> Date: Sat, 23 Oct 2010 13:46:16 -0400
>>> To: <futurebasic@...>
>>> Subject: Re: [FB] Drawing Question
>>> 
>>> Is there a built in function for the Call GetMouse? Or is it something I
>>> have to add in?
>>> 
>>> On Sat, Oct 23, 2010 at 1:14 PM, PZ <pierrezippi@...> wrote:
>>> 
>>>> Try something like this.
>>>> 
>>>> 
>>>> PEN ,,, _srcXor, 3     'set pen mode
>>>> While FN StillDown     'DO
>>>> CALL GETMOUSE(mPt&)
>>>> 
>>>> PLOT 0,mV2 TO WINDOW(_width),mV2
>>>> flushwindowbuffer
>>>> DELAY 50
>>>> PLOT 0,mV2 TO WINDOW(_width),mV2
>>>> flushwindowbuffer
>>>> 
>>>> WEND
>>>> 
>>>> CALL PENNORMAL
>>>> 
>>>> 
>>>> 
>>>>> From: Tom Russell <tsrdatatech@...>
>>>>> Reply-To: <futurebasic@...>
>>>>> Date: Sat, 23 Oct 2010 13:04:02 -0400
>>>>> To: futurebasic <futurebasic@...>
>>>>> Subject: [FB] Drawing Question
>>>>> 
>>>>> I have a chart that I draw now on a window using the MoveTo and LineTo
>>>>> functions.
>>>>> 
>>>>> Now I want to be able to draw a black line from top to bottom that when
>>>>> using the right/left keys will make it move to the right or left. I
>> have
>>>>> already done some of this as a test, however when I draw a line for
>> each
>>>>> keypress it just keeps drawing one to the right or left and leaves the
>>>>> previous one where it was drawn before and also overwrites the chart
>>>> behind
>>>>> it.
>>>>> 
>>>>> I need some direction as to what the best way would be to handle doing
>>>>> something like this. I would assume it may be best to place a new area
>> to
>>>>> draw over the window and not in it? I also considered placing my code
>>>> within
>>>>> the drawing code of the chart to the window but figured that would be
>>>> super
>>>>> cpu intensive to do?
>>>>> 
>>>>> Any thoughts or ideas would be appreciated.
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> Tom
>>>>> 
>>>>> --
>>>>> To unsubscribe, send ANY message to:
>>>> futurebasic-unsubscribe@...
>>>> 
>>>> --
>>>> To unsubscribe, send ANY message to:
>> futurebasic-unsubscribe@...
>>>> 
>>>> 
>>> 
>>> --
>>> To unsubscribe, send ANY message to:
>> futurebasic-unsubscribe@...
>> 
>> --
>> To unsubscribe, send ANY message to: futurebasic-unsubscribe@...
>> 
>> 
> 
> --
> To unsubscribe, send ANY message to: futurebasic-unsubscribe@...