A class representing an image icon.
![]() | PImgIcon () Create image icons. |
![]() | PImgIcon ( PCanvas & canvas, const PPixelImage & pix ) Create an image icon from the arbitrary pixel image using the canvas as the target device. |
![]() | Compare ( const PObject & obj ) const Determine if the two icons are the same. |
![]() | GetDimensions () const Get the dimensions of the image. |
![]() | Overrides from class PObject |
![]() | New functions for class |
Construction
Common functions for containers
Run Time Type functions
Comparison functions
I/O functions
Miscellaneous functions
A class representing an image icon. This differs from a PPixelImage class object in its internal representation of the pixels. The PPixelImage is a device and largely platform independent format. The PImgIcon is tied to a particular device (screen, printer etc) and platform.Generally, a PImgIcon is faster to draw but may consume limited resources. There is also less flexibility for image processing as the image pixels are not available to be modified.
For example, for X-Windows a PPixelImage is a client resource and every time it needs to be drawn the pixel data must be transfered to the X server. A PImgIcon is an X server resource and does not need this transfer so is much faster. However, as X server memory may be limited, this may not be used with impunity.
This class is typically used for small user interface images such as icons within image push buttons in a tool bar. For this purpose the images are usually created via a resource.
There is no intrinsic requirement that the image be small or drawn to the device it was created for. However, not doing this can have unexpected results, especially in colours and scaling.
PImgIcon( PCanvas & canvas, const PPixelImage & pix )
pix - Device independent image to convert. Overrides from class PObject
virtual Comparison Compare( const PObject & obj ) const
New functions for class
virtual PDim GetDimensions() const
Alphabetic index HTML hierarchy of classes or Java