java.lang.Object | |||
↳ | com.pspdfkit.annotations.Annotation | ||
↳ | com.pspdfkit.annotations.ShapeAnnotation | ||
↳ | com.pspdfkit.annotations.BaseLineAnnotation |
![]() |
Abstract base class for PolygonAnnotation
and PolylineAnnotation
.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
List<Integer> |
getDashArray()
Returns currently set dash array or
null if no pattern is set. | ||||||||||
BorderStyle |
getLineStyle()
Returns currently set line drawing style.
| ||||||||||
float |
getLineWidth()
Gets line width/thickness.
| ||||||||||
Size |
getMinimumSize()
Returns the minimum size of the annotation.
| ||||||||||
void |
setDashArray(List<Integer> dashes)
Sets a dash style for the line.
| ||||||||||
void |
setLineStyle(BorderStyle style)
Sets current drawing style of the line.
| ||||||||||
void |
setLineWidth(float lineWidth)
Sets line width/thickness.
| ||||||||||
void |
updateTransformationProperties(RectF newBoundingBox, RectF oldBoundingBox)
Annotations may override this method to transform their properties (i.e.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Pair<LineEndType, LineEndType> |
getLineEnds()
Returns current line ending styles for this line.
| ||||||||||
MeasurementLabelValue |
getMeasurementLabelValue(MeasurementProperties measurementProperties)
Return the measurement label and value for this annotation if it is a measurement.
| ||||||||||
void |
setLineEnds(LineEndType lineEnd1, LineEndType lineEnd2)
Sets line ending style for this line.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Returns currently set dash array or null
if no pattern is set.
Returns currently set line drawing style.
NONE
if none is set.
Gets line width/thickness.
Returns the minimum size of the annotation.
Sets a dash style for the line. It's in form of an array where the numbers mean full_length, empty length, full_length... etc.
. The pattern is repeated.
To get a dashed line, setLineStyle(BorderStyle)
should be set to DASHED
and color of the line should be set with setColor(int)
.
dashes | List of integer numbers representing lengths of a pattern. E.g. { 2, 3 } will generate a dash pattern with lines of length 2 and empty spaces of length 3. |
---|
Sets current drawing style of the line.
style | Line style, one of BorderStyle constants.
|
---|
Sets line width/thickness.
lineWidth | Line width in PDF points. |
---|
Annotations may override this method to transform their properties (i.e. points, rects, sizes) whenever the bounding box of the annotation changed.
newBoundingBox | New bounding box of the annotation (in PDF points). |
---|---|
oldBoundingBox | Old bounding box of the annotation (in PDF points). |
Returns current line ending styles for this line.
NONE
.
Return the measurement label and value for this annotation if it is a measurement. Returns null if it's not a measurement. Overridden in child shape annotations who can be measurements. Calculates the measurement value based on the passed `measurementProperties` and shape size.
measurementProperties | the properties for this measurement. Including Scale and FloatPrecision. |
---|
Sets line ending style for this line.
lineEnd1 | LineEndType for start of this line. |
---|---|
lineEnd2 | LineEndType for end of this line.
|