Version: 1.0

Posted: 2005-06-01

Build Requirements: N/A

Runtime Requirements: Mac OS X 10.4

View Source Code:

Download Sample (“MouseTracking.zip”, 119.8K)
Download Sample (“MouseTracking.dmg”, 175.0K)



Description

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.

Document Revision History

Date Notes
2005-06-01Sample code used in the WWDC 2005 Hands-On session 215 "Moving from QD to Quartz"

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.