Package com.itextpdf.svg.css
Class SvgStrokeParameterConverter
java.lang.Object
com.itextpdf.svg.css.SvgStrokeParameterConverter
This class converts stroke related SVG parameters and attributes into those from PDF specification.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class represents PDF dash parameters. -
Method Summary
Modifier and TypeMethodDescriptionconvertStrokeDashParameters(String strokeDashArray, String strokeDashOffset, float fontSize, SvgDrawContext context) Converts stroke related SVG parameters and attributes into PDF line dash parameters.static intconvertStrokeLineCapStyle(String strokeLineCap) Converts stroke line cap style from SVG to PDF.static intconvertStrokeLineJoinStyle(String strokeLineJoin) Converts stroke line join style from SVG to PDF.static floatconvertStrokeMiterLimit(String strokeMiterLimit) Converts stroke miter limit from SVG to PDF.
-
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
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
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
Converts stroke miter limit from SVG to PDF.- Parameters:
-
strokeMiterLimit- 'stroke-miterlimit' svg property value - Returns:
- PDF miter limit
-