Chapter 5. Working with QuickDraw
And now, on to the oldest, cruftiest, yet can’t-live-without-it-iest part of QTJ: QuickDraw. QuickDraw is a graphics API that can be traced all the way back to that first Mac Steve Jobs pulled out of a bag and showed the press more than 20 years ago. You know—back when Mac supported all of two colors: black and white.
Don’t worry; it’s gotten a lot better since then.
To be fair, a native Mac OS X application being written today from scratch probably would use the shiny new "Quartz 2D” API. And as a Java developer, the included Java 2D API is at least as capable as QuickDraw, with extension packages like Java Advanced Imaging (JAI) only making things better.
The real advantage to understanding QuickDraw is that it’s what’s used to work with captured images (see Chapter 6) and individual video samples (see Chapter 8). It is also a reasonably capable graphics API in its own right, supporting import from and export to many formats (most of which J2SE lacked until 1.4), affine transformations, compositing, and more.
Getting and Saving Picts
If you
had a Mac before Mac OS X,
you probably are very familiar with
picts
, because they were the
native graphics file format on the
old Mac OS. Taking screenshots would create pict files, as would
saving your work in graphics applications. Developers used pict
resources in their applications to provide graphics, splash screens,
etc.
Actually, a number of tightly coupled concepts relate to picts. The native structure ...
Get QuickTime for Java: A Developer's Notebook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.