Class BorderStyleApplierUtil
java.lang.Object
com.itextpdf.html2pdf.css.apply.util.BorderStyleApplierUtil
Utilities class to apply border styles.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyBorders(Map<String, String> cssProps, ProcessorContext context, com.itextpdf.layout.IPropertyContainer element) Applies borders to an element.static com.itextpdf.layout.properties.BorderRadius[]getBorderRadiiArray(Map<String, String> styles, float em, float rem) Gets the array that defines the borders.static com.itextpdf.layout.borders.Border[]getBordersArray(Map<String, String> styles, float em, float rem) Gets the array that defines the borders.static com.itextpdf.layout.borders.BordergetCertainBorder(String borderWidth, String borderStyle, String borderColor, float em, float rem) Creates aBorderinstance based on specific properties.
-
Method Details
-
applyBorders
public static void applyBorders(Map<String, String> cssProps, ProcessorContext context, com.itextpdf.layout.IPropertyContainer element) Applies borders to an element.- Parameters:
-
cssProps- the CSS properties -
context- the Processor context -
element- the element
-
getBordersArray
public static com.itextpdf.layout.borders.Border[] getBordersArray(Map<String, String> styles, float em, float rem) Gets the array that defines the borders.- Parameters:
-
styles- the styles mapping -
em- the em value -
rem- the root em value - Returns:
- the borders array
-
getCertainBorder
public static com.itextpdf.layout.borders.Border getCertainBorder(String borderWidth, String borderStyle, String borderColor, float em, float rem) Creates aBorderinstance based on specific properties.- Parameters:
-
borderWidth- the border width -
borderStyle- the border style -
borderColor- the border color -
em- the em value -
rem- the root em value - Returns:
- the border
-
getBorderRadiiArray
public static com.itextpdf.layout.properties.BorderRadius[] getBorderRadiiArray(Map<String, String> styles, float em, float rem) Gets the array that defines the borders.- Parameters:
-
styles- the styles mapping -
em- the em value -
rem- the root em value - Returns:
- the borders array
-