Interface: IInteractionCanvas â
Hierarchy â
âł
IInteractionCanvas
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
- useGrayscaleAlpha
- 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
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:147
name â
⢠name: string
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:148
manager â
⢠manager: ICanvasManager
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:150
width â
⢠width: number
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:152
height â
⢠height: number
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:153
pixelRatio â
⢠pixelRatio: number
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:155
pixelWidth â
⢠Readonly
pixelWidth: number
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:156
pixelHeight â
⢠Readonly
pixelHeight: number
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:157
allowBackgroundColor â
⢠Optional
Readonly
allowBackgroundColor: boolean
Inherited from â
ILeaferCanvas.allowBackgroundColor
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:159
backgroundColor â
⢠Optional
backgroundColor: string
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:160
hittable â
⢠Optional
hittable: boolean
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:161
zIndex â
⢠Optional
zIndex: number
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:163
childIndex â
⢠Optional
childIndex: number
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:164
bounds â
⢠bounds: IBounds
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:166
clientBounds â
⢠clientBounds: IBoundsData
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:167
config â
⢠config: ILeaferCanvasConfig
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:169
autoLayout â
⢠autoLayout: boolean
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:171
view â
⢠view: any
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:173
parentView â
⢠parentView: any
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:174
unreal â
⢠Optional
unreal: boolean
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:176
context â
⢠context: ICanvasContext2D
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:178
recycled â
⢠Optional
recycled: boolean
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:180
worldTransform â
⢠worldTransform: IMatrixData
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:182
Methods â
save â
⸠save(): void
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:74
restore â
⸠restore(): void
Returns â
void
Inherited from â
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 â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:77
stroke â
⸠stroke(path?
): void
Parameters â
Name | Type |
---|---|
path? | IPath2D |
Returns â
void
Inherited from â
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 â
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 â
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 â
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 â
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 â
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 â
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 â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:87
rotate â
⸠rotate(angle
): void
Parameters â
Name | Type |
---|---|
angle | number |
Returns â
void
Inherited from â
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 â
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 â
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 â
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 â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:94
getTransform â
⸠getTransform(): IMatrixData
Returns â
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:95
resetTransform â
⸠resetTransform(): void
Returns â
void
Inherited from â
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 â
ILeaferCanvas.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 â
ILeaferCanvas.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 â
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 â
ILeaferCanvas.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 â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:105
measureText â
⸠measureText(text
): ITextMetrics
Parameters â
Name | Type |
---|---|
text | string |
Returns â
Inherited from â
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 â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:107
saveBlendMode â
⸠saveBlendMode(blendMode?
): void
Parameters â
Name | Type |
---|---|
blendMode? | string |
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:111
restoreBlendMode â
⸠restoreBlendMode(): void
Returns â
void
Inherited from â
ILeaferCanvas.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 â
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 â
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 â
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 â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:119
setStrokeOptions â
⸠setStrokeOptions(options
): void
Parameters â
Name | Type |
---|---|
options | ICanvasStrokeOptions |
Returns â
void
Inherited from â
ILeaferCanvas.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 â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:122
useWorldTransform â
⸠useWorldTransform(worldTransform?
): void
Parameters â
Name | Type |
---|---|
worldTransform? | IMatrixData |
Returns â
void
Inherited from â
ILeaferCanvas.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 â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:125
setWorldBlur â
⸠setWorldBlur(blur
): void
Parameters â
Name | Type |
---|---|
blur | number |
Returns â
void
Inherited from â
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 â
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 â
ILeaferCanvas.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 â
ILeaferCanvas.copyWorldToInner
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:130
useGrayscaleAlpha â
⸠useGrayscaleAlpha(bounds
): void
Parameters â
Name | Type |
---|---|
bounds | IBoundsData |
Returns â
void
Inherited from â
ILeaferCanvas.useGrayscaleAlpha
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:132
useMask â
⸠useMask(maskCanvas
, fromBounds?
, toBounds?
): void
Parameters â
Name | Type |
---|---|
maskCanvas | ILeaferCanvas |
fromBounds? | IBoundsData |
toBounds? | IBoundsData |
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:133
useEraser â
⸠useEraser(eraserCanvas
, fromBounds?
, toBounds?
): void
Parameters â
Name | Type |
---|---|
eraserCanvas | ILeaferCanvas |
fromBounds? | IBoundsData |
toBounds? | IBoundsData |
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:134
fillWorld â
⸠fillWorld(bounds
, color
, blendMode?
): void
Parameters â
Name | Type |
---|---|
bounds | IBoundsData |
color | string | object |
blendMode? | string |
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:136
strokeWorld â
⸠strokeWorld(bounds
, color
, blendMode?
): void
Parameters â
Name | Type |
---|---|
bounds | IBoundsData |
color | string | object |
blendMode? | string |
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:137
clipWorld â
⸠clipWorld(bounds
, ceilPixel?
): void
Parameters â
Name | Type |
---|---|
bounds | IBoundsData |
ceilPixel? | boolean |
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:138
clearWorld â
⸠clearWorld(bounds
, ceilPixel?
): void
Parameters â
Name | Type |
---|---|
bounds | IBoundsData |
ceilPixel? | boolean |
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:139
clear â
⸠clear(): void
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:141
init â
⸠init(): void
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:184
export â
⸠export(filename
, options?
): string
| Promise
<any
>
Parameters â
Name | Type |
---|---|
filename | string |
options? | number | boolean | IExportOptions |
Returns â
string
| Promise
<any
>
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:186
toBlob â
⸠toBlob(type?
, quality?
): Promise
<any
>
Parameters â
Name | Type |
---|---|
type? | string |
quality? | number |
Returns â
Promise
<any
>
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:187
toDataURL â
⸠toDataURL(type?
, quality?
): string
| Promise
<string
>
Parameters â
Name | Type |
---|---|
type? | string |
quality? | number |
Returns â
string
| Promise
<string
>
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:188
saveAs â
⸠saveAs(filename
, quality?
): Promise
<boolean
>
Parameters â
Name | Type |
---|---|
filename | string |
quality? | number |
Returns â
Promise
<boolean
>
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:189
startAutoLayout â
⸠startAutoLayout(autoBounds
, listener
): void
Parameters â
Name | Type |
---|---|
autoBounds | IAutoBounds |
listener | IResizeEventListener |
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:191
stopAutoLayout â
⸠stopAutoLayout(): void
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:192
resize â
⸠resize(size
, safeResize?
): void
Parameters â
Name | Type |
---|---|
size | IScreenSizeData |
safeResize? | boolean |
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:194
updateViewSize â
⸠updateViewSize(): void
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:195
updateClientBounds â
⸠updateClientBounds(): void
Returns â
void
Inherited from â
ILeaferCanvas.updateClientBounds
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:196
getClientBounds â
⸠getClientBounds(update?
): IBoundsData
Parameters â
Name | Type |
---|---|
update? | boolean |
Returns â
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:197
isSameSize â
⸠isSameSize(options
): boolean
Parameters â
Name | Type |
---|---|
options | ILeaferCanvasConfig |
Returns â
boolean
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:200
getSameCanvas â
⸠getSameCanvas(useSameWorldTransform?
, useSameSmooth?
): ILeaferCanvas
Parameters â
Name | Type |
---|---|
useSameWorldTransform? | boolean |
useSameSmooth? | boolean |
Returns â
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:201
recycle â
⸠recycle(clearBounds?
): void
Parameters â
Name | Type |
---|---|
clearBounds? | IBoundsData |
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:202
updateRender â
⸠updateRender(bounds
): void
Parameters â
Name | Type |
---|---|
bounds | IBoundsData |
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:204
unrealCanvas â
⸠unrealCanvas(): void
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:205
destroy â
⸠destroy(): void
Returns â
void
Inherited from â
Defined in â
leafer/packages/interface/src/canvas/ILeaferCanvas.ts:206
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 â
ILeaferCanvas.quadraticCurveTo
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