[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Gets the index for a button image using a given state, and the effect used to draw it.
Source position: buttons.pp line 120
public procedure TButtonGlyph.GetImageIndexAndEffect( |
State: TButtonState; |
APPI: Integer; |
const ACanvasScaleFactor: Double; |
out AImageResolution: TScaledImageListResolution; |
out AIndex: Integer; |
out AEffect: TGraphicsDrawEffect |
); |
GetImageIndexAndEffect is a procedure used to get the ordinal position for the image used to render the Glyph for the class instance. In addition, it returns the image resolution for the specified display density and the drawing effect for the button State.
GetImageIndexAndEffect uses ThemeServiecs to determine if drawing effects are automatically applied to glyph images, and captures the effect in the AEffect output argument.
GetImageIndexAndEffect determines the image source and the ordinal position for the image used for the button glyph. ExternalImages and ExternalImageIndex are used (when assigned). The next available source is the resource name specified in LCLGlyphResourceName (when specified). Finally, the Images property is used (when assigned). When the image source has been determined, the correct image resolution for the value in APPI is selected and stored in AImageResolution. ImageIndexes is used to get the position for the image with the specified button State.
GetImageIndexAndEffect is used in in the implementation of the Draw method in TButtonGlyph, and in the GetGlyphSize method in TCustomSpeedButton.
|
Contains a reference to an existing list of images available for use in the Glyph property. |
|
|
Ordinal position in the external image list for the glyph image. |
|
|
Stores the standard LCL resource name used for the Glyph in the class instance. |
|
|
The list of available images for the button glyph. |
|
|
Draws the glyph for the button using the specified settings. |
|
|
GetGlyphSize - returns the size of the glyph within the specified PaintRect. |