Class SvgStrokeParameterConverter

java.lang.Object
com.itextpdf.svg.css.SvgStrokeParameterConverter

public final class SvgStrokeParameterConverter extends Object
This class converts stroke related SVG parameters and attributes into those from PDF specification.
  • Method Details

    • convertStrokeDashParameters

      public static SvgStrokeParameterConverter.PdfLineDashParameters convertStrokeDashParameters (String strokeDashArray, String strokeDashOffset, float fontSize, SvgDrawContext context)
      Converts stroke related SVG parameters and attributes into PDF line dash parameters.
      Parameters:
      strokeDashArray - 'stroke-dasharray' css property value
      strokeDashOffset - 'stroke-dashoffset' css property value
      fontSize - font size of the current element
      context - the svg draw context
      Returns:
      PDF line dash parameters represented by SvgStrokeParameterConverter.PdfLineDashParameters
    • convertStrokeLineCapStyle

      public static int convertStrokeLineCapStyle (String strokeLineCap)
      Converts stroke line cap style from SVG to PDF.
      Parameters:
      strokeLineCap - 'stroke-linecap' svg property value
      Returns:
      PDF line cap style represented by PdfCanvasConstants.LineCapStyle
    • convertStrokeLineJoinStyle

      public static int convertStrokeLineJoinStyle (String strokeLineJoin)
      Converts stroke line join style from SVG to PDF.
      Parameters:
      strokeLineJoin - 'stroke-linejoin' svg property value
      Returns:
      PDF line join style represented by PdfCanvasConstants.LineJoinStyle
    • convertStrokeMiterLimit

      public static float convertStrokeMiterLimit (String strokeMiterLimit)
      Converts stroke miter limit from SVG to PDF.
      Parameters:
      strokeMiterLimit - 'stroke-miterlimit' svg property value
      Returns:
      PDF miter limit