A
Graphic
element can contain several geometric figures (curves, lines,...).
If you want to use this
Element
, please read the Sections 8.4 and 8.5 of
the PDF Reference Manual version 1.3 first.
drawBorder
public void drawBorder(float lineWidth,
Color color,
float llx,
float lly,
float urx,
float ury)
Draws a border
lineWidth
- linewidth of the bordercolor
- color of the borderboxllx
- lower left x coordinatelly
- lower left y coordinateurx
- upper right x coordinateury
- upper right y coordinate
drawHorizontalLine
public void drawHorizontalLine(float lineWidth,
Color color,
float x1,
float x2,
float y)
draws a horizontal line.
lineWidth
- width of the linecolor
- color of the linex1
- start position of the linex2
- end position of the liney
- y-coordinate of the line
getChunks
public ArrayList getChunks()
Gets all the chunks in this element.
- getChunks in interface Element
process
public boolean process(ElementListener listener)
Processes the element by adding it (or the different parts) to an
ElementListener
.
- process in interface Element
listener
- an ElementListener
true
if the element was processed successfully
- true if processing this object succeeded
processAttributes
public void processAttributes(float llx,
float lly,
float urx,
float ury,
float y)
Processes the attributes of this object.
llx
- lower left x coordinatelly
- lower left y coordinateurx
- upper right x coordinateury
- upper right y coordinatey
-
setBorder
public void setBorder(float linewidth,
float extraSpace)
Orders this graphic to draw a horizontal line.
linewidth
- linewidth of the borderextraSpace
- extraspace needed as marging on the page
setBorder
public void setBorder(float linewidth,
float extraSpace,
Color color)
Orders this graphic to draw a horizontal line.
linewidth
- linewidth of the borderextraSpace
- extraspace needed as marging on the pagecolor
- color of the borderbox
setHorizontalLine
public void setHorizontalLine(float linewidth,
float percentage)
Orders this graphic to draw a horizontal, centered line.
linewidth
- the line widthpercentage
- the percentage horizontal width in relation to the margins or if negative, an absolute value
setHorizontalLine
public void setHorizontalLine(float linewidth,
float percentage,
Color color)
Orders this graphic to draw a horizontal, centered line.
linewidth
- the line widthpercentage
- the percentage horizontal width in relation to the margins or if negative, an absolute valuecolor
- the color of the line
setHorizontalLine
public void setHorizontalLine(float linewidth,
float percentage,
Color color,
int align)
Orders this graphic to draw a horizontal, centered line.
linewidth
- the line widthpercentage
- the percentage horizontal width in relation to the margins or if negative, an absolute valuecolor
- the color of the linealign
- the line alignment
setHorizontalLine
public void setHorizontalLine(float linewidth,
float percentage,
int align)
Orders this graphic to draw a horizontal line with some alignment.
linewidth
- the line widthpercentage
- the percentage horizontal width in relation to the margins or if negative, an absolute valuealign
- the line alignment
type
public int type()
Gets the type of the text element.
- type in interface Element