interface RectStyle {
    antiAlias?: boolean;
    blendMode?: BlendMode;
    border?: boolean;
    borderColor?: Color;
    borderShader?: Shader;
    borderWidth?: number;
    cap?: StrokeCap;
    color?: Color;
    fill?: boolean;
    fillColor?: Color;
    fillShader?: Shader;
    interval?: number[];
    join?: StrokeJoin;
    layout?: Layout;
    margin?: number | [number, number, number, number] | [number, number];
    offset?: number;
    radius?: number | [number, number, number, number] | [number, number] | [number, number, number, number, number, number, number, number];
    rotation?: number;
    scaleX?: number;
    scaleY?: number;
    shader?: Shader;
    transparency?: number;
}

Hierarchy (view full)

Properties

antiAlias?: boolean
blendMode?: BlendMode
border?: boolean
borderColor?: Color
borderShader?: Shader
borderWidth?: number
cap?: StrokeCap
color?: Color
fill?: boolean
fillColor?: Color
fillShader?: Shader
interval?: number[]
join?: StrokeJoin
layout?: Layout
margin?: number | [number, number, number, number] | [number, number]
offset?: number
radius?: number | [number, number, number, number] | [number, number] | [number, number, number, number, number, number, number, number]

The corner radius of the rectangle.

Default

0

Description

The corner radius can be a single number, in which case all corners will have the same radius. It can also be an array of 2 numbers, in which case the first number will be the radius of the top-left and top-right corners, and the second number will be the radius of the bottom-left and bottom-right corners. It can also be an array of 4 numbers, in which case the first number will be the radius of the top-left corner, the second number will be the radius of the top-right corner, the third number will be the radius of the bottom-right corner, and the fourth number will be the radius of the bottom-left corner. It can also be an array of 8 numbers, in which case in order, the numbers will be radiusX, radiusY for upper-left, upper-right, lower-right, lower-left.

rotation?: number
scaleX?: number
scaleY?: number
shader?: Shader
transparency?: number