Class TextLeafSvgNodeRenderer

    • Field Detail

      • text

        private final Text text
    • Constructor Detail

      • TextLeafSvgNodeRenderer

        public TextLeafSvgNodeRenderer()
    • Method Detail

      • getTextContentLength

        @Deprecated
        public float getTextContentLength​(float parentFontSize,
                                          PdfFont font)
        Deprecated.
        Description copied from interface: ISvgTextNodeRenderer
        Gets text content length.
        Specified by:
        getTextContentLength in interface ISvgTextNodeRenderer
        Parameters:
        parentFontSize - parent font size
        font - current font
        Returns:
        text content length
      • getRelativeTranslation

        @Deprecated
        public float[] getRelativeTranslation()
        Deprecated.
        Description copied from interface: ISvgTextNodeRenderer
        This method is deprecated and will be replaced with new signature getRelativeTranslation(SvgDrawContext). This is needed because xMove/yMove can contain relative values, so SvgDrawContext is needed to resolve them.
        Specified by:
        getRelativeTranslation in interface ISvgTextNodeRenderer
        Returns:
        text relative translation
      • containsRelativeMove

        @Deprecated
        public boolean containsRelativeMove()
        Deprecated.
        Description copied from interface: ISvgTextNodeRenderer
        This method is deprecated and will be replaced with new signature containsRelativeMove(SvgDrawContext). This is needed because xMove/yMove can contain relative values, so SvgDrawContext is needed to resolve them.
        Specified by:
        containsRelativeMove in interface ISvgTextNodeRenderer
        Returns:
        true if there is a relative move, false otherwise
      • containsAbsolutePositionChange

        @Deprecated
        public boolean containsAbsolutePositionChange()
        Deprecated.
        Description copied from interface: ISvgTextNodeRenderer
        This method is deprecated and will be replaced with new signature containsAbsolutePositionChange(SvgDrawContext). This is needed because x/y can contain relative values, so SvgDrawContext is needed to resolve them.
        Specified by:
        containsAbsolutePositionChange in interface ISvgTextNodeRenderer
        Returns:
        true if an absolute position is specified via x/y attributes, false otherwise
      • getAbsolutePositionChanges

        @Deprecated
        public float[][] getAbsolutePositionChanges()
        Deprecated.
        Description copied from interface: ISvgTextNodeRenderer
        This method is deprecated and will be replaced with new signature getAbsolutePositionChanges(SvgDrawContext). This is needed because x/y can contain relative values, so SvgDrawContext is needed to resolve them.
        Specified by:
        getAbsolutePositionChanges in interface ISvgTextNodeRenderer
        Returns:
        text absolute position
      • getObjectBoundingBox

        public Rectangle getObjectBoundingBox​(SvgDrawContext context)
        Description copied from interface: ISvgNodeRenderer
        Calculates the current object bounding box.
        Specified by:
        getObjectBoundingBox in interface ISvgNodeRenderer
        Parameters:
        context - the current context, for instance it contains current viewport and available font data
        Returns:
        the Rectangle representing the current object's bounding box, or null if bounding box is undefined
      • doDraw

        protected void doDraw​(SvgDrawContext context)
        Description copied from class: AbstractSvgNodeRenderer
        Draws this element to a canvas-like object maintained in the context.
        Specified by:
        doDraw in class AbstractSvgNodeRenderer
        Parameters:
        context - the object that knows the place to draw this element and maintains its state
      • applyTransform

        private void applyTransform​(SvgDrawContext context)
      • applyGraphicsState

        private void applyGraphicsState​(SvgDrawContext context)