Package com.itextpdf.svg.renderers.impl
Class TextSvgBranchRenderer
java.lang.Object
com.itextpdf.svg.renderers.impl.AbstractSvgNodeRenderer
com.itextpdf.svg.renderers.impl.TextSvgBranchRenderer
- All Implemented Interfaces:
-
ISvgTextNodeRenderer,ISvgNodeRenderer
- Direct Known Subclasses:
-
TextSvgTSpanBranchRenderer
ISvgNodeRenderer implementation for the -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected static final AffineTransformTop level transformation to flip the y-axis results in the character glyphs being mirrored, this tf corrects for this behaviourFields inherited from class com.itextpdf.svg.renderers.impl.AbstractSvgNodeRenderer
attributesAndStyles -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddChild(ISvgTextNodeRenderer child) booleanbooleanCreates a deep copy of this renderer, including it's subtree of childrenprotected voiddoDraw(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[][]final List<ISvgTextNodeRenderer>getObjectBoundingBox(SvgDrawContext context) Calculates the current object bounding box.float[]floatgetTextContentLength(float parentFontSize, PdfFont font) getTextRectangle(SvgDrawContext context, Point basePoint) Return the bounding rectangle of the text element.voidMethods inherited from class com.itextpdf.svg.renderers.impl.AbstractSvgNodeRenderer
canConstructViewPort, canElementFill, deepCopyAttributesAndStyles, draw, getAttribute, getAttributeMapCopy, getAttributeOrDefault, getCurrentFontSize, getParent, parseAbsoluteLength, setAttribute, setAttributesAndStyles, setParentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.itextpdf.svg.renderers.ISvgNodeRenderer
draw, getAttribute, getAttributeMapCopy, getParent, setAttribute, setAttributesAndStyles, setParent
-
Field Details
-
TEXTFLIP
Top level transformation to flip the y-axis results in the character glyphs being mirrored, this tf corrects for this behaviour -
performRootTransformations
protected boolean performRootTransformations
-
-
Constructor Details
-
TextSvgBranchRenderer
public TextSvgBranchRenderer()
-
-
Method Details
-
createDeepCopy
Description copied from interface:ISvgNodeRendererCreates a deep copy of this renderer, including it's subtree of children- Specified by:
-
createDeepCopyin interfaceISvgNodeRenderer - Returns:
- deep copy of this renderer
-
addChild
-
getChildren
-
getTextContentLength
- Specified by:
-
getTextContentLengthin interfaceISvgTextNodeRenderer
-
getRelativeTranslation
public float[] getRelativeTranslation()- Specified by:
-
getRelativeTranslationin interfaceISvgTextNodeRenderer
-
containsRelativeMove
public boolean containsRelativeMove()- Specified by:
-
containsRelativeMovein interfaceISvgTextNodeRenderer
-
containsAbsolutePositionChange
public boolean containsAbsolutePositionChange()- Specified by:
-
containsAbsolutePositionChangein interfaceISvgTextNodeRenderer
-
getAbsolutePositionChanges
public float[][] getAbsolutePositionChanges()- Specified by:
-
getAbsolutePositionChangesin interfaceISvgTextNodeRenderer
-
markWhiteSpaceProcessed
public void markWhiteSpaceProcessed() -
getTextRectangle
Description copied from interface:ISvgTextNodeRendererReturn the bounding rectangle of the text element.- Specified by:
-
getTextRectanglein interfaceISvgTextNodeRenderer - Parameters:
-
context- currentSvgDrawContext -
basePoint- end point of previous text element - Returns:
-
created instance of
TextRectangle
-
getObjectBoundingBox
Description copied from interface:ISvgNodeRendererCalculates the current object bounding box.- Specified by:
-
getObjectBoundingBoxin interfaceISvgNodeRenderer - Parameters:
-
context- the current context, for instance it contains current viewport and available font data - Returns:
-
the
Rectanglerepresenting the current object's bounding box, or null if bounding box is undefined
-
doDraw
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.- Specified by:
-
doDrawin classAbstractSvgNodeRenderer - Parameters:
-
context- the object that knows the place to draw this element and maintains its state
-