Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
MouseTracking
Last Revision: | Version 1.0, 2005-06-01 Sample code used in the WWDC 2005 Hands-On session 215 "Moving from QD to Quartz" |
Build Requirements: | |
Runtime Requirements: | Mac OS X 10.4 |
Demonstrates solutions for various issues the come up during a QD -> Quartz conversion: a) Tracking loop to collect CGPath data: globalToLocal, HIView coordinates b) Using a CGPath and CGPathApply for drawing and clipping (vs. the QD clipRgn) c) Using a 1x1 bitmap context for hit testing d) Drag a clipped image portion around (vs. GWorlds, CopyBits, maskRgn, CopyDeepMask etc.) e) Use a masked image to remove the white background in the image (vs. CopyBits, SearchProc, BitmapToRegion etc.) f) Demonstrate two different ways to produce the masked image: CGImageCreateWithMaskingColors, and CGImageCreateWithMask, where the mask was an image created from a gray-level bitmap context.
Copyright © 2005 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2005-06-01