TweetFollow Us on Twitter

Autumn 91 - PRINT HINTS FROM LUKE & ZZ

PRINT HINTS FROM LUKE & ZZ

COPYMASK, COPYDEEPMASK, AND LASERWRITER DRIVER 7.0

PETE "LUKE" ALEXANDER and Zz

[IMAGE 041-042_Luke's_column_ht1.GIF]

Luke speaks

With the release of System 7 comes a new release of the LaserWriter driver, version 7.0. Yes, the great implementors (GIs) have once again created another version of this driver. This version supports TrueType fonts, it's 32-bit clean, it has the new PostScript file-saving capability, and it remembers the last setting of the Black & White and Color/Grayscale print buttons (HOORAY!!).

Along comes our hero, Dudley Developer. He's been using the new CopyMask and CopyDeepMask calls that are available in QuickDraw in System 7 and he's very excited about printing his new images with the LaserWriter driver. He assumes that since QuickDraw supports the new CopyMask and CopyDeepMask calls, the LaserWriter driver 7.0 will also support them.

Bad assumption. Our hero has not been keeping up with current events. He has not even read "QuickDraw's CopyBits Procedure: Better Than Ever in System 7.0" in Issue 6 ofdevelop . If he had, he would know that, like previous versions of the LaserWriter driver, LaserWriter driver 7.0 does not directly support the CopyMask and CopyDeepMask calls.

So, in his ignorance, our hero creates a few pictures with the new QuickDraw calls, and sends them off to the LaserWriter. Time goes by, paper comes out, but the picture doesn't look the same as it did on his monitor. It has lost some of the cool effects from CopyMask and CopyDeepMask.

Why, he wonders, won't LaserWriter driver 7.0 print his images with the same effects provided by the CopyMask and CopyDeepMask calls? What was Apple thinking when they created LaserWriter driver 7.0? How could they release a driver that doesn't support the new 32-bit QuickDraw calls? How do they expect him to print his new cool pictures created in System 7 with these calls?

To attempt to understand the problem, Dudley looks between the covers of the Adobe red book (a.k.a. PostScript Language Reference Manual by Adobe Systems). Even he knows transfer modes would be required to support the new calls--but alas, he doesn't find any information on them, because PostScript level 1 doesn't understand transfer modes. Unfortunately, the LaserWriter driver won't rewrite PostScript for you; it just merrily converts your QuickDraw calls into their equivalent PostScript call. The LaserWriter driver always uses the srcCopy transfer mode when it prints a pixel map, regardless of the mode used when the picture was created. (Why srcCopy? Because of the limitations of the color model and the lack of transfer mode support provided by PostScript level 1.)

Thereis a method that will allow Dudley to print the images he created, but as usual with printing, he'll need to do a little more work: he'll need to use GWorlds and PrGeneral. Since our hero is not familiar with using GWorlds, he decides to go back through his old issues ofdevelop , hoping for an article. Luckily, he finds just what he's looking for in Issue 1: "Realistic Color for Real-World Applications" and "Braving Offscreen Worlds." And the CD contains the sample code that uses GWorlds. So, after reading the articles and trying the code, Dudley is all set to create an off-screen world to hold his image. He realizes that to get the best print quality, he'll need to make the GWorld bigger than the picture on the screen. The GWorld should be the size of the grafPort returned by the application's call to PrOpenDoc, at the printer's resolution. Dudley knows he needs a device- independent method to acquire this information, and he knows he can get it by using PrGeneral's GetRslData opcode. And even better still, he remembers an article about using PrGeneral from Issue 3 of develop . The article was titled "Meet PrGeneral," and it contained complete sample code. Yippee! After using the GetRslData opcode to determine the resolutions supported by the currently selected printer, he uses the SetRsl opcode to set the printer to the resolution he wants. When his application calls PrOpenDoc, the printer driver will return a grafPort that's sized correctly for the resolution he chose.

Next, Dudley creates the correctly sized off-screen world and draws his image using CopyMask or CopyDeepMask. He just needs to remember that since the CopyMask and CopyDeepMask calls are not saved in pictures, he needs to make the calls directly into his off-screen world (not relying on DrawPicture). So, when he's ready to print his image, Dudley uses CopyBits to copy it from his GWorld into the printer's grafPort with srcCopy. That's it; his totally cool image has been printed in living color (or anemic gray scales, if he's printing to the LaserWriter).

This wasn't so bad, but our hero is wondering--when will the GIs make this easier? When will all of this incompatibility between QuickDraw and the LaserWriter driver improve? That's a really good question. The GIs tell me things will probably not improve until the new printing architecture is released. In the meantime, you've got this way around the problem, and at least it isn't too ugly!


REFERENCES

  • "QuickDraw's CopyBits Procedure: Better Than Ever in System 7.0," develop Issue 6, Spring 1991.
  • "Meet PrGeneral, the Trap That Makes the Most of the Printing Manager" develop Issue 3, July 1990.
  • "Realistic Color for Real-World Applications," develop Issue 1, January 1990.
  • "Braving Offscreen Worlds," develop Issue 1, January 1990.
  • Inside Macintosh , Volume V, Color Manager chapter, Addison-Wesley, 1988.

PETE "LUKE" ALEXANDER After taking almost a year to check out Ford Explorers in parking lots and dealerships, Luke has, in a surprise move, actually purchased one of his own. At SIGGRAPH in Las Vegas he ran into some Ford engineers; they were surprised, but not seriously hurt. They asked increduously, "Have you driven a Ford lately?" Luke left wondering what kind of inside information they had. He knew for sure, though, that the animation was his favorite part of the show-- which figures, since since he's so used to working with Zz, our resident cartoon character. Not surprisingly, the Las Vegas show he talked about the most had little to do with computers! He also enjoys the show at Gordon Biersch, a local brew pub known for its good beer and yuppie clientele. Luke says he goes there to see how yuppie scum lives, but every once in a while we think he already knows.*

 
AAPL
$101.32
Apple Inc.
+0.74
MSFT
$45.15
Microsoft Corpora
-0.07
GOOG
$582.56
Google Inc.
-0.81

MacTech Search:
Community Search:

Software Updates via MacUpdate

calibre 2.0.0 - Complete e-library manag...
Calibre is a complete e-book library manager. Organize your collection, convert your books to multiple formats, and sync with all of your devices. Let Calibre be your multi-tasking digital... Read more
Apple iMovie 10.0.5 - Edit personal vide...
With an all-new design, Apple iMovie lets you enjoy your videos like never before. Browse your clips more easily, instantly share your favorite moments, and create beautiful HD movies and Hollywood-... Read more
Apple Keynote 6.2.2 - Apple's prese...
Apple Keynote makes it simple to create and deliver beautiful presentations. Powerful tools and dazzling effects bring your ideas to life. You can work seamlessly between Mac and iOS devices. And... Read more
Apple Numbers 3.2.2 - Apple's sprea...
With Apple Numbers, sophisticated spreadsheets are just the start. The whole sheet is your canvas. Just add dramatic interactive charts, tables, and images that paint a revealing picture of your data... Read more
OpenOffice 4.1.1 - Free and open-source...
OpenOffice.org is both an Open Source product and a project. The product is a multi-platform office productivity suite. It includes the key desktop applications, such as a word processor,... Read more
Pages 5.2.2 - Apple's word processo...
Apple Pages is a powerful word processor that gives you everything you need to create documents that look beautiful. And read beautifully. It lets you work seamlessly between Mac and iOS devices. And... Read more
Quicken 2015 2.0.1 - Complete personal f...
The new Quicken 2015 helps you manage all your personal finances in one place, so you can see where you're spending and where you can save. Quicken automatically categorizes your financial... Read more
CleanMyMac 2.2.7 - Delete files that was...
CleanMyMac makes space for the things you love. Sporting a range of ingenious new features, CleanMyMac 2 lets you safely and intelligently scan and clean your entire system, delete large, unused... Read more
MacFamilyTree 7.2.4 - Create and explore...
MacFamilyTree gives genealogy a facelift: it's modern, interactive, incredibly fast, and easy to use. We're convinced that generations of chroniclers would have loved to trade in their genealogy... Read more
Videobox 4.1.1 - Download Flash video th...
Videobox allows you to quickly and easily download Flash video from most all of the popular video sites on the internet. Videobox will convert the video into a native Quicktime format so it's ready... Read more

Latest Forum Discussions

See All

Trolls vs Vikings Update Adds Over One H...
Trolls vs Vikings Update Adds Over One Hundred Levels, Reduces Item Cost, and More Posted by Ellis Spice on August 22nd, 2014 [ permalink ] | Read more »
SNK Celebrates the 20th Anniversary of T...
SNK Celebrates the 20th Anniversary of The King of Fighters With a Big Sale Posted by Ellis Spice on August 22nd, 2014 [ permalink ] | Read more »
It Came From Canada: Star Wars: Commande...
With a brand new Star Wars trilogy on the horizon, prepare yourselves for Disney and George Lucas’s space fantasy throwback to be more omnipresent than ever before. So it should come as no surprise that new adventures in that galaxy far, far away... | Read more »
Swing Copters Review
Swing Copters Review By Jordan Minor on August 22nd, 2014 Our Rating: :: DIE TRYINGUniversal App - Designed for iPhone and iPad The creator of Flappy Bird is back with a vengeance.   | Read more »
The Outcast Review
The Outcast Review By Nadia Oxford on August 22nd, 2014 Our Rating: :: HANDS OFF. WAY OFF.Universal App - Designed for iPhone and iPad It’s easy to see what The Outcast is trying for, but its execution needs a lot of work.   | Read more »
Brain+ Review
Brain+ Review By Nadia Oxford on August 22nd, 2014 Our Rating: :: DIM BULBUniversal App - Designed for iPhone and iPad Brain+ is just another entry in an over-saturated brain-training marketplace – and not a particularly fun entry... | Read more »
The Witcher Battle Arena – New Gameplay...
The Witcher Battle Arena – New Gameplay Trailer Revealed Posted by Jessica Fisher on August 22nd, 2014 [ permalink ] Based in the Witcher universe, | Read more »
Max Gentlemen Review
Max Gentlemen Review By Jennifer Allen on August 22nd, 2014 Our Rating: :: OUTSTAYING ITS WELCOMEiPhone App - Designed for the iPhone, compatible with the iPad Max Gentlemen seems pretty quirky initially but that appeal wears thin... | Read more »
Club Penguin Gets Frozen All Over in Lat...
Club Penguin Gets Frozen All Over in Latest Takeover Event Posted by Ellis Spice on August 22nd, 2014 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »
Doctor Who: Legacy Review
Doctor Who: Legacy Review By Jennifer Allen on August 22nd, 2014 Our Rating: :: RUN OF THE MILLUniversal App - Designed for iPhone and iPad Doctor Who: Legacy is an ok match-3 puzzle game, but it lacks some much needed personality... | Read more »

Price Scanner via MacPrices.net

Leftover 15-inch 2.0GHz Retina MacBook Pros a...
B&H Photo has leftover previous-generation 15″ 2.0GHz Retina MacBook Pros now available for $1599 including free shipping plus NY sales tax only. Their price is $400 off original MSRP. B&H... Read more
Pro.Calendar – New Productivity App for iPad...
Austin, Texas based mobile business and productivity app developer LightArrow, Inc. has announced Pro.Calendar, a powerful and intuitive calendar app with eight versatile calendar options including... Read more
SanDisk Ultra II SSD — Supercharge Your Syste...
SanDisk Corporation has announced the new SanDisk Ultra II SSD with enhanced SSD Dashboard. The new drive is designed to deliver a cost-effective and easy upgrade solution for PC owners looking to... Read more
Samsung and Barnes & Noble Introduce New...
Samsung Electronics America and NOOK Media, a subsidiary of Barnes & Noble, Inc. have announced the introduction of the new Samsung Galaxy Tab 4 NOOK, a 7-inch tablet combining Samsung’s leading... Read more
21-inch iMacs on sale for up to $150 off MSRP
B&H Photo has 21″ iMacs on sale for up to $150 off MSRP including free shipping plus NY sales tax only. B&H will also include a free copy of Parallels Desktop software: - 21″ 2.7GHz iMac: $... Read more
27-inch 3.2GHz iMac on sale for $1698, save $...
Abt has the 27″ 3.2GHz iMac on sale for $1698 including free shipping. Their price is $101 off MSRP. Read more
Mac Backup Guru 2.0 Drive Backup/Cloneing Uti...
Mac Backup Guru developer MacDaddy has released Mac Backup Guru 2.0, offering new and enhanced advanced features, such as bootable backups, synchronised volumes and folders, and a Snapshot mode that... Read more
Operate GE’s New Free-Standing KItchen Range...
Think you accidentally left the oven on? Switch it off while on the go. The new free-standing Profile™ Series gas and electric ranges are GE’s second cooking appliances, following their wall oven, to... Read more
Parallels Announces Parallels Desktop 10 for...
The no. 1-selling software for running Windows applications on a Mac becomes an even easier choice for millions of consumers and IT professionals worldwide with the launch of the most powerful... Read more
Apple now offering certified refurbished 2014...
 The Apple Store is now offering Apple Certified Refurbished 2014 MacBook Airs for up to $180 off the cost of new models. An Apple one-year warranty is included with each MacBook, and shipping is... Read more

Jobs Board

*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
Position Opening at *Apple* - Apple (United...
**Job Summary** As more and more people discover Apple , they visit our stores seeking ways to incorporate our products into their lives. It's your job, as a Store Read more
Position Opening at *Apple* - Apple (United...
…Summary** As a Specialist, you help create the energy and excitement around Apple products, providing the right solutions and getting products into customers' hands. You Read more
Project Manager, *Apple* Financial Services...
**Job Summary** Apple Financial Services (AFS) offers consumers, businesses and educational institutions ways to finance Apple purchases. We work with national and Read more
*Apple* Solutions Consultant (ASC)- Retail S...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.