[comp.sys.mac.programmer] Help needed in Toolbox Calls

fang@dukempd.phy.duke.edu (Fang Zhong) (10/27/88)

	I am writing a short program to draw our experimental data on
a MacII screen.  I use the QuickDraw toolbox calls from Absoft Fortran.

	call toolbx (SETRECT,rect,0,0,640,480)
	call toolbx (CLIPRECT,rect)
	PicHandle = toolbx (OPENPICTURE,rect)

	........MOVETO, LINE,.....

	call toolbx (CLOSEPICTURE)
	  clipboard = toolbx(ZEROSCRAP)	   	 !copy pict to clipboard
	  call toolbx(HLOCK,PicHandle)
	  ptrsize = toolbx(GETHANDLESIZE,PicHandle)
	  pictptr = LONG(PicHandle)
	  clipboard = toolbx(PUTSCRAP,ptrsize,'PICT',pictptr)
	  call toolbx(HUNLOCK,PicHandle)

	....paste to macdraw....
	....edit in macdraw.....
	....send to a laser printer to print...

The 'MOVETO' and 'LINE' are the two mostly used calls.  The input
parameters of the two calls are integer*4.  In order to have the
points drawn on the screen, I have to scale the data points by the
screen size 640x480. Then two points separated by less than one in
x and y would be crashed to one point after the scaled points
are converted into integer*4. When I print the data on the laser
printer later, even the laserwriter has much better resolution than
the screen, the physical separation between the two point has been
lost.
	I wonder if I can take the maximum allowable 'rect', and multiply my
data points by 100x100 or 1000x1000, then put the data in the 'rect'.
Thus I won't loose the resolution when I do the real-to-integer*4
conversion.  Then I need to have a call to scale the pict to fit to
the screen, and copy into clipboard.  Hopefully, this call would not
cost the resolution when the points are printed out later on the
laserwriter.
	Can anybody help me to find a solution to this problem?
	Some other questions.
	The toolbox(PENSIZE,w,h) with w and h being integer again does not
allow me to have a line width less than one.  I saw that MacDraw II
allows one to choose any decimal line width.  How was this done?
	If I put a string of text on the screen by using QuickDraw
commands, how can I draw them along y-axis, or draw them first along
x-axis and them rotate the string in any angle.
	Any help is greatly appreciated.
	
						Fang