public class FixedDashedBorder extends Border
Border.Side
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_UNITS_VALUE
Default dash unitsOn and unitsOff value.
|
_3D_GROOVE, _3D_INSET, _3D_OUTSET, _3D_RIDGE, DASHED, DASHED_FIXED, DOTTED, DOUBLE, NO_BORDER, ROUND_DOTS, SOLID, transparentColor, type, width
Constructor and Description |
---|
FixedDashedBorder(Color color,
float width)
Creates a FixedDashedBorder with the specified width and the specified color.
|
FixedDashedBorder(Color color,
float width,
float opacity)
Creates a FixedDashedBorder with the specified width, color and opacity.
|
FixedDashedBorder(Color color,
float width,
float unitsOn,
float unitsOff,
float phase)
Creates a FixedDashedBorder with the specified width, color, unitsOn, unitsOff and phase.
|
FixedDashedBorder(Color color,
float width,
float opacity,
float unitsOn,
float unitsOff,
float phase)
Creates a FixedDashedBorder with the specified width, color, opacity, unitsOn, unitsOff and phase.
|
FixedDashedBorder(float width)
Creates a FixedDashedBorder with the specified width.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(PdfCanvas canvas,
float x1,
float y1,
float x2,
float y2,
Border.Side defaultSide,
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 horizontalRadius1,
float verticalRadius1,
float horizontalRadius2,
float verticalRadius2,
Border.Side defaultSide,
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,
Border.Side defaultSide)
Draws the border of a cell.
|
int |
getType()
Returns the type of the
border |
draw, draw, drawDiscontinuousBorders, equals, getBorderSide, getColor, getDotsGap, getIntersectionPoint, getOpacity, getStartingPointsForBorderSide, getWidth, hashCode, setColor, setWidth
public static final float DEFAULT_UNITS_VALUE
public FixedDashedBorder(float width)
width
- width of the borderpublic FixedDashedBorder(Color color, float width)
color
- color of the borderwidth
- width of the borderpublic FixedDashedBorder(Color color, float width, float opacity)
color
- color of the borderwidth
- width of the borderopacity
- the opacity which border should havepublic FixedDashedBorder(Color color, float width, float unitsOn, float unitsOff, float phase)
color
- color of the borderwidth
- width of the borderunitsOn
- the number of units that must be 'on'unitsOff
- the number of units that must be 'off'phase
- the value of the phasepublic FixedDashedBorder(Color color, float width, float opacity, float unitsOn, float unitsOff, float phase)
color
- color of the borderwidth
- width of the borderopacity
- the opacity which border should haveunitsOn
- the number of units that must be 'on'unitsOff
- the number of units that must be 'off'phase
- the value of the phasepublic void draw(PdfCanvas canvas, float x1, float y1, float x2, float y2, Border.Side defaultSide, float borderWidthBefore, float borderWidthAfter)
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 bordereddefaultSide
- the Border.Side
, that we will fallback to, if it cannot be determined by border coordinatesborderWidthBefore
- 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 horizontalRadius1, float verticalRadius1, float horizontalRadius2, float verticalRadius2, Border.Side defaultSide, float borderWidthBefore, float borderWidthAfter)
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.
horizontalRadius1
, verticalRadius1
, horizontalRadius2
and verticalRadius2
are used to draw rounded borders.
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 borderedhorizontalRadius1
- defines the horizontal radius of the border's first cornerverticalRadius1
- defines the vertical radius of the border's first cornerhorizontalRadius2
- defines the horizontal radius of the border's second cornerverticalRadius2
- defines the vertical radius of the border's second cornerdefaultSide
- the Border.Side
, that we will fallback to, if it cannot be determined by border coordinatesborderWidthBefore
- 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, Border.Side defaultSide)
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 bordereddefaultSide
- the Border.Side
, that we will fallback to, if it cannot be determined by border coordinatesCopyright © 1998–2021 iText Group NV. All rights reserved.