Back to Devexpress

TdxAlphaColor Type

vcl-dxcoregraphics-94a93f51.md

latest4.0 KB
Original Source

TdxAlphaColor Type

A 4-byte unsigned integer that stores red, green, blue, and alpha (opacity) color component values (from 0 to 255).

Declaration

delphi
TdxAlphaColor = type System.Types.DWORD;

Referenced Class

TypeDescription
DWORD

A 4-byte unsigned integer value that stores color components in ARGB (Alpha, Red, Green, and Blue) format.

This color format corresponds to the ARGB color mapping in GDI+.

|

Remarks

TdxAlphaColor is a TColor counterpart with support for transparency. All DevExpress components that allow you to specify transparent colors use this type.

How to Use TdxAlphaColor

All DevExpress controls that use TdxAlphaColor for UI element or content colors[1], automatically add the dxCoreGraphics unit to the project (no action is necessary).

If you need to use TdxAlphaColor or other color-related DevExpress types and methods in a project without such controls, add the dxCoreGraphics unit to the uses clause (in Delphi) or include the dxCoreGraphics header (HPP) to the required source code file (in C++Builder).

The TdxAlphaColors record contains multiple TdxAlphaColor constants and declares multiple color-related utility methods.

In addition, you can call the following global methods (also declared in the dxCoreGraphics unit) to work with TdxAlphaColor values:

Conversion Methods

dxAlphaColorToColor(dxCoreGraphics.TdxAlphaColor)dxAlphaColorToColor(dxCoreGraphics.TdxAlphaColor,System.Byte)Converts a specified TdxAlphaColor value to the TColor type.dxAlphaColorToRGBQuadConverts a specified TdxAlphaColor value to the TRGBQuad type.dxColorToAlphaColorConverts a specified TColor value to the TdxAlphaColor type.dxColorToRGBQuadConverts a specified TColor value to the TRGBQuad type.dxMakeAlphaColor(System.Byte,System.Byte,System.Byte)dxMakeAlphaColor(System.Byte,System.Byte,System.Byte,System.Byte)dxMakeAlphaColor(Vcl.Graphics.TColor,System.Byte)Creates a TdxAlphaColor value from individual color component values and returns it as the function’s result.dxRGBQuadToColorConverts a specified TRGBQuad value to the TColor type.

Utility Methods

dxGetAlphaExtracts the alpha value (also called transparency level) from a specified color.dxGetBlueExtracts the blue color component value from a specified color.dxGetGreenExtracts the green color component value from a specified color.dxGetRedExtracts the red color component value from a specified color.

Footnotes

  1. TdxChartControl, for example.

See Also

dxCoreGraphics Unit