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: Inverting a rect in Quartz



Thanks! But CGContextSetBlendMode is only in 10.4 +... anyone know of a way to do this in an app intended for, say, 10.2 and up?
I guess I could branch to the old QD method if the system is earlier, but that's mighty ugly. Surely Quartz could invert a rect before 10.4 came out?


Jeff

On Jul 3, 2008, at 11:14 PM, David Duncan wrote:



On Jul 3, 2008, at 11:02 PM, Jeff Evans wrote:

This is probably dumb in some deep sense: does Quartz contain any functional equivalent to QuickDraw's deprecated InvertRect()?
This is a very very handy and simple little call in QD, and I have not been able to find anything that does the same thing in a CGContext.


Set the blend mode to kCGBlendModeDifference and draw a white rect over the area.
--
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




-- If this email is spam, report it here: http://www.onlymyemail.com/view/?action=reportSpam&Id=MTAxOTYyOjY4MTIzNTk5MjpqZXZhbnNAYXJzLW5vdmEuY29t

_______________________________________________ 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: 
 >Inverting a rect in Quartz (From: Jeff Evans <email@hidden>)
 >Re: Inverting a rect in Quartz (From: David Duncan <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.