Class AbstractTextMarkupAnnotationFlattener
java.lang.Object
com.itextpdf.kernel.utils.annotationsflattening.DefaultAnnotationFlattener
com.itextpdf.kernel.utils.annotationsflattening.AbstractTextMarkupAnnotationFlattener
- All Implemented Interfaces:
IAnnotationFlattener
- Direct Known Subclasses:
HighLightTextMarkupAnnotationFlattener, SquigglyTextMarkupAnnotationFlattener, StrikeOutTextMarkupAnnotationFlattener, UnderlineTextMarkupAnnotationFlattener
This class is used to flatten text markup annotations.
Text markup annotations are:
PdfTextMarkupAnnotation.MarkupHighlight,
PdfTextMarkupAnnotation.MarkupUnderline,
PdfTextMarkupAnnotation.MarkupSquiggly,
PdfTextMarkupAnnotation.MarkupStrikeout.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static float[]convertFloatToQuadPoints(Rectangle rectangle) booleanflatten(PdfAnnotation annotation, PdfPage page) Flatten annotation.protected ColorgetColor(PdfAnnotation annotation) static float[]getQuadPointsAsFloatArray(PdfAnnotation annotation) Gets the quadpoints as a float array.Methods inherited from class DefaultAnnotationFlattener
createCanvas, draw
-
Field Details
-
AMOUNT_OF_QUAD_POINTS
private static final int AMOUNT_OF_QUAD_POINTS- See Also:
-
-
Constructor Details
-
AbstractTextMarkupAnnotationFlattener
public AbstractTextMarkupAnnotationFlattener()
-
-
Method Details
-
getQuadPointsAsFloatArray
Gets the quadpoints as a float array. if the annotation has no quadpoints, returns the annotation rectangle converted to the same notation as the quadpoints.- Parameters:
annotation- the annotation- Returns:
- the quadpoints as float array
-
flatten
Flatten annotation.- Specified by:
flattenin interfaceIAnnotationFlattener- Overrides:
flattenin classDefaultAnnotationFlattener- Parameters:
annotation- annotation to flattenpage- page to flatten annotation on- Returns:
- true if annotation was flattened, false otherwise
-
getColor
- Parameters:
annotation- the annotation to extract the color from.- Returns:
- the color or null if the colorspace is invalid
-
convertFloatToQuadPoints
-