Skip to content

pencil.js / image / ImageOptions

Interface: ImageOptions ​

Defined in: image.ts:11

Image options

Extends ​

Extended by ​

Properties ​

PropertyTypeDescriptionInherited fromDefined in
cap?CanvasLineCapHow lines endRectangleOptions.capcomponent.ts:85
clip| Component<ComponentOptions> | nullOther component used to clip the renderingRectangleOptions.clipcontainer.ts:26
cursorstring | nullCursor to use when hoverRectangleOptions.cursorcomponent.ts:81
dashedboolean | number[]Should the line be dashed, you can also specify the dash pattern (ex: [4, 4] or Component.dashes.dots)RectangleOptions.dashedcomponent.ts:79
descriptionstringAlternative description of the image-image.ts:15
fillStyleColor used to fill, set to null for transparentRectangleOptions.fillcomponent.ts:73
joinCanvasLineJoinHow lines join between themRectangleOptions.joincomponent.ts:83
opacitynumber | nullOpacity level from 0 to 1 (multiplied with its parents opacity, null means 1)RectangleOptions.opacitycontainer.ts:16
origin| string | PositionDefinitionRelative offset (Rectangle based shapes also accept named origins like "center")RectangleOptions.origincomponent.ts:87
rotationnumberRotation ratio from 0 to 1 (clockwise)RectangleOptions.rotationcontainer.ts:18
rotationCenterPositionDefinitionCenter of rotation relative to this positionRectangleOptions.rotationCentercontainer.ts:20
roundednumber | DOMPointInit | (number | DOMPointInit)[]Radius of the corners (or a list of radii, see https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect)RectangleOptions.roundedrectangle.ts:10
scale| number | PositionDefinitionScaling ratio or a pair of value for horizontal and vertical scalingRectangleOptions.scalecontainer.ts:22
shadowPartial<ShadowOptions>Set of options to set a shadowRectangleOptions.shadowcomponent.ts:89
shownbooleanIs shownRectangleOptions.showncontainer.ts:14
strokeStyleColor used to stroke, set to null for transparentRectangleOptions.strokecomponent.ts:75
strokeWidthnumberStroke line thickness in pixelsRectangleOptions.strokeWidthcomponent.ts:77
tintStyleOverride the color of all non-transparent pixels-image.ts:13
zIndexnumberDepth orderingRectangleOptions.zIndexcontainer.ts:24

Released under the MIT License.