public abstract class AbstractGradientSvgNodeRenderer extends NoDrawOperationSvgNodeRenderer
ISvgNodeRenderer abstract implementation for gradient tags
(<linearGradient>, <radialGradient>).attributesAndStyles| Constructor and Description |
|---|
AbstractGradientSvgNodeRenderer() |
| Modifier and Type | Method and Description |
|---|---|
abstract com.itextpdf.kernel.colors.Color |
createColor(SvgDrawContext context,
com.itextpdf.kernel.geom.Rectangle objectBoundingBox,
float objectBoundingBoxMargin,
float parentOpacity)
Creates the
Color that represents the corresponding gradient for specified object box |
protected void |
doDraw(SvgDrawContext context)
Method that will set properties to be inherited by this branch renderer's
children and will iterate over all children in order to draw them.
|
protected List<StopSvgNodeRenderer> |
getChildStopRenderers()
Construct a list of child stop renderers
|
protected com.itextpdf.kernel.geom.AffineTransform |
getGradientTransform()
Evaluates the 'gradientTransform' transformations
|
protected boolean |
isObjectBoundingBoxUnits()
Checks whether the gradient units values are on user space on use or object bounding box
|
protected com.itextpdf.kernel.colors.gradients.GradientSpreadMethod |
parseSpreadMethod()
Parses the gradient spread method
|
createDeepCopyaddChild, deepCopyChildren, getChildrencanConstructViewPort, canElementFill, deepCopyAttributesAndStyles, draw, getAttribute, getAttributeMapCopy, getAttributeOrDefault, getCurrentFontSize, getObjectBoundingBox, getParent, parseAbsoluteLength, setAttribute, setAttributesAndStyles, setParentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdraw, getAttribute, getAttributeMapCopy, getParent, setAttribute, setAttributesAndStyles, setParentprotected void doDraw(SvgDrawContext context)
AbstractBranchSvgNodeRendererdoDraw in class NoDrawOperationSvgNodeRenderercontext - the object that knows the place to draw this element and
maintains its statepublic abstract com.itextpdf.kernel.colors.Color createColor(SvgDrawContext context, com.itextpdf.kernel.geom.Rectangle objectBoundingBox, float objectBoundingBoxMargin, float parentOpacity)
Color that represents the corresponding gradient for specified object boxcontext - the current svg draw contextobjectBoundingBox - the coloring object bounding box without any adjustments
(additional stroke width or others)objectBoundingBoxMargin - the objectBoundingBoxMargin of the object bounding box
to be colored (for example - the part of stroke width
that exceeds the object bounding box, i.e. the half of stroke
width value)parentOpacity - current parent opacity modifierprotected boolean isObjectBoundingBoxUnits()
false if the 'gradientUnits' value of the gradient tag equals
to 'userSpaceOnUse', otherwise trueprotected com.itextpdf.kernel.geom.AffineTransform getGradientTransform()
AffineTransform object representing the specified gradient transformationprotected List<StopSvgNodeRenderer> getChildStopRenderers()
StopSvgNodeRenderer elements that represents the child stop valuesprotected com.itextpdf.kernel.colors.gradients.GradientSpreadMethod parseSpreadMethod()
GradientSpreadMethod specified in the gradientCopyright © 1998–2020 iText Group NV. All rights reserved.