public class PolygonAnnotation extends DrawingAnnotation
| Modifier and Type | Method and Description |
|---|---|
static PolygonAnnotation |
create(Document targetDocument,
Path path,
Stroke stroke,
Paint fill)
Create a polygon annotation.
|
static PolygonAnnotation |
createDynamicObject(long handle) |
Paint |
getFill()
The filling paint (Getter)
|
getPaint, getPopupgetInfo, getLocked, getRepliescopy, getBoundingBox, getHidden, getNoPrint, getNoRotate, getNoZoomequals, hashCodepublic static PolygonAnnotation createDynamicObject(long handle)
public static PolygonAnnotation create(Document targetDocument, Path path, Stroke stroke, Paint fill) throws ConformanceException, UnsupportedFeatureException
targetDocument - The output document with which the returned object is associated.path - The path of the polygon.stroke - The stroking parameters used for stroking the polygon.
The stroking paint is used as the annotation's main paint.
If null then the polygon is not filled.fill - The paint used for filling the polygon.
If null then the polygon is not filled.java.lang.IllegalArgumentException - if the targetDocument is nulljava.lang.IllegalArgumentException - if the targetDocument has already been closedjava.lang.IllegalArgumentException - if the targetDocument is read-onlyjava.lang.IllegalArgumentException - if the path argument is nulljava.lang.IllegalArgumentException - if the path argument has not been constructed with a pdftoolbox.pdf.content.PathGeneratorjava.lang.IllegalArgumentException - if the targetDocument's conformance is not PDF 2.0 and the path argument contains curve-to operationsjava.lang.IllegalArgumentException - if the path argument contains close-subpath or rectangle operationsUnsupportedFeatureException - if the targetDocument's conformance is PDF 2.0 and the path argument contains curve-to operationsjava.lang.IllegalArgumentException - if the stroke and fill arguments are both nulljava.lang.IllegalArgumentException - if the stroke argument is not associated with targetDocumentjava.lang.IllegalArgumentException - if the stroke's pdftoolbox.pdf.content.Stroke.getPaint has a pdftoolbox.pdf.content.Paint.getColorSpace other than a device color spacejava.lang.IllegalArgumentException - if the stroke's pdftoolbox.pdf.content.Stroke.getPaint has a non-nullpdftoolbox.pdf.content.Paint.getTransparency with pdftoolbox.pdf.content.Transparency.getBlendMode other than pdftoolbox.pdf.content.BlendMode.NORMALjava.lang.IllegalArgumentException - if the stroke argument's pdftoolbox.pdf.content.Stroke.getLineCapStyle is other than pdftoolbox.pdf.content.LineCapStyle.BUTTjava.lang.IllegalArgumentException - if the stroke argument's pdftoolbox.pdf.content.Stroke.getLineJoinStyle is other than pdftoolbox.pdf.content.LineJoinStyle.MITERjava.lang.IllegalArgumentException - if the stroke argument's pdftoolbox.pdf.content.Stroke.getMiterLimit is other than 10java.lang.IllegalArgumentException - if the stroke argument's pdftoolbox.pdf.content.Stroke.getDashPhase is other than 0java.lang.IllegalArgumentException - if the fill has a pdftoolbox.pdf.content.Paint.getColorSpace other than a device color spacejava.lang.IllegalArgumentException - if the fill has a non-nullpdftoolbox.pdf.content.Paint.getTransparency with pdftoolbox.pdf.content.Transparency.getBlendMode other than pdftoolbox.pdf.content.BlendMode.NORMALjava.lang.IllegalArgumentException - if the fill argument is not associated with the targetDocumentConformanceException - if the explicitly requested PDF conformance is smaller than PDF 1.5public Paint getFill()
java.lang.IllegalStateException - if the object has already been closed