public class LinearGradientBuilder extends AbstractLinearGradientBuilder
more info
)
ZERO_EPSILON
Constructor and Description |
---|
LinearGradientBuilder()
Constructs the builder instance
|
Modifier and Type | Method and Description |
---|---|
AffineTransform |
getCurrentSpaceToGradientVectorSpaceTransformation(Rectangle targetBoundingBox, AffineTransform contextTransform)
Returns the current space to gradient vector space transformations that should be applied to the shading color.
|
Point[] |
getGradientVector(Rectangle targetBoundingBox, AffineTransform contextTransform)
Returns the base gradient vector in gradient vector space.
|
LinearGradientBuilder |
setCurrentSpaceToGradientVectorSpaceTransformation(AffineTransform transformation)
Set the linear gradient space transformation which specifies the transformation from the current coordinates space to gradient vector space
|
LinearGradientBuilder |
setGradientVector(double x0, double y0, double x1, double y1)
Set coordinates for gradient vector ( more info )
|
addColorStop, buildColor, createCoordinatesForNewDomain, evaluateCoveringDomain, getColorStops, getSpreadMethod, setSpreadMethod
public LinearGradientBuilder()
public LinearGradientBuilder setGradientVector(double x0, double y0, double x1, double y1)
more info
)
x0
- the x coordinate of the vector start
y0
- the y coordinate of the vector start
x1
- the x coordinate of the vector end
y1
- the y coordinate of the vector end
public LinearGradientBuilder setCurrentSpaceToGradientVectorSpaceTransformation(AffineTransform transformation)
The current space is the one on which linear gradient will be drawn (as a fill or stroke color for shapes on PDF canvas). This transformation mainly used for color lines skewing.
transformation
- the AffineTransform
representing the transformation to set
public 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
public AffineTransform getCurrentSpaceToGradientVectorSpaceTransformation(Rectangle targetBoundingBox, AffineTransform contextTransform)
AbstractLinearGradientBuilder
getCurrentSpaceToGradientVectorSpaceTransformation
in class AbstractLinearGradientBuilder
targetBoundingBox
- the rectangle to be covered by constructed color in current space
contextTransform
- the current canvas transformation
null
if no additional transformation is specified
Copyright © 1998–2023 iText Group NV. All rights reserved.