public abstract class AbstractSvgNodeRenderer extends Object implements ISvgNodeRenderer
ISvgNodeRenderer abstract implementation.| Modifier and Type | Field and Description |
|---|---|
protected Map<String,String> |
attributesAndStyles
Map that contains attributes and styles used for drawing operations
|
| Constructor and Description |
|---|
AbstractSvgNodeRenderer() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConstructViewPort()
Method to see if the renderer can create a viewport
|
protected boolean |
canElementFill()
Method to see if a certain renderer can use fill.
|
protected void |
deepCopyAttributesAndStyles(ISvgNodeRenderer deepCopy)
Make a deep copy of the styles and attributes of this renderer
Helper method for deep copying logic
|
protected abstract void |
doDraw(SvgDrawContext context)
Draws this element to a canvas-like object maintained in the context.
|
void |
draw(SvgDrawContext context)
Applies transformations set to this object, if any, and delegates the drawing of this element and its children
to the
doDraw method. |
String |
getAttribute(String key)
Retrieves the property value for a given key name.
|
Map<String,String> |
getAttributeMapCopy()
Get a modifiable copy of the style and attribute map
|
ISvgNodeRenderer |
getParent()
Gets the parent of this renderer.
|
void |
setAttribute(String key,
String value)
Sets a property key and value pairs for a given attribute
|
void |
setAttributesAndStyles(Map<String,String> attributesAndStyles)
Sets the map of XML node attributes and CSS style properties that this
renderer needs.
|
void |
setParent(ISvgNodeRenderer parent)
Sets the parent of this renderer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateDeepCopypublic void setParent(ISvgNodeRenderer parent)
ISvgNodeRenderersetParent in interface ISvgNodeRendererparent - the parent rendererpublic ISvgNodeRenderer getParent()
ISvgNodeRenderergetParent in interface ISvgNodeRendererpublic void setAttributesAndStyles(Map<String,String> attributesAndStyles)
ISvgNodeRenderersetAttributesAndStyles in interface ISvgNodeRendererattributesAndStyles - the mapping from key names to valuespublic String getAttribute(String key)
ISvgNodeRenderergetAttribute in interface ISvgNodeRendererkey - the name of the property to search fornullpublic void setAttribute(String key, String value)
ISvgNodeRenderersetAttribute in interface ISvgNodeRendererkey - the name of the attributevalue - the value of the attributepublic Map<String,String> getAttributeMapCopy()
ISvgNodeRenderergetAttributeMapCopy in interface ISvgNodeRendererpublic final void draw(SvgDrawContext context)
doDraw method.draw in interface ISvgNodeRenderercontext - the object that knows the place to draw this element and maintains its stateprotected boolean canElementFill()
public boolean canConstructViewPort()
protected void deepCopyAttributesAndStyles(ISvgNodeRenderer deepCopy)
deepCopy - renderer to insert the deep copied attributes intoprotected abstract void doDraw(SvgDrawContext context)
context - the object that knows the place to draw this element and maintains its stateCopyright © 1998–2019 iText Group NV. All rights reserved.