public abstract class AbstractGradientSvgNodeRenderer extends NoDrawOperationSvgNodeRenderer
ISvgNodeRenderer abstract implementation for gradient tags (attributesAndStyles| Constructor and Description |
|---|
AbstractGradientSvgNodeRenderer() |
| Modifier and Type | Method and Description |
|---|---|
abstract Color |
createColor(SvgDrawContext context, 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 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 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)
AbstractBranchSvgNodeRenderer
doDraw in class NoDrawOperationSvgNodeRenderer
context - the object that knows the place to draw this element and maintains its state
public abstract Color createColor(SvgDrawContext context, Rectangle objectBoundingBox, float objectBoundingBoxMargin, float parentOpacity)
Color that represents the corresponding gradient for specified object box
context - the current svg draw context
objectBoundingBox - 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 modifier
protected boolean isObjectBoundingBoxUnits()
false if the 'gradientUnits' value of the gradient tag equals to 'userSpaceOnUse', otherwise true
protected AffineTransform getGradientTransform()
AffineTransform object representing the specified gradient transformation
protected List<StopSvgNodeRenderer> getChildStopRenderers()
StopSvgNodeRenderer elements that represents the child stop values
protected GradientSpreadMethod parseSpreadMethod()
GradientSpreadMethod specified in the gradient
Copyright © 1998–2020 iText Group NV. All rights reserved.