Annot.BorderStyle
Modifier and Type | Field and Description |
---|---|
static int |
e_Butt
The Constant e_Butt.
|
static int |
e_Circle
The Constant e_Circle.
|
static int |
e_ClosedArrow
The Constant e_ClosedArrow.
|
static int |
e_Diamond
The Constant e_Diamond.
|
static int |
e_Inline
This integer list represents the caption position of the Line annotation.
|
static int |
e_LineArrow
This integer list represents the intent of the Line annotation.
|
static int |
e_LineDimension
The Constant e_LineDimension.
|
static int |
e_None
The Constant e_None.
|
static int |
e_null
The Constant e_null.
|
static int |
e_OpenArrow
The Constant e_OpenArrow.
|
static int |
e_RClosedArrow
The Constant e_RClosedArrow.
|
static int |
e_ROpenArrow
The Constant e_ROpenArrow.
|
static int |
e_Slash
The Constant e_Slash.
|
static int |
e_Square
For each line, one can choose a style for the start of the line
and a syle for the end of line respectively.
|
static int |
e_Top
The Constant e_Top.
|
static int |
e_Unknown
The Constant e_Unknown.
|
e_3D, e_action_trigger_activate, e_action_trigger_annot_blur, e_action_trigger_annot_down, e_action_trigger_annot_enter, e_action_trigger_annot_exit, e_action_trigger_annot_focus, e_action_trigger_annot_page_close, e_action_trigger_annot_page_invisible, e_action_trigger_annot_page_open, e_action_trigger_annot_page_visible, e_action_trigger_annot_up, e_Caret, e_down, e_FileAttachment, e_FreeText, e_hidden, e_Highlight, e_Ink, e_invisible, e_Line, e_Link, e_locked, e_locked_contents, e_Movie, e_no_rotate, e_no_view, e_no_zoom, e_normal, e_Polygon, e_Polyline, e_Popup, e_print, e_PrinterMark, e_Projection, e_read_only, e_Redact, e_RichMedia, e_rollover, e_Screen, e_Sound, e_Squiggly, e_Stamp, e_StrikeOut, e_Text, e_toggle_no_view, e_TrapNet, e_Underline, e_Watermark, e_Widget
Constructor and Description |
---|
Line()
Creates an empty Line annotation.
|
Line(Annot annot)
Creates an Line annotation and initialize it using given annotation object.
|
Line(Obj d)
Creates an Line annotation and initialize it using given Cos/SDF object.
|
Modifier and Type | Method and Description |
---|---|
static Line |
create(Doc doc,
Rect pos)
Creates a new Line annotation, in the specified document.
|
int |
getCaptionPosition()
Get the caption position of a line.
|
Point |
getEndPoint()
Get the coordinates of the end of a line.
|
int |
getEndStyle()
Get the ending syle of the end of a line.
|
int |
getIntentType()
Get the intent type of the line.
|
double |
getLeaderLineExtensionLength()
Get the leader line extension length of a line.
|
double |
getLeaderLineLength()
Get the leader line length of a line.
|
double |
getLeaderLineOffset()
Get the leader line offset length of a line.
|
boolean |
getShowCaption()
Get the option of whether to show caption.
|
Point |
getStartPoint()
Get the coordinates of the start of a line.
|
int |
getStartStyle()
Get the ending syle of the start of a line.
|
double |
getTextHOffset()
Get the horizontal offset of the caption.
|
double |
getTextVOffset()
Get the vertical offset of the caption.
|
void |
setCapPos(int style)
Set the caption position of a line.
|
void |
setEndPoint(Point ep)
Set the coordinates of the end of a line.
|
void |
setEndStyle(int est)
Set the ending syle of the end of a line
(Optional; PDF 1.4)
|
void |
setIntentType(int style)
Set the intent type of the line.
|
void |
setLeaderLineExtensionLength(double ll)
Set the leader line extension length of a line.
|
void |
setLeaderLineLength(double ll)
Set the leader line length of a line.
|
void |
setLeaderLineOffset(double ll)
Set the leader line offset length of a line.
|
void |
setShowCaption(boolean showCaption)
Set the option of whether to show caption.
|
void |
setStartPoint(Point sp)
Set the coordinates of the start of a line.
|
void |
setStartStyle(int sst)
Set the ending syle of the start of a line
(Optional; PDF 1.4.)
|
void |
setTextHOffset(double offset)
Set the horizontal offset of the caption.
|
void |
setTextVOffset(double offset)
Set the vertical offset of the caption.
|
getBorderEffect, getBorderEffectIntensity, getContentRect, getCreationDates, getInteriorColor, getInteriorColorCompNum, getOpacity, getPadding, getPopup, getSubject, getTitle, setBorderEffect, SetBorderEffectIntensity, setContentRect, setCreationDates, setInteriorColor, setOpacity, SetPadding, setPopup, setSubject, setTitle
__Create, __GetHandle, __GetRefHandle, create, equals, flatten, getActiveAppearanceState, getAppearance, getAppearance, getAppearance, getBorderStyle, getColorAsCMYK, getColorAsGray, getColorAsRGB, getColorCompNum, getContents, getDate, getFlag, getOptionalContent, getPage, getRect, getRotation, getSDFObj, GetStructParent, getTriggerAction, getType, getUniqueID, getVisibleContentBox, isMarkup, isValid, refreshAppearance, removeAppearance, resize, setActiveAppearanceState, setAppearance, setAppearance, setAppearance, setBorderStyle, setColor, setContents, setDate, setFlag, setOptionalContent, setPage, setRect, setRotation, setStructParent, setUniqueID
public static final int e_Square
public static final int e_Circle
public static final int e_Diamond
public static final int e_OpenArrow
public static final int e_ClosedArrow
public static final int e_Butt
public static final int e_ROpenArrow
public static final int e_RClosedArrow
public static final int e_Slash
public static final int e_None
public static final int e_Unknown
public static final int e_LineArrow
public static final int e_LineDimension
public static final int e_null
public static final int e_Inline
public static final int e_Top
public Line(Obj d)
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
d
- the input Cos/SDF objectpublic Line()
public Line(Annot annot) throws PDFNetException
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
annot
- the input annotation objectPDFNetException
public static Line create(Doc doc, Rect pos) throws PDFNetException
doc
- A document to which the annotation is added.pos
- A rectangle specifying the annotation's bounds, specified in
user space coordinates.PDFNetException
public Point getStartPoint() throws PDFNetException
PDFNetException
public void setStartPoint(Point sp) throws PDFNetException
sp
- A Point struct whose x entry is going to be set as the
x coordinate of the start point of the line, whose y entry is going to be set as the
y coordinate of the start point of the line.PDFNetException
public Point getEndPoint() throws PDFNetException
PDFNetException
public void setEndPoint(Point ep) throws PDFNetException
ep
- - A Point struct whose x entry is going to be set as the
x coordinate of the end point of the line, whose y entry is going to be set as the
y coordinate of the end point of the line.PDFNetException
public int getStartStyle() throws PDFNetException
Note: Default value: e_None.
PDFNetException
public void setStartStyle(int sst) throws PDFNetException
Note: Default value: e_None.
sst
- A enum value from the "EndingStyle" enum, whose value corrsponding to the ending style
of the start point.PDFNetException
public int getEndStyle() throws PDFNetException
Note: Default value: e_None.
PDFNetException
public void setEndStyle(int est) throws PDFNetException
Note: Default value: e_None.
est
- A enum value from the "EndingStyle" enum, whose value corrsponding to the ending style
of the start point.PDFNetException
public double getLeaderLineLength() throws PDFNetException
Note: usually if this entry is specified, the line is intended to be a dimension line(see "IT" entry).
Leader length is length of leader lines in default user space that extend from each endpoint of the line perpendicular to the line itself. A positive value shall mean that the leader lines appear in the direction that is clockwise when traversing the line from its starting point to its ending point (as specified by L); a negative value shall indicate the opposite direction. Default value: 0 (no leader lines)
PDFNetException
public void setLeaderLineLength(double ll) throws PDFNetException
Note: Usually if this entry is specified, the line is intended to be a dimension line(see "IT" entry).
Leader length is length of leader lines in default user space that extend from each endpoint of the line perpendicular to the line itself. A positive value shall mean that the leader lines appear in the direction that is clockwise when traversing the line from its starting point to its ending point (as specified by L); a negative value shall indicate the opposite direction. Default value: 0 (no leader lines)
ll
- the new leader line lengthPDFNetException
public double getLeaderLineExtensionLength() throws PDFNetException
Note: Usually if this entry is specified, the line is intended to be a dimension line(see "IT" entry).
The leader line extension length is a non-negative number that shall represents the length of leader line extensions that extend from the line proper 180 degrees from the leader lines. Default value: 0 (no leader line extensions)
PDFNetException
public void setLeaderLineExtensionLength(double ll) throws PDFNetException
Note: Usually if this entry is specified, the line is intended to be a dimension line(see "IT" entry).
The leader line extension length is a non-negative number that shall represents the length of leader line extensions that extend from the line proper 180 degrees from the leader lines. Default value: 0 (no leader line extensions)
ll
- the new leader line extension lengthPDFNetException
public boolean getShowCaption() throws PDFNetException
Note: If true, the text specified by the Contents or RCentries shall be replicated as a caption in the appearance of the line. The text shall be rendered in a manner appropriate to the content, taking into account factors such as writing direction. Default value: false.
PDFNetException
public void setShowCaption(boolean showCaption) throws PDFNetException
Note: If true, the text specified by the Contents or RCentries shall be replicated as a caption in the appearance of the line. The text shall be rendered in a manner appropriate to the content, taking into account factors such as writing direction. Default value: false.
showCaption
- A boolean value indicating whether the caption will be shown.PDFNetException
public int getIntentType() throws PDFNetException
Note: Intent type describes the intent of the line annotation. Valid values shall be "e_LineArrow", which means that the annotation is intended to function as an arrow, and "e_LineDimension", which means that the annotation is intended to function as a dimension line.
PDFNetException
public void setIntentType(int style) throws PDFNetException
Note: Intent type describes the intent of the line annotation. Valid values shall be "e_LineArrow", which means that the annotation is intended to function as an arrow, and "e_LineDimension", which means that the annotation is intended to function as a dimension line.6)
style
- An intent type value from the "IntentType" enum.PDFNetException
public double getLeaderLineOffset() throws PDFNetException
Note: usually if this entry is specified, the line is intended to be a dimension line(see "IT" entry).
Leader line offset number is a non-negative number that shall represent the length of the leader line offset, which is the amount of empty space between the endpoints of the annotation and the beginning of the leader lines.
PDFNetException
public void setLeaderLineOffset(double ll) throws PDFNetException
Note: Usually if this entry is specified, the line is intended to be a dimension line(see "IT" entry).
Leader line offset number is a non-negative number that shall represent the length of the leader line offset, which is the amount of empty space between the endpoints of the annotation and the beginning of the leader lines.
ll
- A number denoting the length of the leader line offset in px.PDFNetException
public int getCaptionPosition() throws PDFNetException
Note: Caption position describs the annotation's caption positioning. Valid values are e_Inline, meaning the caption shall be centered inside the line, and e_Top, meaning the caption shall be on top of the line. Default value: Inline
PDFNetException
public void setCapPos(int style) throws PDFNetException
Note: Caption position describs the annotation's caption positioning. Valid values are e_Inline, meaning the caption shall be centered inside the line, and e_Top, meaning the caption shall be on top of the line. Default value: Inline.
style
- A cap position value from the "CapPos" enum.PDFNetException
public double getTextHOffset() throws PDFNetException
Note: The horizontal offset specifies the offset of the caption text from its normal position. Specifially the horizontal offset along the annotation line from its midpoint, with a positive value indicating offset to the right and a negative value indicating offset to the left. Default value: 0 (no offset from normal horizontal positioning)
PDFNetException
public void setTextHOffset(double offset) throws PDFNetException
Note: The horizontal offset specifies the offset of the caption text from its normal position. Specifially the horizontal offset along the annotation line from its midpoint, with a positive value indicating offset to the right and a negative value indicating offset to the left. Default value: 0 (no offset from normal horizontal positioning)
offset
- A umber denoting the horizontal offset of caption in px.PDFNetException
public double getTextVOffset() throws PDFNetException
Note: The vertical offset specifies the offset of the caption text from its normal position. Specifially the vertical offset perpendicular to the annotation line, with a positive value indicating a shift up and a negative value indicating a shift down. Default value: 0(no offset from normal vertical positioning).
PDFNetException
public void setTextVOffset(double offset) throws PDFNetException
Note: The vertical offset specifies the offset of the caption text from its normal position. Specifially the vertical offset perpendicular to the annotation line, with a positive value indicating a shift up and a negative value indicating a shift down. Default value: 0(no offset from normal vertical positioning).
offset
- A number denoting the vertical offset of caption in px.PDFNetException