Class StrategyBasedLinearGradientBuilder
The linear gradient builder with automatic coordinates vector evaluation for the target filled area based on configured strategy
public class StrategyBasedLinearGradientBuilder : AbstractLinearGradientBuilder
- Inheritance
-
StrategyBasedLinearGradientBuilder
- Inherited Members
Constructors
StrategyBasedLinearGradientBuilder()
Create a new instance of the builder
public StrategyBasedLinearGradientBuilder()
Methods
GetGradientStrategy()
Get the last set predefined strategy
public virtual StrategyBasedLinearGradientBuilder.GradientStrategy GetGradientStrategy()
Returns
- StrategyBasedLinearGradientBuilder.GradientStrategy
the last set predefined strategy
GetGradientVector(Rectangle, AffineTransform)
protected override Point[] GetGradientVector(Rectangle targetBoundingBox, AffineTransform contextTransform)
Parameters
targetBoundingBox
RectanglecontextTransform
AffineTransform
Returns
- Point[]
GetRotateVectorAngle()
Get the last set rotate vector angle
public virtual double GetRotateVectorAngle()
Returns
- double
the last set rotate vector angle
IsCentralRotationAngleStrategy()
Is the central rotation angle strategy was set last
public virtual bool IsCentralRotationAngleStrategy()
Returns
SetGradientDirectionAsCentralRotationAngle(double)
Set the strategy to use the minimal coordinates vector that passes through the central point of the target rectangle area, rotated by the specified amount of radians counter clockwise and covers the area to be filled.
public virtual StrategyBasedLinearGradientBuilder SetGradientDirectionAsCentralRotationAngle(double radians)
Parameters
radians
doublethe radians value to rotate the coordinates vector
Returns
- StrategyBasedLinearGradientBuilder
the current builder instance
Remarks
Set the strategy to use the minimal coordinates vector that passes through the central point of the target rectangle area, rotated by the specified amount of radians counter clockwise and covers the area to be filled. Zero angle corresponds to the vector from bottom to top.
SetGradientDirectionAsStrategy(GradientStrategy)
Set the strategy to predefined one
public virtual StrategyBasedLinearGradientBuilder SetGradientDirectionAsStrategy(StrategyBasedLinearGradientBuilder.GradientStrategy gradientStrategy)
Parameters
gradientStrategy
StrategyBasedLinearGradientBuilder.GradientStrategythe strategy to set
Returns
- StrategyBasedLinearGradientBuilder
the current builder instance