Interface: IPlatform
Table of contents
Properties
- name
- os
- canvas
- renderCanvas
- canvasType
- isWorker
- isMobile
- devicePixelRatio
- intWheelDeltaY
- conicGradientSupport
- conicGradientRotate90
- fullImageShadow
- syncDomFont
- selector
- origin
- roundRectPatch
- ellipseToCurve
- event
- miniapp
- image
Methods
Properties
name
• Optional
name: "miniapp"
| "web"
| "node"
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:11
os
• Optional
os: "Mac"
| "Windows"
| "Linux"
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:12
canvas
• Optional
canvas: ILeaferCanvas
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:16
renderCanvas
• Optional
renderCanvas: ILeaferCanvas
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:17
canvasType
• Optional
canvasType: ICanvasType
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:18
isWorker
• Optional
isWorker: boolean
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:20
isMobile
• Optional
isMobile: boolean
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:21
devicePixelRatio
• Optional
Readonly
devicePixelRatio: number
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:23
intWheelDeltaY
• Optional
intWheelDeltaY: boolean
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:25
conicGradientSupport
• Optional
conicGradientSupport: boolean
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:26
conicGradientRotate90
• Optional
conicGradientRotate90: boolean
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:27
fullImageShadow
• Optional
fullImageShadow: boolean
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:28
syncDomFont
• Optional
syncDomFont: boolean
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:29
selector
• Optional
selector: ISelector
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:31
origin
• Optional
origin: Object
Type declaration
Name | Type |
---|---|
createCanvas | (width : number , height : number , format? : "svg" | "pdf" ) => any |
canvasToDataURL | (canvas : any , type? : IExportImageType , quality? : number ) => string | Promise <string > |
canvasToBolb | (canvas : any , type? : IExportFileType , quality? : number ) => Promise <any > |
canvasSaveAs | (canvas : any , filename : string , quality? : number ) => Promise <void > |
download | (url : string , filename : string ) => Promise <void > |
loadImage | (url : string ) => Promise <any > |
noRepeat? | string |
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:34
roundRectPatch
• Optional
roundRectPatch: boolean
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:44
ellipseToCurve
• Optional
ellipseToCurve: boolean
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:45
event
• Optional
event: Object
Type declaration
Name | Type |
---|---|
stopDefault | (origin : IObject ) => void |
stopNow | (origin : IObject ) => void |
stop | (origin : IObject ) => void |
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:47
miniapp
• Optional
miniapp: IMiniapp
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:53
image
• image: Object
Type declaration
Name | Type |
---|---|
hitCanvasSize | number |
maxCacheSize | number |
maxPatternSize | number |
prefix? | string |
suffix? | string |
crossOrigin | string | false |
getRealURL | IStringFunction |
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:55
Methods
toURL
▸ toURL(text
, fileType?
): string
Parameters
Name | Type |
---|---|
text | string |
fileType? | "svg" | "text" |
Returns
string
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:13
requestRender
▸ requestRender(render
): void
Parameters
Name | Type |
---|---|
render | IFunction |
Returns
void
Defined in
leafer/packages/interface/src/platform/IPlatform.ts:15
layout
▸ layout(target
): void
Parameters
Name | Type |
---|---|
target | ILeaf |
Returns
void