Class InkAnnotation
- java.lang.Object
-
public class InkAnnotation extends DrawingAnnotation
A free-hand drawing annotation
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InkAnnotation
create(Document targetDocument, Path path, Stroke stroke)
Create a ink annotation.-
Methods inherited from class com.pdftools.toolbox.pdf.annotations.DrawingAnnotation
getPaint, getPopup
-
Methods inherited from class com.pdftools.toolbox.pdf.annotations.MarkupAnnotation
getInfo, getLocked, getReplies
-
Methods inherited from class com.pdftools.toolbox.pdf.annotations.Annotation
copy, getBoundingBox, getHidden, getId, getNoPrint, getNoRotate, getNoZoom
-
Methods inherited from class com.pdftools.toolbox.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
create
public static InkAnnotation create(Document targetDocument, Path path, Stroke stroke) throws UnsupportedFeatureException
Create a ink annotation.
The returned ink annotation is not yet part of any page. It can be added to a page's list of annotations.- Parameters:
targetDocument
- The output document with which the returned object is associated.path
- The path of the free-hand drawing.stroke
- The stroking parameters used for stroking the line. The stroking paint is used as the annotation's main paint.- Returns:
- The newly created ink annotation.
- Throws:
java.lang.IllegalArgumentException
- if thetargetDocument
has already been closedjava.lang.IllegalArgumentException
- if thetargetDocument
is read-onlyjava.lang.IllegalArgumentException
- if thepath
argument has not been constructed with atoolbox.pdf.content.PathGenerator
java.lang.IllegalArgumentException
- if thetargetDocument
's conformance is not PDF 2.0 and thepath
argument contains curve-to operationsjava.lang.IllegalArgumentException
- if thepath
argument contains rectangle operationsUnsupportedFeatureException
- if thetargetDocument
's conformance is PDF 2.0 and thepath
argument contains curve-to operationsjava.lang.IllegalArgumentException
- if thestroke
'stoolbox.pdf.content.Stroke.getPaint
has atoolbox.pdf.content.Paint.getColorSpace
other than a device color spacejava.lang.IllegalArgumentException
- if thestroke
'stoolbox.pdf.content.Stroke.getPaint
has a non-null
toolbox.pdf.content.Paint.getTransparency
withtoolbox.pdf.content.Transparency.getBlendMode
other thantoolbox.pdf.content.BlendMode.NORMAL
java.lang.IllegalArgumentException
- if thestroke
argument'stoolbox.pdf.content.Stroke.getLineCapStyle
is other thantoolbox.pdf.content.LineCapStyle.BUTT
java.lang.IllegalArgumentException
- if thestroke
argument'stoolbox.pdf.content.Stroke.getLineJoinStyle
is other thantoolbox.pdf.content.LineJoinStyle.MITER
java.lang.IllegalArgumentException
- if thestroke
argument'stoolbox.pdf.content.Stroke.getMiterLimit
is other than 10java.lang.IllegalArgumentException
- if thestroke
argument's dash array is not emptyjava.lang.IllegalArgumentException
- if thestroke
argument'stoolbox.pdf.content.Stroke.getDashPhase
is other than 0java.lang.IllegalArgumentException
- if thestroke
argument is not associated with thetargetDocument
java.lang.IllegalArgumentException
- iftargetDocument
isnull
java.lang.IllegalArgumentException
- ifpath
isnull
java.lang.IllegalArgumentException
- ifstroke
isnull
-
-