Skip to main content
Pie
ra0

TcxCanvas.DrawGlyph(Integer,Integer,TBitmap,Boolean,TColor) Method

Draws a partially transparent glyph on the canvas.

Declaration

procedure DrawGlyph(X: Integer; Y: Integer; AGlyph: TBitmap; AEnabled: Boolean = True; ABackgroundColor: TColor = clNone);

Parameters

Name Type
X Integer
Y Integer
AGlyph TBitmap
AEnabled Boolean
ABackgroundColor TColor

Remarks

Call this procedure and pass a TBitmap image container as the AGlyph parameter to draw its content on the canvas. Use the X and Y parameters to define the image’s origin on the canvas.

The DrawGlyph procedure uses the AGlyph.TransparentColor value as a mask color to blend the glyph with the background. You can pass a color as the ABackgroundColor parameter to disable this transparency effect and use the specified color to draw all masked pixels of the resulting image.

Additionally, you can pass False as the optional AEnabled parameter to draw a grayscaled version of the target glyph.

See Also