Skip to content

pencil.js / line / LineOptions

Interface: LineOptions ​

Defined in: line.ts:8

Line options

Extends ​

Properties ​

PropertyTypeDescriptionOverridesInherited fromDefined in
absolutebooleanShould points be considered as absolute coordinates (in the parent space) instead of relative to the line position--line.ts:12
capCanvasLineCapHow the line endComponentOptions.cap-line.ts:10
clip| Component<ComponentOptions> | nullOther component used to clip the rendering-ComponentOptions.clipcontainer.ts:26
cursorstring | nullCursor to use when hover-ComponentOptions.cursorcomponent.ts:81
dashedboolean | number[]Should the line be dashed, you can also specify the dash pattern (ex: [4, 4] or Component.dashes.dots)-ComponentOptions.dashedcomponent.ts:79
fillStyleColor used to fill, set to null for transparent-ComponentOptions.fillcomponent.ts:73
joinCanvasLineJoinHow lines join between them-ComponentOptions.joincomponent.ts:83
opacitynumber | nullOpacity level from 0 to 1 (multiplied with its parents opacity, null means 1)-ComponentOptions.opacitycontainer.ts:16
origin| string | PositionDefinitionRelative offset (Rectangle based shapes also accept named origins like "center")-ComponentOptions.origincomponent.ts:87
rotationnumberRotation ratio from 0 to 1 (clockwise)-ComponentOptions.rotationcontainer.ts:18
rotationCenterPositionDefinitionCenter of rotation relative to this position-ComponentOptions.rotationCentercontainer.ts:20
scale| number | PositionDefinitionScaling ratio or a pair of value for horizontal and vertical scaling-ComponentOptions.scalecontainer.ts:22
shadowPartial<ShadowOptions>Set of options to set a shadow-ComponentOptions.shadowcomponent.ts:89
shownbooleanIs shown-ComponentOptions.showncontainer.ts:14
strokeStyleColor used to stroke, set to null for transparent-ComponentOptions.strokecomponent.ts:75
strokeWidthnumberStroke line thickness in pixels-ComponentOptions.strokeWidthcomponent.ts:77
zIndexnumberDepth ordering-ComponentOptions.zIndexcontainer.ts:24

Released under the MIT License.