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, setSpreadMethodpublic LinearGradientBuilder()
public LinearGradientBuilder setGradientVector(double x0, double y0, double x1, double y1)
more info)x0 - the x coordinate of the vector starty0 - the y coordinate of the vector startx1 - the x coordinate of the vector endy1 - the y coordinate of the vector endpublic 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 setpublic Point[] getGradientVector(Rectangle targetBoundingBox, AffineTransform contextTransform)
AbstractLinearGradientBuildergetGradientVector in class AbstractLinearGradientBuildertargetBoundingBox - the rectangle to be covered by constructed color in current spacecontextTransform - the current canvas transformationpublic AffineTransform getCurrentSpaceToGradientVectorSpaceTransformation(Rectangle targetBoundingBox, AffineTransform contextTransform)
AbstractLinearGradientBuildergetCurrentSpaceToGradientVectorSpaceTransformation in class AbstractLinearGradientBuildertargetBoundingBox - the rectangle to be covered by constructed color in current spacecontextTransform - the current canvas transformationnull if no additional transformation is specifiedCopyright © 1998–2023 iText Group NV. All rights reserved.