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
.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
flatten
(PdfAnnotation annotation, PdfPage page) Flatten annotation.protected Color
getColor
(PdfAnnotation annotation) static float[]
getQuadPointsAsFloatArray
(PdfAnnotation annotation) Gets the quadpoints as a float array.Methods inherited from class com.itextpdf.kernel.utils.annotationsflattening.DefaultAnnotationFlattener
createCanvas, draw
-
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:
-
flatten
in interfaceIAnnotationFlattener
- Overrides:
-
flatten
in classDefaultAnnotationFlattener
- Parameters:
-
annotation
- annotation to flatten -
page
- 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
-