public class TextSvgBranchRenderer extends AbstractSvgNodeRenderer implements ISvgTextNodeRenderer
ISvgNodeRenderer implementation for the <text> and <tspan> tag.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
performRootTransformations |
protected static com.itextpdf.kernel.geom.AffineTransform |
TEXTFLIP
Top level transformation to flip the y-axis results in the character glyphs being mirrored, this tf corrects for this behaviour
|
attributesAndStyles| Constructor and Description |
|---|
TextSvgBranchRenderer() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(ISvgTextNodeRenderer child) |
boolean |
containsAbsolutePositionChange() |
boolean |
containsRelativeMove() |
ISvgNodeRenderer |
createDeepCopy()
Creates a deep copy of this renderer, including it's subtree of children
|
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.
|
float[][] |
getAbsolutePositionChanges() |
List<ISvgTextNodeRenderer> |
getChildren() |
com.itextpdf.kernel.geom.Rectangle |
getObjectBoundingBox(SvgDrawContext context)
Calculates the current object bounding box.
|
float[] |
getRelativeTranslation() |
float |
getTextContentLength(float parentFontSize,
com.itextpdf.kernel.font.PdfFont font) |
TextRectangle |
getTextRectangle(SvgDrawContext context,
com.itextpdf.kernel.geom.Point basePoint)
Return the bounding rectangle of the text element.
|
void |
markWhiteSpaceProcessed() |
canConstructViewPort, canElementFill, deepCopyAttributesAndStyles, draw, getAttribute, getAttributeMapCopy, getAttributeOrDefault, getCurrentFontSize, getParent, parseAbsoluteLength, setAttribute, setAttributesAndStyles, setParentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdraw, getAttribute, getAttributeMapCopy, getParent, setAttribute, setAttributesAndStyles, setParentprotected static final com.itextpdf.kernel.geom.AffineTransform TEXTFLIP
protected boolean performRootTransformations
public ISvgNodeRenderer createDeepCopy()
ISvgNodeRenderercreateDeepCopy in interface ISvgNodeRendererpublic final void addChild(ISvgTextNodeRenderer child)
public final List<ISvgTextNodeRenderer> getChildren()
public float getTextContentLength(float parentFontSize,
com.itextpdf.kernel.font.PdfFont font)
getTextContentLength in interface ISvgTextNodeRendererpublic float[] getRelativeTranslation()
getRelativeTranslation in interface ISvgTextNodeRendererpublic boolean containsRelativeMove()
containsRelativeMove in interface ISvgTextNodeRendererpublic boolean containsAbsolutePositionChange()
containsAbsolutePositionChange in interface ISvgTextNodeRendererpublic float[][] getAbsolutePositionChanges()
getAbsolutePositionChanges in interface ISvgTextNodeRendererpublic void markWhiteSpaceProcessed()
public TextRectangle getTextRectangle(SvgDrawContext context, com.itextpdf.kernel.geom.Point basePoint)
ISvgTextNodeRenderergetTextRectangle in interface ISvgTextNodeRenderercontext - current SvgDrawContextbasePoint - end point of previous text elementTextRectanglepublic com.itextpdf.kernel.geom.Rectangle getObjectBoundingBox(SvgDrawContext context)
ISvgNodeRenderergetObjectBoundingBox in interface ISvgNodeRenderercontext - the current context, for instance it contains current viewport and available
font dataRectangle representing the current object's bounding box, or null
if bounding box is undefinedprotected void doDraw(SvgDrawContext context)
doDraw in class AbstractSvgNodeRenderercontext - the object that knows the place to draw this element and
maintains its stateCopyright © 1998–2021 iText Group NV. All rights reserved.