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 10, 2007, at 08:37 PM, mark wrote:

I'm curious. Is QD implemented on top of CG or is it seperate?

Quickdraw is a separate implementation.

On Jun 10, 2007, at 08:43 PM, Steve Mills wrote:
If I remember correctly, it's been pointed out before that adding 0.5 won't always work, like when 1 pixel does not equal 1 screen pixel. Scalable UI or future hi-res displays, that sort of thing. That's why I always prefer to turn off antialiasing when I need to do this.

For resolution independence, you should be able to use the CGContextConvert[Point|Size|Rect]To[Device|User]Space() APIs (they are at the bottom of CGContext.h) to get alignment while retaining anti-aliasing.


On Jun 10, 2007, at 08:51 PM, Steve Mills wrote:
The old xor drawing mode of QD went away with Quartz, although I think they finally added it back within the last year or so, although I can't find it now. Sure, in most cases repeatedly erasing and redrawing path sketches when creating/reshaping a shape is fine and not a big hit on performance, but QD's xor drawing produced results that were easier to see and understand, like when a frame covers the bits beneath it that you're trying to see; QD simply inverted them so you could still tell what they were, but drawing with Quartz over the top obliterates them.

The technique for getting something xor-like is to use the kCGBlendModeDifference blend mode. You set that as the current blend mode and then draw in white over the area whose color you wish to invert. Blend modes are available in 10.4 or later and can do quite a bit =).
--
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: 
 >CG vs QuickDraw (From: Ingemar Ragnemalm <email@hidden>)
 >Re: CG vs QuickDraw (From: Philip Aker <email@hidden>)
 >Re: CG vs QuickDraw (From: "Anders Markussen" <email@hidden>)
 >Re: CG vs QuickDraw (From: Philip Aker <email@hidden>)
 >Re: CG vs QuickDraw (From: "Anders Markussen" <email@hidden>)
 >Re: CG vs QuickDraw (From: Philip Aker <email@hidden>)
 >Re: CG vs QuickDraw (From: mark <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.