Class ColorInfo

java.lang.Object
com.itextpdf.kernel.contrast.ColorInfo
Direct Known Subclasses:
BackgroundColorInfo, TextColorInfo

public abstract class ColorInfo extends Object
Abstract base class representing rendering information for contrast analysis.

This class encapsulates the common properties shared by all render information types used in contrast checking: the color and geometric path of the rendered element.

Subclasses should extend this class to represent specific types of rendered content, such as text or background elements.

  • Constructor Details

    • ColorInfo

      public ColorInfo (Color color, Path path)
      Constructs a new ContrastInformationRenderInfo with the specified color and path.
      Parameters:
      color - the color of the rendered element
      path - the geometric path defining the shape and position of the rendered element
  • Method Details

    • getColor

      public Color getColor()
      Gets the color of the rendered element.
      Returns:
      the color of this render information
    • getPath

      public Path getPath()
      Gets the geometric path of the rendered element.

      The path defines the shape and position of the element on the page.

      Returns:
      the path of this render information