Package org.jpedal.annotation
Class Line
java.lang.Object
org.jpedal.annotation.Annotation
org.jpedal.annotation.Markup
org.jpedal.annotation.Line
public final class Line
extends org.jpedal.annotation.Markup
Defines a Line annotation.
The purpose of a line annotation is to display a single straight line on the page.
-
Constructor Summary
ConstructorsConstructorDescriptionLine
(float[] rect, float[] color, float[] line) Create a new Line annotation.Line
(float[] rect, int flags, String contents, float[] color, float strokingAlpha, float nonStrokingAlpha, String title, float[] line, LineEndingStyle startStyle, LineEndingStyle endStyle, float[] endingColor, float leaderLength, float leaderExtensionLength, CaptionPosition captionPosition) Create a new Line annotation.Create a new Line annotation.Line
(float[] rect, String contents, float[] color, float[] line, CaptionPosition captionPosition) Create a new Line annotation.Line
(float[] rect, String contents, float[] color, float[] line, LineEndingStyle startStyle, LineEndingStyle endStyle, float[] endingColor, float leaderLength, float leaderExtensionLength, CaptionPosition captionPosition) Create a new Line annotation.Line
(float[] rect, String contents, float[] color, float[] line, LineEndingStyle startStyle, LineEndingStyle endStyle, float[] endingColor, CaptionPosition captionPosition) Create a new Line annotation. -
Method Summary
Modifier and TypeMethodDescriptionorg.jpedal.io.annotation.utils.AnnotDict
getDict()
Creates the annotation dictionary.Methods inherited from class org.jpedal.annotation.Annotation
getFlagsValue
-
Constructor Details
-
Line
public Line(float[] rect, float[] color, float[] line) Create a new Line annotation.- Parameters:
rect
- two diagonally opposite coordinate points that indicate the annotation's bounding boxcolor
- the color of the annotationline
- An array of four numbers, [x1 y1 x2 y2], specifying the starting and ending coordinates of the line in default user space. If the leader length is not equal to zero, this value shall represent the endpoints of the leader lines rather than the endpoints of the line itself.
-
Line
Create a new Line annotation.- Parameters:
rect
- two diagonally opposite coordinate points that indicate the annotation's bounding boxcontents
- text that shall be displayed or nullcolor
- the color of the annotationline
- An array of four numbers, [x1 y1 x2 y2], specifying the starting and ending coordinates of the line in default user space. If the leader length is not equal to zero, this value shall represent the endpoints of the leader lines rather than the endpoints of the line itself.
-
Line
public Line(float[] rect, String contents, float[] color, float[] line, CaptionPosition captionPosition) Create a new Line annotation.- Parameters:
rect
- two diagonally opposite coordinate points that indicate the annotation's bounding boxcontents
- text that shall be displayed or nullcolor
- the color of the annotationline
- An array of four numbers, [x1 y1 x2 y2], specifying the starting and ending coordinates of the line in default user space. If the leader length is not equal to zero, this value shall represent the endpoints of the leader lines rather than the endpoints of the line itself.captionPosition
- If true, the text specified by the contents entry shall be replicated as a caption in the appearance of the line. SeeCaptionPosition
-
Line
public Line(float[] rect, String contents, float[] color, float[] line, LineEndingStyle startStyle, LineEndingStyle endStyle, float[] endingColor, CaptionPosition captionPosition) Create a new Line annotation.- Parameters:
rect
- two diagonally opposite coordinate points that indicate the annotation's bounding boxcontents
- text that shall be displayed or nullcolor
- the color of the annotationline
- An array of four numbers, [x1 y1 x2 y2], specifying the starting and ending coordinates of the line in default user space. If the leader length is not equal to zero, this value shall represent the endpoints of the leader lines rather than the endpoints of the line itself.startStyle
- the start line ending style. SeeLineEndingStyle
endStyle
- the end line ending style. SeeLineEndingStyle
endingColor
- the color of the line endingcaptionPosition
- If true, the text specified by the contents entry shall be replicated as a caption in the appearance of the line. SeeCaptionPosition
-
Line
public Line(float[] rect, String contents, float[] color, float[] line, LineEndingStyle startStyle, LineEndingStyle endStyle, float[] endingColor, float leaderLength, float leaderExtensionLength, CaptionPosition captionPosition) Create a new Line annotation.- Parameters:
rect
- two diagonally opposite coordinate points that indicate the annotation's bounding boxcontents
- text that shall be displayed or nullcolor
- the color of the annotationline
- An array of four numbers, [x1 y1 x2 y2], specifying the starting and ending coordinates of the line in default user space. If the leader length is not equal to zero, this value shall represent the endpoints of the leader lines rather than the endpoints of the line itself.startStyle
- the start line ending style. SeeLineEndingStyle
endStyle
- the end line ending style. SeeLineEndingStyle
endingColor
- the color of the line endingleaderLength
- the length of the leaders linesleaderExtensionLength
- A non-negative number that shall represent the length of leader line extensions that extend from the line proper 180 degrees from the leader linescaptionPosition
- If true, the text specified by the contents entry shall be replicated as a caption in the appearance of the line. SeeCaptionPosition
-
Line
public Line(float[] rect, int flags, String contents, float[] color, float strokingAlpha, float nonStrokingAlpha, String title, float[] line, LineEndingStyle startStyle, LineEndingStyle endStyle, float[] endingColor, float leaderLength, float leaderExtensionLength, CaptionPosition captionPosition) Create a new Line annotation.- Parameters:
rect
- two diagonally opposite coordinate points that indicate the annotation's bounding boxflags
- the annotation's flags. SeeAnnotation.getFlagsValue(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean)
contents
- text that shall be displayed or nullcolor
- the color of the annotationstrokingAlpha
- the line transparency valuenonStrokingAlpha
- the fill transparency valuetitle
- the text for the title barline
- An array of four numbers, [x1 y1 x2 y2], specifying the starting and ending coordinates of the line in default user space. If the leader length is not equal to zero, this value shall represent the endpoints of the leader lines rather than the endpoints of the line itself.startStyle
- the start line ending style. SeeLineEndingStyle
endStyle
- the end line ending style. SeeLineEndingStyle
endingColor
- the color of the line endingleaderLength
- the length of the leaders linesleaderExtensionLength
- A non-negative number that shall represent the length of leader line extensions that extend from the line proper 180 degrees from the leader linescaptionPosition
- If true, the text specified by the contents entry shall be replicated as a caption in the appearance of the line. SeeCaptionPosition
-
-
Method Details
-
getDict
public org.jpedal.io.annotation.utils.AnnotDict getDict()Creates the annotation dictionary.This method is considered as not part of the public API.
- Overrides:
getDict
in classorg.jpedal.annotation.Markup
- Returns:
- a dictionary containing the relevant entries.
-