[comp.sys.mac] Need help on a Printer Driver

cutler@reed.UUCP (11/23/86)

[ The line eater strikes back.  AAAHGG!!! ]

This is another request for information on Printer Drivers.  I hope that this
time I get many helpful responses (thanks to those who did respond to previous
Printer Driver Questions and especially to my scrolling questions).

I am attempting to write a driver for the Apple Color Plotter.  I have most of
the actual drawing routines dealt with, but I need more info on how to make
this driver like the ImageWriter Driver.  I want it to be selectable by the
Chooser, have it put up a Job Dialog and a Page Setup Dialog like the ImageWriter,
driver, and be like the ImageWriter Driver in the sense that it can be dragged
onto the disk.

Now, am I approaching this all wrong?  Is there an easier way to do this.  In
particular, what is the structure of the ImageWriter Driver?  What makes it
so special that it can be selected by the Chooser?

The basic purpose of the driver is to draw MacDraw files.  I have all
quite a lot of documentation on the format of a MacDraw file, so I could write
another one of those programs like MacPlot, that draws MacDraw, MacDraft, etc.
files.  But what happens if somebody comes out with a program that has an
abnormal file structure?  A driver would be more useful wouldn't it?  Because
the driver doesn't care what the file structure is, it just takes care of
the drawing commands.

One problem that I see in the future with my drawing routines is what do I do
when a filled object overlaps another object?  How do I detect this so I 
can mask it?  I want to avoid bitmaps don't I?  How do I mask it once I have
detected the overlap?

I want to thank the people once again who have responded to my questions
about scrolling, etc.  I haven't tried them yet, but they make sense.
To summarise the scrolling question:

     - Most people thought that you should use ScrollRect and Invalidate the
          returned region.

Growing:

     - Invalid the Grow Icon (I think, I'm doing this from memory)
     - Move and Size the Scroll Bars with MoveControl and SizeControl.  This
          invalidates the scroll bar positions.

Updating:

     - You can create an offscreen bitmap that is static, so when scrolling
          and updating, these functions are optimised.  You only change the
          offscreen bitmap when something new is drawn.  (like a drawing program
          drawing a line, for example)  When scrolling or updating, use
          copybits.

Steven J. Russell