iText 8.0.4 API
iText.Svg.Renderers.Impl.TextLeafSvgNodeRenderer Class Reference

iText.Svg.Renderers.ISvgNodeRenderer implementation for drawing text to a canvas. More...

Inheritance diagram for iText.Svg.Renderers.Impl.TextLeafSvgNodeRenderer:
iText.Svg.Renderers.Impl.AbstractSvgNodeRenderer iText.Svg.Renderers.Impl.ISvgTextNodeRenderer iText.Svg.Renderers.ISvgNodeRenderer iText.Svg.Renderers.ISvgNodeRenderer

Public Member Functions

override ISvgNodeRenderer  CreateDeepCopy ()
  Creates a deep copy of this renderer, including it's subtree of children More...
 
virtual float  GetTextContentLength (float parentFontSize, PdfFont font)
 
virtual float[]  GetRelativeTranslation ()
 
virtual bool  ContainsRelativeMove ()
 
virtual bool  ContainsAbsolutePositionChange ()
 
virtual float[][]  GetAbsolutePositionChanges ()
 
virtual TextRectangle  GetTextRectangle (SvgDrawContext context, Point basePoint)
  Return the bounding rectangle of the text element. More...
 
override Rectangle  GetObjectBoundingBox (SvgDrawContext context)
  Calculates the current object bounding box. More...
 
- Public Member Functions inherited from iText.Svg.Renderers.Impl.AbstractSvgNodeRenderer
virtual void  SetParent (ISvgNodeRenderer parent)
  Sets the parent of this renderer. More...
 
virtual ISvgNodeRenderer  GetParent ()
  Gets the parent of this renderer. More...
 
virtual void  SetAttributesAndStyles (IDictionary< String, String > attributesAndStyles)
  Sets the map of XML node attributes and CSS style properties that this renderer needs. More...
 
virtual String  GetAttribute (String key)
  Retrieves the property value for a given key name. More...
 
virtual String  GetAttributeOrDefault (String key, String defaultValue)
  Retrieves the property value for a given key name or default if the property value is null or missing. More...
 
virtual void  SetAttribute (String key, String value)
  Sets a property key and value pairs for a given attribute More...
 
virtual IDictionary< String, String >  GetAttributeMapCopy ()
  Get a modifiable copy of the style and attribute map More...
 
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. More...
 
virtual bool  CanConstructViewPort ()
  Method to see if the renderer can create a viewport More...
 
virtual float  GetCurrentFontSize ()
  Return font-size of the current element More...
 

Detailed Description

iText.Svg.Renderers.ISvgNodeRenderer implementation for drawing text to a canvas.

Member Function Documentation

◆ CreateDeepCopy()

override ISvgNodeRenderer iText.Svg.Renderers.Impl.TextLeafSvgNodeRenderer.CreateDeepCopy ( )
inlinevirtual

Creates a deep copy of this renderer, including it's subtree of children

Returns
deep copy of this renderer

Implements iText.Svg.Renderers.Impl.AbstractSvgNodeRenderer.

◆ GetObjectBoundingBox()

override Rectangle iText.Svg.Renderers.Impl.TextLeafSvgNodeRenderer.GetObjectBoundingBox ( SvgDrawContext  context )
inlinevirtual

Calculates the current object bounding box.

Parameters
context the current context, for instance it contains current viewport and available font data
Returns
the iText.Kernel.Geom.Rectangle representing the current object's bounding box, or null if bounding box is undefined

Implements iText.Svg.Renderers.Impl.AbstractSvgNodeRenderer.

◆ GetTextRectangle()

virtual TextRectangle iText.Svg.Renderers.Impl.TextLeafSvgNodeRenderer.GetTextRectangle ( SvgDrawContext  context,
Point  basePoint 
)
inlinevirtual

Return the bounding rectangle of the text element.

Parameters
context current iText.Svg.Renderers.SvgDrawContext
basePoint end point of previous text element
Returns
created instance of iText.Svg.Utils.TextRectangle

Implements iText.Svg.Renderers.Impl.ISvgTextNodeRenderer.