public class StrategyBasedLinearGradientBuilder extends AbstractLinearGradientBuilder
Modifier and Type | Class and Description |
---|---|
static class |
StrategyBasedLinearGradientBuilder.GradientStrategy
Specifies the predefined strategies
|
ZERO_EPSILON
Constructor and Description |
---|
StrategyBasedLinearGradientBuilder()
Create a new instance of the builder
|
Modifier and Type | Method and Description |
---|---|
StrategyBasedLinearGradientBuilder.GradientStrategy |
getGradientStrategy()
Get the last set predefined strategy
|
protected Point[] |
getGradientVector(Rectangle targetBoundingBox, AffineTransform contextTransform)
Returns the base gradient vector in gradient vector space.
|
double |
getRotateVectorAngle()
Get the last set rotate vector angle
|
boolean |
isCentralRotationAngleStrategy()
Is the central rotation angle strategy was set last
|
StrategyBasedLinearGradientBuilder |
setGradientDirectionAsCentralRotationAngle(double radians)
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.
|
StrategyBasedLinearGradientBuilder |
setGradientDirectionAsStrategy(StrategyBasedLinearGradientBuilder.GradientStrategy gradientStrategy)
Set the strategy to predefined one
|
addColorStop, buildColor, createCoordinatesForNewDomain, evaluateCoveringDomain, getColorStops, getCurrentSpaceToGradientVectorSpaceTransformation, getSpreadMethod, setSpreadMethod
public StrategyBasedLinearGradientBuilder()
public StrategyBasedLinearGradientBuilder setGradientDirectionAsCentralRotationAngle(double radians)
radians
- the radians value to rotate the coordinates vector
public StrategyBasedLinearGradientBuilder setGradientDirectionAsStrategy(StrategyBasedLinearGradientBuilder.GradientStrategy gradientStrategy)
gradientStrategy
- the strategy to set
public double getRotateVectorAngle()
public StrategyBasedLinearGradientBuilder.GradientStrategy getGradientStrategy()
public boolean isCentralRotationAngleStrategy()
true
if the last strategy that has been set is a custom rotation angle
protected Point[] getGradientVector(Rectangle targetBoundingBox, AffineTransform contextTransform)
AbstractLinearGradientBuilder
getGradientVector
in class AbstractLinearGradientBuilder
targetBoundingBox
- the rectangle to be covered by constructed color in current space
contextTransform
- the current canvas transformation
Copyright © 1998–2021 iText Group NV. All rights reserved.