Class BaseLineAnnotation
-
- All Implemented Interfaces:
public abstract class BaseLineAnnotation extends ShapeAnnotation
Abstract base class for PolygonAnnotation and PolylineAnnotation.
-
-
Method Summary
Modifier and Type Method Description Size
getMinimumSize()
Returns the minimum size of the annotation. List<Integer>
getDashArray()
Returns currently set dash array or null
if no pattern is set.void
setDashArray(@NonNull() List<Integer> dashes)
Sets a dash style for the line. BorderStyle
getLineStyle()
Returns currently set line drawing style. void
setLineStyle(@NonNull() BorderStyle style)
Sets current drawing style of the line. float
getLineWidth()
Gets line width/thickness. void
setLineWidth(@FloatRange(from = 0.0) float lineWidth)
Sets line width/thickness. void
updateTransformationProperties(@NonNull() RectF newBoundingBox, @NonNull() RectF oldBoundingBox)
Annotations may override this method to transform their properties (i.e. -
-
Method Detail
-
getMinimumSize
@NonNull() Size getMinimumSize()
Returns the minimum size of the annotation.
- Returns:
The minimum annotation size in PDF points.
-
getDashArray
List<Integer> getDashArray()
Returns currently set dash array or
null
if no pattern is set.- Returns:
Currently set dash array
-
setDashArray
void setDashArray(@NonNull() List<Integer> dashes)
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 should be set to DASHED and color of the line should be set with setColor.
- Parameters:
dashes
- List of integer numbers representing lengths of a pattern.
-
getLineStyle
@NonNull() BorderStyle getLineStyle()
Returns currently set line drawing style.
- Returns:
currently set line style or NONE if none is set.
-
setLineStyle
void setLineStyle(@NonNull() BorderStyle style)
Sets current drawing style of the line.
- Parameters:
style
- Line style, one of BorderStyle constants.
-
getLineWidth
float getLineWidth()
Gets line width/thickness.
- Returns:
Line width in PDF points.
-
setLineWidth
void setLineWidth(@FloatRange(from = 0.0) float lineWidth)
Sets line width/thickness.
- Parameters:
lineWidth
- Line width in PDF points.
-
updateTransformationProperties
void updateTransformationProperties(@NonNull() RectF newBoundingBox, @NonNull() RectF oldBoundingBox)
Annotations may override this method to transform their properties (i.e. points, rects, sizes) whenever the bounding box of the annotation changed.
- Parameters:
newBoundingBox
- New bounding box of the annotation (in PDF points).oldBoundingBox
- Old bounding box of the annotation (in PDF points).
-
-
-
-