Path: utzoo!utgpu!watmath!clyde!att!rutgers!ukma!tut.cis.ohio-state.edu!bloom-beacon!apple!casseres From: casseres@Apple.COM (David Casseres) Newsgroups: comp.sys.mac.programmer Subject: Re: patStretch ? Keywords: Printing, again. Message-ID: <271@internal.Apple.COM> Date: 1 Dec 88 17:36:23 GMT References: <11256@dartvax.Dartmouth.EDU> Organization: Apple Computer Inc, Cupertino, CA Lines: 44 In article <11256@dartvax.Dartmouth.EDU> earleh@eleazar.dartmouth.edu (Earle R. Horton) writes: >... The >device field of my printing port is set to zero, so that QuickDraw >will scale things as if drawing to the screen. Just a clarification: setting the device field to 0 doesn't affect scaling; it just causes QuickDraw's text styling (bold, italic, underline, etc.) to use screen parameters. >There is a "patStretch" field in the GrafPort data structure, which >Inside Macintosh assures me "is used during output to a printer to >expand patterns if necessary." I need to know how to use this field >to control pattern scaling. Right now, patterns are not scaled when >they come out on the printer, which means they are reduced 33% in >size, relative to other objects in a drawing. If I could double the >size of output patterns, then they would be increased in size by 33%, >which might look better. On another printer with higher resolution, >patterns might come out exactly to scale with the rest of the drawing >if scaled by the same amount as the picture. The only values that should ever be used for the patStretch field are 0 and 2. Zero is the default, leaving patterns unscaled, and 2 causes patterns to be scaled up by a factor of 2. Unfortunately no other scaling is avail- able. >On a related note, I call SetFractEnable(true) and >SetFScaleDisable(false) before the application starts drawing into my >printing port. When my PrCloseDoc routine is called, I call these >routines to reset the default values for fractional fonts and font >scaling. Is there a way I can find out what the previous state is, >short of reading the low memory globals directly? No. >Should I just >assume that if an application developer is savvy enough to want font >scaling and fractional font widths, he will set things up when he is >done printing? No, too many applications are not that savvy. You have to go look in low memory to know the application's settings, then restore them when you're done. David Casseres