Important: The information in this document is obsolete and should not be used for new development.
Using the Translator With QuickDraw PicturesIf you have a handle to QuickDraw picture data, such as from a file or on the Clipboard, you can convert that data into a QuickDraw GX picture shape with a single call to the QuickDraw-to-QuickDraw GX translator.
You use the
GXConvertPICTToShapefunction to translate an entire QuickDraw picture into a QuickDraw GX shape. You pass the picture handle of the QuickDraw picture you wish to translate and a reference to a shape into which the translated data is to be placed. Listing 1-4 is a sample that uses the
GXConvertPICTToShapefunction to perform the translation, and then draws the resultant picture shape to the view port specified in the view port array
Listing 1-4 Translating QuickDraw picture data with
aPicShape = GXNewShape(gxPictureType); GXConvertPICTToShape(thePicHdl, gxDefaultOptionsTranslation, &theRect, &theRect, styleStretch, aPicShape, nil); GXSetShapeViewPorts(aPicShape,1,thePorts); GXDrawShape(aPicShape); GXDisposeShape(aPicShape);