Package com.datalogics.PDFL
Class PolyLineAnnotation
java.lang.Object
com.datalogics.PDFL.Annotation
com.datalogics.PDFL.PolyLineAnnotation
A finite number of line segments in a PDF added as an annotation. A polyline is also called a polygonal chain or piecewise linear curve. It represents a finite number of line segments where the first and last vertex are not connected. In this case, the polyline is added as an annotation to a PDF file.
-
Constructor Summary
ConstructorsConstructorDescriptionPolyLineAnnotation(Page page, Rect initialRect, List<Point> vertices) Create a new PolyLineAnnotation at the end of a page's annotation array.PolyLineAnnotation(Page page, Rect initialRect, List<Point> vertices, int addAfter) Create a new PolyLineAnnotation at a specific index in the page's annotation array. -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Generate a new appearance stream with the current annotation properties.doubleThe minimum PDF version necessary to support the features used in this annotation.doublevoidsetAnnotationFeatureLevel(double featureLevel) Removes features not supported in the supplied version number.voidsetBorderStyle(String style) voidsetBorderStyleDashPattern(List<Double> dashPattern) voidsetBorderStyleWidth(double width) voidvoidvoidsetVertices(List<Point> vertices) The vertices that define the polyline annotation, in user space.Methods inherited from class com.datalogics.PDFL.Annotation
equals, getColor, getContents, getFlags, getInteriorColor, getNormalAppearance, getOpacity, getOptionalContentMembershipDict, getPDFDict, getRect, getSubtype, getTitle, hasRichTextData, isCurrentlyVisible, setColor, setContents, setFlags, setInteriorColor, setNormalAppearance, setOpacity, setOptionalContentMembershipDict, setRect, setTitle, toString
-
Constructor Details
-
PolyLineAnnotation
Create a new PolyLineAnnotation at the end of a page's annotation array. To create a PolyLineAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position.- Parameters:
page- The page to which the PolyLineAnnotation is added.initialRect- A rectangle specifying the annotation's bounds, specified in user space coordinates.vertices- A list of points representing the coordinates of the vertices, specified in user space.
-
PolyLineAnnotation
Create a new PolyLineAnnotation at a specific index in the page's annotation array.- Parameters:
page- The page to which the annotation is added.initialRect- A rectangle specifying the annotation's bounds, specified in user space coordinates.vertices- A list of points representing the coordinates of the vertices, specified in user space.addAfter- Where to add the annotation in the page's annotation array. To add the annotation to the end of the array, pass a value of -2 or use the alternate version of this constructor that does not take an index (this is generally what you should do unless you have a need to place the annotation at a special location in the array). Passing a value of -1 adds the annotation to the beginning of the array. Passing other negative values produces undefined results.
-
-
Method Details
-
delete
public void delete()- Overrides:
deletein classAnnotation
-
generateAppearance
Generate a new appearance stream with the current annotation properties.The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance.
- Overrides:
generateAppearancein classAnnotation
-
getAnnotationFeatureLevel
public double getAnnotationFeatureLevel()The minimum PDF version necessary to support the features used in this annotation.- Overrides:
getAnnotationFeatureLevelin classAnnotation
-
setAnnotationFeatureLevel
public void setAnnotationFeatureLevel(double featureLevel) Removes features not supported in the supplied version number.- Overrides:
setAnnotationFeatureLevelin classAnnotation
-
getVertices
- Returns:
- The array of points, in order, that define the vertices of the polyline in user space coordinates.
-
setVertices
The vertices that define the polyline annotation, in user space.- Parameters:
vertices- The array of points, in order, that define the vertices of the polyline in user space coordinates.
-
getStartPointEndingStyle
-
setStartPointEndingStyle
-
getEndPointEndingStyle
-
setEndPointEndingStyle
-
getBorderStyleWidth
public double getBorderStyleWidth() -
setBorderStyleWidth
public void setBorderStyleWidth(double width) -
getBorderStyle
-
setBorderStyle
-
getBorderStyleDashPattern
-
setBorderStyleDashPattern
-