[comp.sys.mac.programmer] Color Printing with Color QuickDraw?

jdm@ut-emx.UUCP (Jim Meiss) (10/05/88)

	I'd like to be able to print in color when we get that
eventual color laser printer (or slide maker), or when I 
take my program to someone who's got one already. Of course 
right now I'd like to print in color on the IWII.
	So the question is: Can I use Color QuickDraw? No mention
of this in IM V. Is is possible to use a CGrafPtr as a printer port?

	I fear that because nothing is said in IM, each printer
will have it's own procedure.

					Jim Meiss
					jdm@emx.utexas.edu

kaufman@polya.Stanford.EDU (Marc T. Kaufman) (10/06/88)

In article <6610@ut-emx.UUCP> jdm@ut-emx.UUCP (Jim Meiss) writes:

>	I'd like to be able to print in color when we get that
>eventual color laser printer (or slide maker), or when I 
>take my program to someone who's got one already. Of course 
>right now I'd like to print in color on the IWII.
>	So the question is: Can I use Color QuickDraw? No mention
>of this in IM V. Is is possible to use a CGrafPtr as a printer port?

The decision to use a CGrafPort is not yours,... it is the printer driver's.
On the MAC II, color print calls are transmogrified as necessary to work on
non-color GrafPorts.  I think that color calls MAY be changed to the appropriate
1-of-8 color for IW-IIs.  Certainly, using the ForeColor or BackColor calls
(which are B/W GrafPort calls) will work, even on color GrafPorts.  On a Mac II,
with a (non-color) GrafPort, using ForeColor or BackColor will place a colored
item in the port window (I use this trick to put colored messages into dialogs).
Color Device drivers usually return Color GrafPorts on PrOpenDoc.

Marc Kaufman (kaufman@polya.stanford.edu)

scottg@pogo.GPID.TEK.COM (Scott Gillespie) (10/07/88)

In article <6610@ut-emx.UUCP>, jdm@ut-emx.UUCP (Jim Meiss) writes:
> 
> 	I'd like to be able to print in color when we get that
> eventual color laser printer (or slide maker), or when I 
> take my program to someone who's got one already. Of course 
> right now I'd like to print in color on the IWII.
> 	So the question is: Can I use Color QuickDraw? No mention
> of this in IM V. Is is possible to use a CGrafPtr as a printer port?
> 

Check the port the printer driver returns to you:  it may be a
Cgrafptr (e.g. Tektronix 4693D, Mirus FilmPrinter, etc.).


Scott Gillespie
Tektronix, Inc.

jdm@ut-emx.UUCP (Jim Meiss) (10/07/88)

In article <6610@ut-emx.UUCP> I write:
>
>	I'd like to be able to print in color when we get that
>eventual color laser printer (or slide maker), or when I 
>take my program to someone who's got one already. Of course 
>right now I'd like to print in color on the IWII.
>	So the question is: Can I use Color QuickDraw? No mention
>of this in IM V. Is is possible to use a CGrafPtr as a printer port?

	Hey, it works! I'm amazed. Simply draw into the printer port in
full glorious RGB color, and it magically comes out on the IWII in 8
not so glorious, but neat, colors.
	This MacII is a great gadget!

									
				Jim Meiss				
		 		jdm@emx.utexas.edu
				jdm%uta.MFENET@nmfecc.ARPA

alcmist@well.UUCP (Frederick Wamsley) (10/07/88)

I've tried printing to an IW II with a color ribbon from several color
Mac II programs.  The output is always black and white.  Apparently the only
way to get color from the Imagewriter driver is to talk Classic Quickdraw
color to it.
-- 
Fred Wamsley  {dual,hplabs}!well!alcmist;well!alcmist@lll-crg.arpa;
CIS 72247,3130; GEnie FKWAMSLEY; USPS - why bother?
Have you hugged your iguana today?

kaufman@polya.Stanford.EDU (Marc T. Kaufman) (10/07/88)

In article <7322@well.UUCP> alcmist@well.UUCP (Frederick Wamsley) writes:
>I've tried printing to an IW II with a color ribbon from several color
>Mac II programs.  The output is always black and white.  Apparently the only
>way to get color from the Imagewriter driver is to talk Classic Quickdraw
>color to it.

While that also works, the problem you are experiencing is likely related to
the fact that many older applications look at the device id returned in the
print rec, and tailor their output to them.  I.e., if the program "knows" that
it is printing on an Imagewriter, it doesn't try to use color.  This is bad
practice, as you never can tell what a new device is capable of, and is slowly
disappearing in newer applications.

Marc Kaufman (kaufman@polya.stanford.edu)

casseres@Apple.COM (David Casseres) (10/14/88)

In article <7322@well.sUCP> alcmist@well.sUCP (Frederick Wamsley) writes:
>I've tried printing to an IW II with a color ribbon from several color
>Mac II programs.  The output is always black and white.  Apparently the only
>way to get color from the Imagewriter driver is to talk Classic Quickdraw
>color to it.

That is correct, since the current driver gives you a classic grafport
rather than a CGrafPort.  Incidentally, MacDraw II is one good program that
does talk classic QD color to the ImageWriter.

David Casseres