-
Name Type Description colorColor | ColorLike | undefined 颜色、渐变或图案。有关可能的格式,请参见
Color和ColorLike。默认为 null;如果为 null,将使用 Canvas/渲染器的默认黑色。lineCapCanvasLineCap (defaults to 'round') 线端点样式:
butt、round或square。lineJoinCanvasLineJoin (defaults to 'round') 线连接样式:
bevel、round或miter。lineDashArray.<number> | undefined 虚线模式。默认为
null(无虚线)。lineDashOffsetnumber (defaults to 0) 虚线偏移。
miterLimitnumber (defaults to 10) 斜接限制。
offsetnumber | undefined 沿法线的线偏移量(像素)。正值相对于线的方向将线向右偏移。默认为
undefined(无偏移)。widthnumber | undefined 宽度。
Methods
-
克隆样式。
返回值:
The cloned style.
-
获取stroke color.
返回值:
颜色。
-
获取line cap type for the stroke.
返回值:
Line cap.
-
获取描边的虚线样式。
返回值:
Line dash.
-
获取描边的虚线偏移量。
返回值:
虚线偏移。
-
获取line join type for the stroke.
返回值:
Line join.
-
获取描边的斜接限制。
返回值:
斜接限制。
-
获取line offset in pixels.
返回值:
偏移量。
-
获取stroke width.
返回值:
宽度。
-
设置color.
Name Type Description colorColor | ColorLike 颜色。
-
设置line cap.
Name Type Description lineCapCanvasLineCap | undefined 线帽。
-
设置line dash.
Name Type Description lineDashArray.<number> | null 虚线。
-
设置line dash offset.
Name Type Description lineDashOffsetnumber | undefined 虚线偏移。
-
设置line join.
Name Type Description lineJoinCanvasLineJoin | undefined 线连接。
-
设置miter limit.
Name Type Description miterLimitnumber | undefined 斜接限制。
-
设置line offset in pixels.
Name Type Description offsetnumber | undefined 偏移量。
-
设置width.
Name Type Description widthnumber | undefined 宽度。