Class ImageCssApplier

java.lang.Object
com.itextpdf.tool.xml.css.apply.ImageCssApplier
All Implemented Interfaces:
CssApplier<Image>

public class ImageCssApplier extends Object implements CssApplier<Image>
Class that applies the parsed CSS to an Image object.
  • Constructor Details

    • ImageCssApplier

      public ImageCssApplier()
  • Method Details

    • apply

      public Image apply(Image img, Tag tag)
      Applies CSS to an Image. Currently supported: - width - height - borders (color, width) - spacing before and after
      Parameters:
      img - the image
      tag - 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 interface CssApplier<Image>
      Parameters:
      img - the element
      tag - the tag
      mm - the MarginMemory
      psc - the PageSizeContainable
      ctx - the HtmlPipelineContext
      Returns:
      a styled Paragraph