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, setSpreadMethodpublic StrategyBasedLinearGradientBuilder()
public StrategyBasedLinearGradientBuilder setGradientDirectionAsCentralRotationAngle(double radians)
radians - the radians value to rotate the coordinates vectorpublic StrategyBasedLinearGradientBuilder setGradientDirectionAsStrategy(StrategyBasedLinearGradientBuilder.GradientStrategy gradientStrategy)
gradientStrategy - the strategy to setpublic double getRotateVectorAngle()
public StrategyBasedLinearGradientBuilder.GradientStrategy getGradientStrategy()
public boolean isCentralRotationAngleStrategy()
true if the last strategy that has been set is a custom rotation angleprotected Point[] getGradientVector(Rectangle targetBoundingBox, AffineTransform contextTransform)
AbstractLinearGradientBuildergetGradientVector in class AbstractLinearGradientBuildertargetBoundingBox - the rectangle to be covered by constructed color in current spacecontextTransform - the current canvas transformationCopyright © 1998–2021 iText Group NV. All rights reserved.