Fill Method
Class THtml5Canvas2D
procedure Fill;
The Fill method fills the current drawing (path). The default color is black.
Tip:
Use the
FillStyle property to set a color, gradient, or pattern used to fill the drawing.
Note:
If the path is not closed, the Fill method will add a line from the last point to the startpoint of the path to close the path (like
ClosePath), and then fill the path.
Example:
Draw a 150*100 pixels rectangle, and fill it with the color red:
Canvas.Rect(0,0,150,100);
Canvas.FillStyle := clRed;
Canvas.Fill;