Class PolyLineAnnotation
- java.lang.Object
-
- com.pdftools.toolbox.internal.NativeBase
-
- com.pdftools.toolbox.internal.NativeObject
-
- com.pdftools.toolbox.pdf.annotations.Annotation
-
- com.pdftools.toolbox.pdf.annotations.MarkupAnnotation
-
- com.pdftools.toolbox.pdf.annotations.DrawingAnnotation
-
- com.pdftools.toolbox.pdf.annotations.PolyLineAnnotation
-
public class PolyLineAnnotation extends DrawingAnnotation
A drawing annotation that consists of several line segments
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PolyLineAnnotationcreate(Document targetDocument, Path path, Stroke stroke)Create a poly-line annotation.LineEndinggetEndStyle()The ending point's style (Getter)PaintgetLineEndingFill()The line ending filling paint for both start and end (Getter)LineEndinggetStartStyle()The starting point's style (Getter)-
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 PolyLineAnnotation create(Document targetDocument, Path path, Stroke stroke) throws ConformanceException, UnsupportedFeatureException
Create a poly-line annotation.
The returned poly-line 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 poly line.stroke- The stroking parameters used for stroking the poly-line. The stroking paint is used as the annotation's main paint.- Returns:
- The newly created poly-line annotation.
- Throws:
java.lang.IllegalArgumentException- if thetargetDocumenthas already been closedjava.lang.IllegalArgumentException- if thetargetDocumentis read-onlyjava.lang.IllegalArgumentException- if thetargetDocument's conformance is not PDF 2.0 and thepathargument contains curve-to operationsjava.lang.IllegalArgumentException- if thepathargument contains close-subpath or rectangle operationsUnsupportedFeatureException- if thetargetDocument's conformance is PDF 2.0 and thepathargument contains curve-to operationsjava.lang.IllegalArgumentException- if thepathargument has not been constructed with atoolbox.pdf.content.PathGeneratorjava.lang.IllegalArgumentException- if thestrokeargument is not associated with thetargetDocumentjava.lang.IllegalArgumentException- if thestroke'stoolbox.pdf.content.Stroke.getPainthas atoolbox.pdf.content.Paint.getColorSpaceother than a device color spacejava.lang.IllegalArgumentException- if thestroke'stoolbox.pdf.content.Stroke.getPainthas a non-nulltoolbox.pdf.content.Paint.getTransparencywithtoolbox.pdf.content.Transparency.getBlendModeother thantoolbox.pdf.content.BlendMode.NORMALjava.lang.IllegalArgumentException- if thestrokeargument'stoolbox.pdf.content.Stroke.getLineCapStyleis other thantoolbox.pdf.content.LineCapStyle.BUTTjava.lang.IllegalArgumentException- if thestrokeargument'stoolbox.pdf.content.Stroke.getLineJoinStyleis other thantoolbox.pdf.content.LineJoinStyle.MITERjava.lang.IllegalArgumentException- if thestrokeargument'stoolbox.pdf.content.Stroke.getMiterLimitis other than 10java.lang.IllegalArgumentException- if thestrokeargument'stoolbox.pdf.content.Stroke.getDashPhaseis other than 0ConformanceException- if the explicitly requested PDF conformance is smaller than PDF 1.5java.lang.IllegalArgumentException- iftargetDocumentisnulljava.lang.IllegalArgumentException- ifpathisnulljava.lang.IllegalArgumentException- ifstrokeisnull
-
getStartStyle
public LineEnding getStartStyle()
The starting point's style (Getter)
- Throws:
java.lang.IllegalStateException- if the object has already been closed
-
getEndStyle
public LineEnding getEndStyle()
The ending point's style (Getter)
- Throws:
java.lang.IllegalStateException- if the object has already been closed
-
getLineEndingFill
public Paint getLineEndingFill()
The line ending filling paint for both start and end (Getter)
- Throws:
java.lang.IllegalStateException- if the object has already been closed
-
-