Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CG vs QuickDraw



On Jun 11, 2007, at 12:32 AM, Mike Kluev wrote:

To extent, QuickDraw was as (or even more) powerful in transparency
than Quartz is. CopyMask allowed per pixel per color component
alpha transparency!

And I can't think of a convenient way to do this in Quartz :). I would think it's possible, but I'd have to poke around in a lot of places.


CopyMask aside, plain primitives (rects, regions, etc) could also been drawn with
blend mode - per color component alpha transparency.

From what I can tell however, that requires you to obliterate what is in the destination to specify the alpha. Whereas with Quartz you can specify the alpha directly (albeit not per-component).


Those both aside however, I think in general per-component alpha processing might simply be better handled outside of either library. Quartz isn't really designed for pixels, but for areas of color. Even Images are handled conceptually as a grid of colored areas. When a "color" is your basic unit of color, rather than color components, it doesn't really make sense to break them into components to operate on each separately.

- As we saw recently there are no easy ways (as of 10.4) to create
shapes (regions of new era) from polygons, paths and bitmaps.

Of course, unless you need to communicate with HIToolbox, your welcome to use CGPathRefs for your clipping needs :).


- no easy way to mimic QD clipping handling with Quartz code (not
necessarily bad for Quartz, just a major difference).

I'm not certain what you mean by this. Quartz does have a different clipping model, but you should be able to get similar, if not exactly the same clips as you got with Quickdraw. Although you may have to use a Mask to do so.


- there was no such a thing in QuickDraw, but I naively thought
it will be in Quartz, but it is not: ability to represent
arbitrary images (vector, bitmap, different formats, drawing proc)
by a "ref".

PDF can handle most of that. No drawing procs, sorry :). If you need to interface with the toolbox, you can always convert a CGPDFPageRef to a CGImageRef in about half a dozen lines of code - although I agree that isn't convenient and you lose the advantages of PDFs.


--
Reality is what, when you stop believing in it, doesn't go away.
Failure is not an option. It is a privilege reserved for those who try.

David Duncan

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: CG vs QuickDraw (From: Mike Kluev <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.