Package com.itextpdf.kernel.contrast
Class TextColorInfo
java.lang.Object
com.itextpdf.kernel.contrast.ColorInfo
com.itextpdf.kernel.contrast.TextColorInfo
Represents rendering information for a text element in contrast analysis.
-
Constructor Summary
ConstructorsConstructorDescriptionTextColorInfo(String text, String parent, Color color, Path path, float fontSize) Constructs a newTextColorInfowith the specified text properties. -
Method Summary
-
Constructor Details
-
TextColorInfo
Constructs a newTextColorInfowith the specified text properties.- Parameters:
-
text- the text content (typically a single character) being rendered -
parent- the parent text string that this text is part of, providing context -
color- the fill color of the text -
path- the geometric path defining the shape and position of the text element -
fontSize- the font size in points.
-
-
Method Details
-
getText
Gets the text content being rendered.This typically represents a single character or glyph from the PDF content stream.
- Returns:
- the text content as a String
-
getParent
Gets the parent text string that this text is part of.This provides context about the larger text block or string that contains this individual text element, which can be useful for debugging and analysis.
- Returns:
- the parent text string
-
getFontSize
public float getFontSize()Gets the font size of the text in points.- Returns:
- the font size in points
-
toString
Returns a string representation of this text render information.
-