![]() |
PictInfo |
Header: PictUtils.h |
struct PictInfo { SInt16 version; SInt32 uniqueColors; PaletteHandle thePalette; CTabHandle theColorTable; Fixed hRes; Fixed vRes; SInt16 depth; Rect sourceRect; SInt32 textCount; SInt32 lineCount; SInt32 rectCount; SInt32 rRectCount; SInt32 ovalCount; SInt32 arcCount; SInt32 polyCount; SInt32 regionCount; SInt32 bitMapCount; SInt32 pixMapCount; SInt32 commentCount; SInt32 uniqueComments; CommentSpecHandle commentHandle; SInt32 uniqueFonts; FontSpecHandle fontHandle; Handle fontNamesHandle; SInt32 reserved1; SInt32 reserved2; }; typedef PictInfo PictInfoPtr;
The version number of the Picture Utilities, currently set to 0.
The number of colors in the picture specified to the GetPictInfo function, or the number of colors in the pixel map or bitmap specified to the GetPixMapInfo function, or the total number of colors for all the pictures, pixel maps, and bitmaps returned by the RetrievePictInfo function. The number of colors returned in this field is limited by the accuracy of the Picture Utilities color bank for color storage. See InitPickMethodProcPtr, RecordColorsProcPtr, CalcColorTableProcPtr, and DisposeColorPickMethodProcPtr for information about the Picture Utilitys color bank and about how you can create your own for selecting colors.
A handle to the resulting Palette structure if you specified to the GetPictInfo, GetPixMapInfo, or NewPictInfo function that colors be returned in a Palette structure. That Palette structure contains either the number of colors you specified to the function orif there are not that many colors in the pictures, pixel maps, or bitmapsthe number of colors found. Depending on the constant you pass in the verb parameter to the function, the Palette structure contains either the most used or the widest range of colors in the pictures, pixel maps, and bitmaps. On Macintosh computers running basic QuickDraw only, this field is always returned as NULL.
A handle to the resulting ColorTable structure if you specified to the GetPictInfo, GetPixMapInfo, or NewPictInfo function that colors be returned in a ColorTable structure. If the pictures, pixel maps, or bitmaps contain fewer colors found than you specified to the function, the unused entries in the ColorTable structure are filled with black. Depending on the constant you pass in the verb parameter to the function, the ColorTable structure contains either the most used or the widest range of colors in the pictures, pixel maps, and bitmaps. On Macintosh computers running basic QuickDraw only, this field is always returned as NULL.
If a picture has more than 256 colors or has pixel depths of 32 bits, then Color QuickDraw translates the colors in the ColorTable structure to 16-bit depths. In such a case, the returned colors might have a slight loss of resolution, and the uniqueColors field reflects the number of colors distinguishable at that pixel depth.
The horizontal resolution of the current picture, pixel map, or bitmap retrieved by the GetPictInfo or GetPixMapInfo function or the greatest horizontal resolution from all pictures, pixel maps, and bitmaps retrieved by the RetrievePictInfo function.
The vertical resolution of the current picture, pixel map, or bitmap retrieved by the GetPictInfo or GetPixMapInfo function or the greatest vertical resolution of all pictures, pixel maps, and bitmaps retrieved by the RetrievePictInfo function. Although the values of the hRes and vRes fields are usually the same, they do not have to be.
The pixel depth of the picture specified to the GetPictInfo function or the pixel map specified to the GetPixMapInfo function. When you use the RetrievePictInfo function, this field contains the deepest pixel depth of all pictures or pixel maps retrieved by the function.
The optimal bounding rectangle for displaying the picture at the resolution indicated by the hRes and vRes fields. The upper-left corner of the rectangle is always (0,0). Pictures created with the OpenCPicture function have the hRes, vRes, and sourceRect fields built into their Picture structures. For pictures created by OpenPicture, the hRes and vRes fields are set to 72 dpi, and the source rectangle is calculated using the picFrame field of the Picture structure for the picture.
The number of text strings in the picture specified to the GetPictInfo function, or the total number of text objects in all the pictures retrieved by the RetrievePictInfo function. For pixel maps and bitmaps specified to GetPixMapInfo or RetrievePictInfo, this field is set to 0.
The number of lines in the picture specified to the GetPictInfo function, or the total number of lines in all the pictures retrieved by the RetrievePictInfo function. For pixel maps and bitmaps, this field is set to 0.
The number of rectangles in the picture specified to the GetPictInfo function, or the total number of rectangles in all the pictures retrieved by the RetrievePictInfo function. For pixel maps and bitmaps, this field is set to 0.
The number of rounded rectangles in the picture specified to the GetPictInfo function, or the total number of rounded rectangles in all the pictures retrieved by the RetrievePictInfo function. For pixel maps and bitmaps, this field is set to 0.
The number of ovals in the picture specified to the GetPictInfo function, or the total number of ovals in all the pictures retrieved by the RetrievePictInfo function. For pixel maps and bitmaps, this field is set to 0.
The number of arcs and wedges in the picture specified to the GetPictInfo function, or the total number of arcs and wedges in all the pictures retrieved by the RetrievePictInfo function. For pixel maps and bitmaps, this field is set to 0.
The number of polygons in the picture specified to the GetPictInfo function, or the total number of polygons in all the pictures retrieved by the RetrievePictInfo function. For pixel maps and bitmaps, this field is set to 0.
The number of regions in the picture specified to the GetPictInfo function, or the total number of regions in all the pictures retrieved by the RetrievePictInfo function. For pixel maps and bitmaps, this field is set to 0.
The total number of bitmaps in the survey.
The total number of pixel maps in the survey.
The number of comments in the picture specified to the GetPictInfo function, or the total number of comments in all the pictures retrieved by the RetrievePictInfo function. This field is valid only if you specified to the GetPictInfo or NewPictInfo function that comments be returned in a CommentSpec structure. For pixel maps and bitmaps, this field is set to 0.
The number of picture comments that have different IDs in the picture specified to the GetPictInfo function, or the total number of picture comments with different IDs in all the pictures retrieved by the RetrievePictInfo function. This field is valid only if you specify that comments be returned in a CommentSpec structure. For pixel maps and bitmaps, this field is set to 0.
A handle to an array of CommentSpec structures. For pixel maps and bitmaps, this field is set to NULL.
The number of different fonts in the picture specified to the GetPictInfo function, or the total number of different fonts in all the pictures retrieved by the RetrievePictInfo function. For bitmap fonts, a font is a complete set of glyphs in one size, typeface, and style. For outline fonts, a font is a complete set of glyphs in one typeface and stylefor example, 12-point Geneva italic. For outline fonts, a font is a complete set of glyphs in one typeface and stylefor example, Geneva italic.
This field is valid only if you specify that fonts be returned in a FontSpec structure. For pixel maps and bitmaps, this field is set to 0.
A handle to a list of FontSpec structures. For pixel maps and bitmaps, this field is set to NULL.
A handle to the names of the fonts in the picture retrieved by the GetPictInfo function or the pictures retrieved by the RetrievePictInfo function. The offset to a particular name is stored in the nameOffset field of the FontSpec structure for that font. A font name is a name given to one font family to distinguish it from other font families.
When you use the GetPictInfo function to collect information about a picture, or when you use the GetPixMapInfo function to collect color information about a pixel map or bitmap, the function returns the information in a PictInfo structure. When you gather this information for multiple pictures, pixel maps, or bitmaps, the RetrievePictInfo function also returns a PictInfo structure containing this information.
Initially, all of the fields in a new PictInfo structure are set to NULL. Relevant fields are set to appropriate values depending on the information you request using the Picture Utilities functions.
When you are finished with this information, be sure to dispose of it. You can dispose of Palette structures by using the Palette Manager function, DisposePalette. Dispose of ColorTable structures by using the QuickDraw function, DisposeCTable. Dispose of other allocations with the Memory Manager function, DisposeHandle.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)