[futurebasic] Re: Graphics

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

From: Pete <furry@...>
Date: Thu, 11 Dec 97 23:00:58 +1000
>One simple thing that is bugging me though is passing a rectange
>co-ordinates between functions. That is why doesn't this work:
>
>Local FN setToWindow
>'sets the graph size to be the same as the window size
>
>	DIM graphRect.8
>	graphRect.top       	= _topMargin
>	graphRect.left      	= _leftMargin
>	graphRect.bottom   = WINDOW(_height) - _bottomMargin - 10
>	graphRect.right 	= WINDOW(_width)  - _rightMargin
>
>END FN = graphRect
>
>LOCAL FN drawGraph
>	DIM theRect.8
>	theRect = FN setToWindow	<- stuffs up here
>END FN

You could do it as:

LOCAL
DIM rect&
Local FN setToWindow(rect&)
'sets the graph size to be the same as the window size
	% rect&.top,      _topMargin
	% rect&.left,     _leftMargin
	% rect&.bottom,   (WINDOW(_height) - _bottomMargin - 10)
	% rect&.right,    WINDOW(_width)  - _rightMargin
END FN


LOCAL FN drawGraph
	DIM theRect.8
	FN setToWindow(@theRect)	<- stuffs up here
END FN


Pete...


Voice/Answering Machine: 61 2 48621428
Fax: 61 2 48621580
email: furry@...
snailMail:
     P.O.Box 781
     Bowral NSW 2576
     Australia

Check out: http://www.hinet.net.au

In the words of a 'famous' Vulcan "Long Live And Prosper"