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