public class DoubleBorder extends Border
Border.Side
_3D_GROOVE, _3D_INSET, _3D_OUTSET, _3D_RIDGE, color, DASHED, DOTTED, DOUBLE, NO_BORDER, ROUND_DOTS, SOLID, transparentColor, type, width
Constructor and Description |
---|
DoubleBorder(Color color,
float width)
Creates a DoubleBorder with the specified width for both the two borders as the space in between them and
the specified color for the two borders.
|
DoubleBorder(Color color,
float width,
float opacity)
Creates a DoubleBorder with the specified width for both the two borders as the space in between them and
the specified color for the two borders.
|
DoubleBorder(float width)
Creates a DoubleBorder with the specified width for both the two borders as the space in between them.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(PdfCanvas canvas,
float x1,
float y1,
float x2,
float y2,
float borderRadius,
Border.Side side,
float borderWidthBefore,
float borderWidthAfter)
All borders are supposed to be drawn in such way, that inner content of the element is on the right from the
drawing direction.
|
void |
draw(PdfCanvas canvas,
float x1,
float y1,
float x2,
float y2,
float borderWidthBefore,
float borderWidthAfter)
All borders are supposed to be drawn in such way, that inner content of the element is on the right from the
drawing direction.
|
void |
drawCellBorder(PdfCanvas canvas,
float x1,
float y1,
float x2,
float y2)
Draws the border of a cell.
|
int |
getType()
Returns the type of the
border |
draw, equals, getBorderSide, getBorderSide, getColor, getIntersectionPoint, getOpacity, getWidth, hashCode, setColor, setWidth
public DoubleBorder(float width)
width
- width of the borders and the space between thempublic DoubleBorder(Color color, float width)
width
- width of the borders and the space between thempublic DoubleBorder(Color color, float width, float opacity)
width
- width of the borders and the space between thempublic void draw(PdfCanvas canvas, float x1, float y1, float x2, float y2, float borderWidthBefore, float borderWidthAfter)
All borders are supposed to be drawn in such way, that inner content of the element is on the right from the drawing direction. Borders are drawn in this order: top, right, bottom, left.
Given points specify the line which lies on the border of the content area, therefore the border itself should be drawn to the left from the drawing direction.
borderWidthBefore
and borderWidthAfter
parameters are used to
define the widths of the borders that are before and after the current border, e.g. for
the bottom border, borderWidthBefore
specifies width of the right border and
borderWidthAfter
- width of the left border. Those width are used to handle areas
of border joins.
draw
in class Border
canvas
- PdfCanvas to be written tox1
- x coordinate of the beginning point of the element side, that should be borderedy1
- y coordinate of the beginning point of the element side, that should be borderedx2
- x coordinate of the ending point of the element side, that should be borderedy2
- y coordinate of the ending point of the element side, that should be borderedborderWidthBefore
- defines width of the border that is before the current oneborderWidthAfter
- defines width of the border that is after the current onepublic void draw(PdfCanvas canvas, float x1, float y1, float x2, float y2, float borderRadius, Border.Side side, float borderWidthBefore, float borderWidthAfter)
Border
All borders are supposed to be drawn in such way, that inner content of the element is on the right from the drawing direction. Borders are drawn in this order: top, right, bottom, left.
Given points specify the line which lies on the border of the content area, therefore the border itself should be drawn to the left from the drawing direction.
borderWidthBefore
and borderWidthAfter
parameters are used to
define the widths of the borders that are before and after the current border, e.g. for
the bottom border, borderWidthBefore
specifies width of the right border and
borderWidthAfter
- width of the left border. Those width are used to handle areas
of border joins.
draw
in class Border
canvas
- PdfCanvas to be written tox1
- x coordinate of the beginning point of the element side, that should be borderedy1
- y coordinate of the beginning point of the element side, that should be borderedx2
- x coordinate of the ending point of the element side, that should be borderedy2
- y coordinate of the ending point of the element side, that should be borderedborderRadius
- border radiusside
- the Border.Side
, that represents element side, that should be borderedborderWidthBefore
- defines width of the border that is before the current oneborderWidthAfter
- defines width of the border that is after the current onepublic void drawCellBorder(PdfCanvas canvas, float x1, float y1, float x2, float y2)
drawCellBorder
in class Border
canvas
- PdfCanvas to be written tox1
- x coordinate of the beginning point of the element side, that should be borderedy1
- y coordinate of the beginning point of the element side, that should be borderedx2
- x coordinate of the ending point of the element side, that should be borderedy2
- y coordinate of the ending point of the element side, that should be borderedCopyright © 1998–2017 iText Group NV. All rights reserved.