Skip to main content

Border

Typeobject
Backlinks2

Define a border style of an object.

PropertyTypeRequired
classstringRequired
isEnabledbooleanRequired
colorColorOptional
fillTypeFillTypeRequired
positionBorderPositionRequired
thicknessnumberRequired
borderWeightsIndependentbooleanOptional
topWeightnumberOptional
leftWeightnumberOptional
bottomWeightnumberOptional
rightWeightnumberOptional
contextSettingsGraphicsContextSettingsRequired
gradientGradientOptional
patternPatternOptional
styleintegerRequired
dashedPatternArray<number>Required
dashedOffsetnumberRequired
lineCapStyleLineCapStyleRequired
lineJoinStyleLineJoinStyleRequired
miterLimitnumberRequired
flatnumberRequired

class​

Required

Type

string

Value

constant: the value of this property must be equal to:

"border"

isEnabled​

Required

Description

no description

Type

boolean

color​

Optional

Description

The color of the border's fill.

Type

Color

fillType​

Required

Description

The content types of the border's fill.

position​

Required

Description

The position types of the border relative to the boundary.

thickness​

Required

Description

The thickness of the border. This attribute only works if borderWeightsIndependent is set to false.

Type

number

borderWeightsIndependent​

Optional

Description

For rectangles only. If true, independent border weights for all four sides. Default value is false.

Type

boolean

topWeight​

Optional

Description

This is used only when borderWeightsIndependent is set to true, in order to specify the border weight at the top of the rectangle. Default value is 0.

Type

number

leftWeight​

Optional

Description

This is used only when borderWeightsIndependent is set to true, in order to specify the border weight at the left of the rectangle. Default value is 0.

Type

number

bottomWeight​

Optional

Description

This is used only when borderWeightsIndependent is set to true, in order to specify the border weight at the bottom of the rectangle. Default value is 0.

Type

number

rightWeight​

Optional

Description

This is used only when borderWeightsIndependent is set to true, in order to specify the border weight at the right of the rectangle. Default value is 0.

Type

number

contextSettings​

Required

Description

The opacity and blending-related configurations of the border.

gradient​

Optional

Description

The gradient of the border's fill.

pattern​

Optional

Description

The pattern of the border's fill.

style​

Required

Description

The type of the border style. The dashed style is further specified in dashedOffset and dashedPattern.

Type

integer

Value

enum: the value of this property must be equal to one of the following values:

ValueExplanation
0
solid
1
dotted
2
dashed

dashedPattern​

Required

Description

A list of values that describe the lengths of dashes (filled regions) and gaps (empty regions) in a dashed border by repeating themselves.

Type

Array<number>

dashedOffset​

Required

Description

Border dash initial offset. (applies to dashed borders) If it is positive, it is offset to the left. If it is negative, it is offset to the right. Units: pixel.

Type

number

lineCapStyle​

Required

Description

The shape styles at the end of border lines.

lineJoinStyle​

Required

Description

The shape style at the corner of two border lines.

miterLimit​

Required

Description

When the angle between two adjacent border lines is less than this value, a miter join is used instead.

Type

number

flat​

Required

Description

The flatness parameter specifies the accuracy or smoothness with which curves are rendered as a sequence of flat line segments. Default value is 0.

Type

number

Value

maximum: the value of this number must smaller than or equal to: 100

minimum: the value of this number must greater than or equal to: 0