Interface: ILeaferCanvas โ
Hierarchy โ
ICanvasMethod
โณ
ILeaferCanvas
โณโณ
IHitCanvas
โณโณ
IInteractionCanvas
Implemented by โ
Table of contents โ
Properties โ
- strokeAlign
- strokeCap
- strokeJoin
- dashPattern
- dashOffset
- miterLimit
- smooth
- smoothLevel
- opacity
- blendMode
- fillStyle
- strokeStyle
- strokeWidth
- shadowBlur
- shadowColor
- shadowOffsetX
- shadowOffsetY
- filter
- font
- fontKerning
- fontStretch
- fontVariantCaps
- textAlign
- textBaseline
- textRendering
- wordSpacing
- letterSpacing
- direction
- innerId
- name
- manager
- width
- height
- pixelRatio
- pixelWidth
- pixelHeight
- allowBackgroundColor
- backgroundColor
- hittable
- zIndex
- childIndex
- bounds
- clientBounds
- config
- autoLayout
- view
- parentView
- unreal
- context
- recycled
- worldTransform
Methods โ
- save
- restore
- fill
- stroke
- clip
- fillRect
- strokeRect
- clearRect
- transform
- translate
- scale
- rotate
- drawImage
- setTransform
- getTransform
- resetTransform
- createConicGradient
- createLinearGradient
- createPattern
- createRadialGradient
- fillText
- measureText
- strokeText
- saveBlendMode
- restoreBlendMode
- hitFill
- hitStroke
- hitPixel
- setStroke
- setStrokeOptions
- setWorld
- useWorldTransform
- setWorldShadow
- setWorldBlur
- copyWorld
- copyWorldByReset
- copyWorldToInner
- useMask
- useEraser
- fillWorld
- strokeWorld
- clipWorld
- clearWorld
- clear
- init
- export
- toBlob
- toDataURL
- saveAs
- startAutoLayout
- stopAutoLayout
- resize
- updateViewSize
- updateClientBounds
- getClientBounds
- isSameSize
- getSameCanvas
- recycle
- updateRender
- unrealCanvas
- destroy
- beginPath
- moveTo
- lineTo
- bezierCurveTo
- quadraticCurveTo
- closePath
- arc
- arcTo
- ellipse
- rect
- roundRect
Properties โ
strokeAlign โ
โข Optional
strokeAlign: string
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:26
strokeCap โ
โข Optional
strokeCap: string
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:28
strokeJoin โ
โข Optional
strokeJoin: string
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:29
dashPattern โ
โข Optional
dashPattern: number
[]
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:30
dashOffset โ
โข Optional
dashOffset: number
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:31
miterLimit โ
โข Optional
miterLimit: number
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:32
smooth โ
โข smooth: boolean
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:42
smoothLevel โ
โข smoothLevel: string
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:43
opacity โ
โข opacity: number
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:44
blendMode โ
โข blendMode: string
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:45
fillStyle โ
โข fillStyle: string
| object
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:47
strokeStyle โ
โข strokeStyle: string
| object
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:49
strokeWidth โ
โข strokeWidth: number
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:50
shadowBlur โ
โข shadowBlur: number
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:52
shadowColor โ
โข shadowColor: string
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:53
shadowOffsetX โ
โข shadowOffsetX: number
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:54
shadowOffsetY โ
โข shadowOffsetY: number
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:55
filter โ
โข filter: string
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:57
font โ
โข font: string
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:59
fontKerning โ
โข fontKerning: string
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:60
fontStretch โ
โข fontStretch: string
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:61
fontVariantCaps โ
โข fontVariantCaps: string
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:62
textAlign โ
โข textAlign: string
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:64
textBaseline โ
โข textBaseline: string
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:65
textRendering โ
โข textRendering: string
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:66
wordSpacing โ
โข wordSpacing: string
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:67
letterSpacing โ
โข letterSpacing: string
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:68
direction โ
โข direction: string
Inherited from โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:70
innerId โ
โข Readonly
innerId: number
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:146
name โ
โข name: string
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:147
manager โ
โข manager: ICanvasManager
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:149
width โ
โข width: number
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:151
height โ
โข height: number
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:152
pixelRatio โ
โข pixelRatio: number
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:154
pixelWidth โ
โข Readonly
pixelWidth: number
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:155
pixelHeight โ
โข Readonly
pixelHeight: number
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:156
allowBackgroundColor โ
โข Optional
Readonly
allowBackgroundColor: boolean
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:158
backgroundColor โ
โข Optional
backgroundColor: string
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:159
hittable โ
โข Optional
hittable: boolean
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:160
zIndex โ
โข Optional
zIndex: number
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:162
childIndex โ
โข Optional
childIndex: number
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:163
bounds โ
โข bounds: IBounds
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:165
clientBounds โ
โข clientBounds: IBoundsData
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:166
config โ
โข config: ILeaferCanvasConfig
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:168
autoLayout โ
โข autoLayout: boolean
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:170
view โ
โข view: any
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:172
parentView โ
โข parentView: any
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:173
unreal โ
โข Optional
unreal: boolean
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:175
context โ
โข context: ICanvasContext2D
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:177
recycled โ
โข Optional
recycled: boolean
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:179
worldTransform โ
โข worldTransform: IMatrixData
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:181
Methods โ
save โ
โธ save(): void
Returns โ
void
Inherited from โ
ICanvasMethod.save
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:74
restore โ
โธ restore(): void
Returns โ
void
Inherited from โ
ICanvasMethod.restore
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:75
fill โ
โธ fill(path?
, rule?
): void
Parameters โ
Name | Type |
---|---|
path? | IWindingRule | IPath2D |
rule? | IWindingRule |
Returns โ
void
Inherited from โ
ICanvasMethod.fill
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:77
stroke โ
โธ stroke(path?
): void
Parameters โ
Name | Type |
---|---|
path? | IPath2D |
Returns โ
void
Inherited from โ
ICanvasMethod.stroke
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:78
clip โ
โธ clip(path?
, rule?
): void
Parameters โ
Name | Type |
---|---|
path? | IWindingRule | IPath2D |
rule? | IWindingRule |
Returns โ
void
Inherited from โ
ICanvasMethod.clip
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:79
fillRect โ
โธ fillRect(x
, y
, width
, height
): void
Parameters โ
Name | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns โ
void
Inherited from โ
ICanvasMethod.fillRect
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:81
strokeRect โ
โธ strokeRect(x
, y
, width
, height
): void
Parameters โ
Name | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns โ
void
Inherited from โ
ICanvasMethod.strokeRect
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:82
clearRect โ
โธ clearRect(x
, y
, width
, height
): void
Parameters โ
Name | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns โ
void
Inherited from โ
ICanvasMethod.clearRect
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:83
transform โ
โธ transform(a
, b?
, c?
, d?
, e?
, f?
): void
Parameters โ
Name | Type |
---|---|
a | number | IMatrixData |
b? | number |
c? | number |
d? | number |
e? | number |
f? | number |
Returns โ
void
Inherited from โ
ICanvasMethod.transform
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:85
translate โ
โธ translate(x
, y
): void
Parameters โ
Name | Type |
---|---|
x | number |
y | number |
Returns โ
void
Inherited from โ
ICanvasMethod.translate
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:86
scale โ
โธ scale(x
, y
): void
Parameters โ
Name | Type |
---|---|
x | number |
y | number |
Returns โ
void
Inherited from โ
ICanvasMethod.scale
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:87
rotate โ
โธ rotate(angle
): void
Parameters โ
Name | Type |
---|---|
angle | number |
Returns โ
void
Inherited from โ
ICanvasMethod.rotate
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:88
drawImage โ
โธ drawImage(image
, dx
, dy
): void
Parameters โ
Name | Type |
---|---|
image | CanvasImageSource |
dx | number |
dy | number |
Returns โ
void
Inherited from โ
ICanvasMethod.drawImage
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:90
โธ drawImage(image
, dx
, dy
, dw
, dh
): void
Parameters โ
Name | Type |
---|---|
image | CanvasImageSource |
dx | number |
dy | number |
dw | number |
dh | number |
Returns โ
void
Inherited from โ
ICanvasMethod.drawImage
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:91
โธ drawImage(image
, sx
, sy
, sw
, sh
, dx
, dy
, dw
, dh
): void
Parameters โ
Name | Type |
---|---|
image | CanvasImageSource |
sx | number |
sy | number |
sw | number |
sh | number |
dx | number |
dy | number |
dw | number |
dh | number |
Returns โ
void
Inherited from โ
ICanvasMethod.drawImage
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:92
setTransform โ
โธ setTransform(a
, b?
, c?
, d?
, e?
, f?
): void
Parameters โ
Name | Type |
---|---|
a | number | IMatrixData |
b? | number |
c? | number |
d? | number |
e? | number |
f? | number |
Returns โ
void
Inherited from โ
ICanvasMethod.setTransform
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:94
getTransform โ
โธ getTransform(): IMatrixData
Returns โ
Inherited from โ
ICanvasMethod.getTransform
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:95
resetTransform โ
โธ resetTransform(): void
Returns โ
void
Inherited from โ
ICanvasMethod.resetTransform
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:96
createConicGradient โ
โธ createConicGradient(startAngle
, x
, y
): CanvasGradient
Parameters โ
Name | Type |
---|---|
startAngle | number |
x | number |
y | number |
Returns โ
CanvasGradient
Inherited from โ
ICanvasMethod.createConicGradient
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:98
createLinearGradient โ
โธ createLinearGradient(x0
, y0
, x1
, y1
): CanvasGradient
Parameters โ
Name | Type |
---|---|
x0 | number |
y0 | number |
x1 | number |
y1 | number |
Returns โ
CanvasGradient
Inherited from โ
ICanvasMethod.createLinearGradient
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:99
createPattern โ
โธ createPattern(image
, repetition
): CanvasPattern
Parameters โ
Name | Type |
---|---|
image | CanvasImageSource |
repetition | string |
Returns โ
CanvasPattern
Inherited from โ
ICanvasMethod.createPattern
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:100
createRadialGradient โ
โธ createRadialGradient(x0
, y0
, r0
, x1
, y1
, r1
): CanvasGradient
Parameters โ
Name | Type |
---|---|
x0 | number |
y0 | number |
r0 | number |
x1 | number |
y1 | number |
r1 | number |
Returns โ
CanvasGradient
Inherited from โ
ICanvasMethod.createRadialGradient
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:101
fillText โ
โธ fillText(text
, x
, y
, maxWidth?
): void
Parameters โ
Name | Type |
---|---|
text | string |
x | number |
y | number |
maxWidth? | number |
Returns โ
void
Inherited from โ
ICanvasMethod.fillText
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:105
measureText โ
โธ measureText(text
): ITextMetrics
Parameters โ
Name | Type |
---|---|
text | string |
Returns โ
Inherited from โ
ICanvasMethod.measureText
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:106
strokeText โ
โธ strokeText(text
, x
, y
, maxWidth?
): void
Parameters โ
Name | Type |
---|---|
text | string |
x | number |
y | number |
maxWidth? | number |
Returns โ
void
Inherited from โ
ICanvasMethod.strokeText
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:107
saveBlendMode โ
โธ saveBlendMode(blendMode?
): void
Parameters โ
Name | Type |
---|---|
blendMode? | string |
Returns โ
void
Inherited from โ
ICanvasMethod.saveBlendMode
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:111
restoreBlendMode โ
โธ restoreBlendMode(): void
Returns โ
void
Inherited from โ
ICanvasMethod.restoreBlendMode
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:112
hitFill โ
โธ hitFill(point
, fillRule?
): boolean
Parameters โ
Name | Type |
---|---|
point | IPointData |
fillRule? | string |
Returns โ
boolean
Inherited from โ
ICanvasMethod.hitFill
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:114
hitStroke โ
โธ hitStroke(point
, strokeWidth?
): boolean
Parameters โ
Name | Type |
---|---|
point | IPointData |
strokeWidth? | number |
Returns โ
boolean
Inherited from โ
ICanvasMethod.hitStroke
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:115
hitPixel โ
โธ hitPixel(radiusPoint
, offset?
, scale?
): boolean
Parameters โ
Name | Type |
---|---|
radiusPoint | IRadiusPointData |
offset? | IPointData |
scale? | number |
Returns โ
boolean
Inherited from โ
ICanvasMethod.hitPixel
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:116
setStroke โ
โธ setStroke(strokeStyle
, strokeWidth
, options?
): void
Parameters โ
Name | Type |
---|---|
strokeStyle | string | object |
strokeWidth | number |
options? | ICanvasStrokeOptions |
Returns โ
void
Inherited from โ
ICanvasMethod.setStroke
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:119
setStrokeOptions โ
โธ setStrokeOptions(options
): void
Parameters โ
Name | Type |
---|---|
options | ICanvasStrokeOptions |
Returns โ
void
Inherited from โ
ICanvasMethod.setStrokeOptions
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:120
setWorld โ
โธ setWorld(matrix
, parentMatrix?
): void
Parameters โ
Name | Type |
---|---|
matrix | IMatrixData |
parentMatrix? | IMatrixData |
Returns โ
void
Inherited from โ
ICanvasMethod.setWorld
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:122
useWorldTransform โ
โธ useWorldTransform(worldTransform?
): void
Parameters โ
Name | Type |
---|---|
worldTransform? | IMatrixData |
Returns โ
void
Inherited from โ
ICanvasMethod.useWorldTransform
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:123
setWorldShadow โ
โธ setWorldShadow(x
, y
, blur
, color?
): void
Parameters โ
Name | Type |
---|---|
x | number |
y | number |
blur | number |
color? | string |
Returns โ
void
Inherited from โ
ICanvasMethod.setWorldShadow
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:125
setWorldBlur โ
โธ setWorldBlur(blur
): void
Parameters โ
Name | Type |
---|---|
blur | number |
Returns โ
void
Inherited from โ
ICanvasMethod.setWorldBlur
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:126
copyWorld โ
โธ copyWorld(canvas
, fromBounds?
, toBounds?
, blendMode?
): void
Parameters โ
Name | Type |
---|---|
canvas | ILeaferCanvas |
fromBounds? | IBoundsData |
toBounds? | IBoundsData |
blendMode? | string |
Returns โ
void
Inherited from โ
ICanvasMethod.copyWorld
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:128
copyWorldByReset โ
โธ copyWorldByReset(canvas
, from?
, to?
, blendMode?
, onlyResetTransform?
): void
Parameters โ
Name | Type |
---|---|
canvas | ILeaferCanvas |
from? | IBoundsData |
to? | IBoundsData |
blendMode? | string |
onlyResetTransform? | boolean |
Returns โ
void
Inherited from โ
ICanvasMethod.copyWorldByReset
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:129
copyWorldToInner โ
โธ copyWorldToInner(canvas
, fromWorld
, toInnerBounds
, blendMode?
): void
Parameters โ
Name | Type |
---|---|
canvas | ILeaferCanvas |
fromWorld | IMatrixWithBoundsData |
toInnerBounds | IBoundsData |
blendMode? | string |
Returns โ
void
Inherited from โ
ICanvasMethod.copyWorldToInner
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:130
useMask โ
โธ useMask(maskCanvas
, fromBounds?
, toBounds?
): void
Parameters โ
Name | Type |
---|---|
maskCanvas | ILeaferCanvas |
fromBounds? | IBoundsData |
toBounds? | IBoundsData |
Returns โ
void
Inherited from โ
ICanvasMethod.useMask
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:132
useEraser โ
โธ useEraser(eraserCanvas
, fromBounds?
, toBounds?
): void
Parameters โ
Name | Type |
---|---|
eraserCanvas | ILeaferCanvas |
fromBounds? | IBoundsData |
toBounds? | IBoundsData |
Returns โ
void
Inherited from โ
ICanvasMethod.useEraser
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:133
fillWorld โ
โธ fillWorld(bounds
, color
, blendMode?
): void
Parameters โ
Name | Type |
---|---|
bounds | IBoundsData |
color | string | object |
blendMode? | string |
Returns โ
void
Inherited from โ
ICanvasMethod.fillWorld
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:135
strokeWorld โ
โธ strokeWorld(bounds
, color
, blendMode?
): void
Parameters โ
Name | Type |
---|---|
bounds | IBoundsData |
color | string | object |
blendMode? | string |
Returns โ
void
Inherited from โ
ICanvasMethod.strokeWorld
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:136
clipWorld โ
โธ clipWorld(bounds
, ceilPixel?
): void
Parameters โ
Name | Type |
---|---|
bounds | IBoundsData |
ceilPixel? | boolean |
Returns โ
void
Inherited from โ
ICanvasMethod.clipWorld
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:137
clearWorld โ
โธ clearWorld(bounds
, ceilPixel?
): void
Parameters โ
Name | Type |
---|---|
bounds | IBoundsData |
ceilPixel? | boolean |
Returns โ
void
Inherited from โ
ICanvasMethod.clearWorld
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:138
clear โ
โธ clear(): void
Returns โ
void
Inherited from โ
ICanvasMethod.clear
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:140
init โ
โธ init(): void
Returns โ
void
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:183
export โ
โธ export(filename
, options?
): string
| Promise
<any
>
Parameters โ
Name | Type |
---|---|
filename | string |
options? | number | boolean | IExportOptions |
Returns โ
string
| Promise
<any
>
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:185
toBlob โ
โธ toBlob(type?
, quality?
): Promise
<any
>
Parameters โ
Name | Type |
---|---|
type? | string |
quality? | number |
Returns โ
Promise
<any
>
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:186
toDataURL โ
โธ toDataURL(type?
, quality?
): string
| Promise
<string
>
Parameters โ
Name | Type |
---|---|
type? | string |
quality? | number |
Returns โ
string
| Promise
<string
>
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:187
saveAs โ
โธ saveAs(filename
, quality?
): Promise
<boolean
>
Parameters โ
Name | Type |
---|---|
filename | string |
quality? | number |
Returns โ
Promise
<boolean
>
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:188
startAutoLayout โ
โธ startAutoLayout(autoBounds
, listener
): void
Parameters โ
Name | Type |
---|---|
autoBounds | IAutoBounds |
listener | IResizeEventListener |
Returns โ
void
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:190
stopAutoLayout โ
โธ stopAutoLayout(): void
Returns โ
void
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:191
resize โ
โธ resize(size
): void
Parameters โ
Name | Type |
---|---|
size | IScreenSizeData |
Returns โ
void
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:193
updateViewSize โ
โธ updateViewSize(): void
Returns โ
void
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:194
updateClientBounds โ
โธ updateClientBounds(): void
Returns โ
void
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:195
getClientBounds โ
โธ getClientBounds(update?
): IBoundsData
Parameters โ
Name | Type |
---|---|
update? | boolean |
Returns โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:196
isSameSize โ
โธ isSameSize(options
): boolean
Parameters โ
Name | Type |
---|---|
options | ILeaferCanvasConfig |
Returns โ
boolean
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:199
getSameCanvas โ
โธ getSameCanvas(useSameWorldTransform?
, useSameSmooth?
): ILeaferCanvas
Parameters โ
Name | Type |
---|---|
useSameWorldTransform? | boolean |
useSameSmooth? | boolean |
Returns โ
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:200
recycle โ
โธ recycle(clearBounds?
): void
Parameters โ
Name | Type |
---|---|
clearBounds? | IBoundsData |
Returns โ
void
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:201
updateRender โ
โธ updateRender(bounds
): void
Parameters โ
Name | Type |
---|---|
bounds | IBoundsData |
Returns โ
void
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:203
unrealCanvas โ
โธ unrealCanvas(): void
Returns โ
void
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:204
destroy โ
โธ destroy(): void
Returns โ
void
Defined in โ
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:205
beginPath โ
โธ beginPath(): void
Returns โ
void
Inherited from โ
Defined in โ
leafer/packages/interface/src/path/IPathDrawer.ts:3
moveTo โ
โธ moveTo(x
, y
): void
Parameters โ
Name | Type |
---|---|
x | number |
y | number |
Returns โ
void
Inherited from โ
Defined in โ
leafer/packages/interface/src/path/IPathDrawer.ts:5
lineTo โ
โธ lineTo(x
, y
): void
Parameters โ
Name | Type |
---|---|
x | number |
y | number |
Returns โ
void
Inherited from โ
Defined in โ
leafer/packages/interface/src/path/IPathDrawer.ts:6
bezierCurveTo โ
โธ bezierCurveTo(x1
, y1
, x2
, y2
, x
, y
): void
Parameters โ
Name | Type |
---|---|
x1 | number |
y1 | number |
x2 | number |
y2 | number |
x | number |
y | number |
Returns โ
void
Inherited from โ
Defined in โ
leafer/packages/interface/src/path/IPathDrawer.ts:7
quadraticCurveTo โ
โธ quadraticCurveTo(x1
, y1
, x
, y
): void
Parameters โ
Name | Type |
---|---|
x1 | number |
y1 | number |
x | number |
y | number |
Returns โ
void
Inherited from โ
Defined in โ
leafer/packages/interface/src/path/IPathDrawer.ts:8
closePath โ
โธ closePath(): void
Returns โ
void
Inherited from โ
Defined in โ
leafer/packages/interface/src/path/IPathDrawer.ts:9
arc โ
โธ arc(x
, y
, radius
, startAngle
, endAngle
, anticlockwise?
): void
Parameters โ
Name | Type |
---|---|
x | number |
y | number |
radius | number |
startAngle | number |
endAngle | number |
anticlockwise? | boolean |
Returns โ
void
Inherited from โ
Defined in โ
leafer/packages/interface/src/path/IPathDrawer.ts:11
arcTo โ
โธ arcTo(x1
, y1
, x2
, y2
, radius
): void
Parameters โ
Name | Type |
---|---|
x1 | number |
y1 | number |
x2 | number |
y2 | number |
radius | number |
Returns โ
void
Inherited from โ
Defined in โ
leafer/packages/interface/src/path/IPathDrawer.ts:12
ellipse โ
โธ ellipse(x
, y
, radiusX
, radiusY
, rotation
, startAngle
, endAngle
, anticlockwise?
): void
Parameters โ
Name | Type |
---|---|
x | number |
y | number |
radiusX | number |
radiusY | number |
rotation | number |
startAngle | number |
endAngle | number |
anticlockwise? | boolean |
Returns โ
void
Inherited from โ
Defined in โ
leafer/packages/interface/src/path/IPathDrawer.ts:13
rect โ
โธ rect(x
, y
, width
, height
): void
Parameters โ
Name | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns โ
void
Inherited from โ
Defined in โ
leafer/packages/interface/src/path/IPathDrawer.ts:15
roundRect โ
โธ roundRect(x
, y
, width
, height
, radius?
): void
Parameters โ
Name | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
radius? | number | number [] |
Returns โ
void