GlobalAlpha Property
Class THtml5Canvas2D
The GlobalAlpha property sets or returns the current alpha or transparency value of the drawing.
Property Values
The transparency value. Must be a number between 0.0 (fully transparent) and 1.0 (no transparancy).
Example:
First, draw a red rectangle, then set transparency (GlobalAlpha) to 0.5, and then draw a green and a blue rectangle:
Canvas.FillStyle := clRed;
Canvas.FillRect(20,20,75,50);
// turn transparency on
Canvas.GlobalAlpha := 0.2;
Canvas.FillStyle := clGreen;
Canvas.FillRect(50,50,75,50);
Canvas.FillStyle := clBlue;
Canvas.FillRect(80,80,75,50);