• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to flash two rectangles in a frame?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to flash two rectangles in a frame?


  • Subject: Re: How to flash two rectangles in a frame?
  • From: Philip Kime <email@hidden>
  • Date: Sun, 15 Mar 2009 13:53:54 -0700


On 15 Mar 2009, at 5:29 AM, Jean-Daniel Dupas wrote:

Note that if you want to get a revert effect, you can obtains it drawing white rect with the Quart "Difference Blend Mode".

http://developer.apple.com/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_images/dq_images.html

CGContextRef ctxt = [[NSGraphicsContext currentContext] graphicsPort];
CGContextSetBlendMode(ctxt, kCGBlendModeDifference);


 CGContextSetGrayFillColor(ctxt, 1, 1);
 CGContextFillRect(ctxt, NSRectToCGRect(aRect));

With a minor change, this worked perfectly - many thanks to both people who responded. I am simply unaware of a lot of the API here so hadn't looked at these functions.


PK

--
Dr Philip Kime





_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to flash two rectangles in a frame?
      • From: Kyle Sluder <email@hidden>
References: 
 >How to flash two rectangles in a frame? (From: Philip Kime <email@hidden>)
 >Re: How to flash two rectangles in a frame? (From: Graham Cox <email@hidden>)
 >Re: How to flash two rectangles in a frame? (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: Fast dictionary with integer keys?
  • Next by Date: Re: How to flash two rectangles in a frame?
  • Previous by thread: Re: How to flash two rectangles in a frame?
  • Next by thread: Re: How to flash two rectangles in a frame?
  • Index(es):
    • Date
    • Thread