public class TextLeafSvgNodeRenderer extends AbstractSvgNodeRenderer implements ISvgTextNodeRenderer
ISvgNodeRenderer
implementation for drawing text to a canvas.
attributesAndStyles
Constructor and Description |
---|
TextLeafSvgNodeRenderer() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canElementFill()
Method to see if a certain renderer can use fill.
|
boolean |
containsAbsolutePositionChange() |
boolean |
containsRelativeMove() |
ISvgNodeRenderer |
createDeepCopy()
Creates a deep copy of this renderer, including it's subtree of children
|
protected void |
doDraw(SvgDrawContext context)
Draws this element to a canvas-like object maintained in the context.
|
float[][] |
getAbsolutePositionChanges() |
Rectangle |
getObjectBoundingBox(SvgDrawContext context)
Calculates the current object bounding box.
|
float[] |
getRelativeTranslation() |
float |
getTextContentLength(float parentFontSize, PdfFont font) |
TextRectangle |
getTextRectangle(SvgDrawContext context, Point basePoint)
Return the bounding rectangle of the text element.
|
canConstructViewPort, deepCopyAttributesAndStyles, draw, getAttribute, getAttributeMapCopy, getAttributeOrDefault, getCurrentFontSize, getParent, parseAbsoluteLength, setAttribute, setAttributesAndStyles, setParent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
draw, getAttribute, getAttributeMapCopy, getParent, setAttribute, setAttributesAndStyles, setParent
public ISvgNodeRenderer createDeepCopy()
ISvgNodeRenderer
createDeepCopy
in interface ISvgNodeRenderer
public float getTextContentLength(float parentFontSize, PdfFont font)
getTextContentLength
in interface ISvgTextNodeRenderer
public float[] getRelativeTranslation()
getRelativeTranslation
in interface ISvgTextNodeRenderer
public boolean containsRelativeMove()
containsRelativeMove
in interface ISvgTextNodeRenderer
public boolean containsAbsolutePositionChange()
containsAbsolutePositionChange
in interface ISvgTextNodeRenderer
public float[][] getAbsolutePositionChanges()
getAbsolutePositionChanges
in interface ISvgTextNodeRenderer
public TextRectangle getTextRectangle(SvgDrawContext context, Point basePoint)
ISvgTextNodeRenderer
getTextRectangle
in interface ISvgTextNodeRenderer
context
- current SvgDrawContext
basePoint
- end point of previous text element
TextRectangle
public Rectangle getObjectBoundingBox(SvgDrawContext context)
ISvgNodeRenderer
getObjectBoundingBox
in interface ISvgNodeRenderer
context
- the current context, for instance it contains current viewport and available font data
Rectangle
representing the current object's bounding box, or null if bounding box is undefined
protected void doDraw(SvgDrawContext context)
AbstractSvgNodeRenderer
doDraw
in class AbstractSvgNodeRenderer
context
- the object that knows the place to draw this element and maintains its state
protected boolean canElementFill()
AbstractSvgNodeRenderer
canElementFill
in class AbstractSvgNodeRenderer
Copyright © 1998–2022 iText Group NV. All rights reserved.