Back to DOM
IPathShadeInterface
Definition
- Namespace
- DOM.Abstracts.Interfaces.Elements.Graphics.Colors
- Assembly
- DOM.dll
Defines the contract for a path-based gradient shade.
Remarks
A path shade describes a gradient that follows a shape's contour (circular, rectangular, or shape-specific) rather than a straight line. Implementations expose a fill rectangle (which defines the area that receives the gradient) and a value that selects the shape of the path. PathShadeTypeValues The concrete class is the standard implementation used by . PathShade PathShade
Examples
csharp
1// 1. Circular path shade
2IPathShade shade = new PathShade
3{
4 PathShadeType = PathShadeTypeValues.circle,
5 FillToRectangle = new FillToRectangle { Top = 0, Left = 0, Right = 100, Bottom = 100 }
6};
7
csharp
1// 2. Rectangular path shade
2IPathShade shade = new PathShade { PathShadeType = PathShadeTypeValues.rect };
3
csharp
1// 3. Shape-following path shade
2IPathShade shade = new PathShade { PathShadeType = PathShadeTypeValues.shape };
3
csharp
1// 4. Use within a gradient
2var gradient = new Gradient { PathShade = new PathShade { PathShadeType = PathShadeTypeValues.circle } };
3
Properties
FillToRectangleIFillToRectangle
Gets or sets the rectangle that defines the region receiving the gradient.
PathShadeTypePathShadeTypeValues
Gets or sets the type of path shade (circular, rectangular, or shape-based).