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

< Previous PageNext Page >

QuickDrawルーチン

QuickDrawのPictureデータ構造体のpicFrameフィールドに直接アクセスする既存のコードがある場合は、QuickDraw関数のQDGetPictureBoundsを使用して、Pictureの適切にスワップされた境界を取得する必要があります。この関数はMac OS X 10.3以降で利用できます。そのプロトタイプは次のとおりです。

Rect * QDGetPictureBounds(
            PicHandle   picH,
            Rect        *outRect)

QuickDrawのDeltaPoint関数、またはHIToolboxのPinRect関数(「MacWindows.h」ヘッダファイルで定義されています)を使用する既存のコードがある場合、関数の結果をPointデータ構造体へキャストしないでください。水平方向の差は下位16ビットに返され、垂直方向の差は上位16ビットに返されます。水平方向と垂直方向の値を取得するには、次のようなコードを使用します。

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

ヒント: 最善のソリューションはQuickDrawコードをQuartz 2Dに移行することです。QuickDrawはMac OS X v10.4から使用廃止になっています。Quartz 2Dへの移行については、『Quartz Programming Guide for QuickDraw Developers』を参照してください。



< Previous PageNext Page >


Last updated: 2006-03-08




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