Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

QuickDraw Routines

If you have existing code that directly accesses the picFrame field of the QuickDraw Picture data structure, you should use the QuickDraw function QDGetPictureBounds to get the appropriately swapped bounds for a Picture. This function is available in Mac OS X version 10.3 and later. Its prototype is as follows:

Rect * QDGetPictureBounds(
            PicHandle   picH,
            Rect        *outRect)

If you have existing code that uses the QuickDraw DeltaPoint function or the HIToolbox PinRect function (defined in MacWindows.h), make sure that you do not cast the function result to a Point data structure. The horizontal difference is returned in the low 16 bits, and the vertical difference is returned in the high 16 bits. You can obtain the horizontal and vertical values by using code similar to the following:

    Point pointDiff;
    SInt32 difference = DeltaPoint (p1, p2);
    pointDiff.h = LoWord (difference);
    pointDiff.v = HiWord (difference);

Tip: The best solution is to convert your QuickDraw code to Quartz 2D. QuickDraw was deprecated starting in Mac OS X v10.4. For help with converting to Quartz 2D, see Quartz Programming Guide for QuickDraw Developers.



< Previous PageNext Page > Hide TOC


Last updated: 2007-02-26




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.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice