pencil.js / sprite / SpriteOptions
Interface: SpriteOptions
Defined in: sprite.ts:11
Sprite options
Extends
Properties
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
cap? | CanvasLineCap | How lines end | ImageOptions.cap | component.ts:85 |
clip | | Component<ComponentOptions> | null | Other component used to clip the rendering | ImageOptions.clip | container.ts:26 |
cursor | string | null | Cursor to use when hover | ImageOptions.cursor | component.ts:81 |
dashed | boolean | number[] | Should the line be dashed, you can also specify the dash pattern (ex: [4, 4] or Component.dashes.dots) | ImageOptions.dashed | component.ts:79 |
description | string | Alternative description of the image | ImageOptions.description | image.ts:15 |
fill | Style | Color used to fill, set to null for transparent | ImageOptions.fill | component.ts:73 |
join | CanvasLineJoin | How lines join between them | ImageOptions.join | component.ts:83 |
loop | boolean | Should the animation loop | - | sprite.ts:15 |
opacity | number | null | Opacity level from 0 to 1 (multiplied with its parents opacity, null means 1) | ImageOptions.opacity | container.ts:16 |
origin | | string | PositionDefinition | Relative offset (Rectangle based shapes also accept named origins like "center") | ImageOptions.origin | component.ts:87 |
rotation | number | Rotation ratio from 0 to 1 (clockwise) | ImageOptions.rotation | container.ts:18 |
rotationCenter | PositionDefinition | Center of rotation relative to this position | ImageOptions.rotationCenter | container.ts:20 |
rounded | number | DOMPointInit | (number | DOMPointInit)[] | Radius of the corners (or a list of radii, see https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect) | ImageOptions.rounded | rectangle.ts:10 |
scale | | number | PositionDefinition | Scaling ratio or a pair of value for horizontal and vertical scaling | ImageOptions.scale | container.ts:22 |
shadow | Partial<ShadowOptions> | Set of options to set a shadow | ImageOptions.shadow | component.ts:89 |
shown | boolean | Is shown | ImageOptions.shown | container.ts:14 |
speed | number | Speed of the animation (1 = one frame per render, 0.5 = one frame every two render …) | - | sprite.ts:13 |
stroke | Style | Color used to stroke, set to null for transparent | ImageOptions.stroke | component.ts:75 |
strokeWidth | number | Stroke line thickness in pixels | ImageOptions.strokeWidth | component.ts:77 |
tint | Style | Override the color of all non-transparent pixels | ImageOptions.tint | image.ts:13 |
zIndex | number | Depth ordering | ImageOptions.zIndex | container.ts:24 |
