Package com.itextpdf.tool.xml.css.apply
Class ImageCssApplier
java.lang.Object
com.itextpdf.tool.xml.css.apply.ImageCssApplier
- All Implemented Interfaces:
CssApplier<Image>
Class that applies the parsed CSS to an Image object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionApplies CSS to an Image.apply
(Image img, Tag tag, MarginMemory mm, PageSizeContainable psc, HtmlPipelineContext ctx) Styles an element
-
Constructor Details
-
ImageCssApplier
public ImageCssApplier()
-
-
Method Details
-
apply
Applies CSS to an Image. Currently supported: - width - height - borders (color, width) - spacing before and after- Parameters:
img
- the imagetag
- the tag with the css- Returns:
- a styled Image
-
apply
public Image apply(Image img, Tag tag, MarginMemory mm, PageSizeContainable psc, HtmlPipelineContext ctx) Description copied from interface:CssApplier
Styles an element- Specified by:
apply
in interfaceCssApplier<Image>
- Parameters:
img
- the elementtag
- the tagmm
- the MarginMemorypsc
- the PageSizeContainablectx
- the HtmlPipelineContext- Returns:
- a styled
Paragraph
-