GetMatrix: Use this function to retrieve the image matrix. The image matrix is created when the image is constructed from the dstOrigin parameter. It defines the image in world-coordinate units. When a rotate, scale, or translate transformation is applied to the image graphic, the pixels of the image graphic are not transformed, but the points in the image matrix are changed instead. The GetMatrix function gives you access to the transformed image points.
GetImage: Use this function to return an instance of the image geometry that cannot be edited. The image geometry is a TGImage derived class.
GetGrafPort: Use this function to return the image port. You draw graphics into the image port to create an image graphic.
GetModifiableImage: Use this function to return an editable instance of the image geometry. The image geometry is a TGModifiableImage derived class.
ContainsMultiResolutions: This virtual function is called by the drawing port and returns False by default. You implement it in your own TImage derived class to return True if the image contains a pyramid of, or multiple scaled versions of, the image. A return value of True enables the image perform fast scales when the image draws.
GetImageBounds: This function returns the bounds of the image as it will draw including any transformations that have been applied to it. MGraphic::GetGeometricBounds returns the bounds of the image, but does not include transformations that may have been applied.
SetRasterBounds: The raster bounds is the active portion of the TGImage as shown in Figure 89. This functions sets the raster bounds. When the image is rendered, only the active portion draws. The TGModifiableImage::Resize function does this as well.
GetRasterBounds: This function returns the raster bounds as a TLongRect.
GetRequiredRasterSize: This function takes imageSizeInworldSpace, imageResolution, and orientation parameters and returns a TGPoint that represents the required raster size based on the data you supply for the parameters. The TGPoint::fX represents the width of the pixel buffer, and TGPoint::FY represents the height of the pixel buffer.
Modifiable images
TModifiableImage derives from TImage. In addition to inheriting the TImage functions described above, TModifiableImage has the pure virtual functions shown in Figure 87.
Image geometry
member functions
TGImage has functions that let you access and set the pixel buffer information. In addition to the functions shown in Figure 88, there are other TGImage functions for getting and setting the color profile, image orientation, and resolution (dots per inch). Refer to the online Class and Member function descriptions for details.
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.