ShadowOffsetX Property
Class THtml5Canvas2D
The ShadowOffsetX property sets or returns the horizontal distance of the shadow from the shape.
Tip:
To adjust the vertical distance of the shadow from the shape, use
ShadowOffsetY .
Property Values
Property Values
A positive or negative number that defines the horizontal distance of the shadow from the shape. Defaul value: 0 .
Indicates that the shadow is right behind the shape.
ShadowOffsetX := 0;
Indicates that the shadow starts 20 pixels to the right.
ShadowOffsetX := 20;
Indicates that the shadow starts 20 pixels to the left.
ShadowOffsetX := -20;
Example:
Draw a rectangle with a shadow placed 20 pixels to the right (from the rectangle's left position):
Canvas.ShadowBlur := 10;
Canvas.ShadowOffsetX := 20;
Canvas.ShadowColor := clBlack;
Canvas.FillStyle := clRed;
Canvas.FillRect(20,20,100,80);