Skip to content

leaferjs

Table of contents

References

Enumerations

Classes

Interfaces

Type Aliases

Variables

Functions

References

getMatrixData

Renames and re-exports __type

Type Aliases

IEditPointType

Ƭ IEditPointType: "rotate" | "resize"

Defined in

in/packages/interface/src/editor/IEditPoint.ts:9


IScrollBarTheme

Ƭ IScrollBarTheme: "light" | "dark" | IBoxInputData

Defined in

in/packages/interface/src/scroll/IScrollBar.ts:9


ILeaferType

Ƭ ILeaferType: "draw" | "design" | "board" | "document" | "app" | "website" | "game" | "player" | "chart"

Defined in

leafer/packages/interface/src/app/ILeafer.ts:20


IZoomType

Ƭ IZoomType: "in" | "out" | "fit" | "fit-width" | "fit-height" | number | ILeaf | ILeaf[] | IBoundsData

Defined in

leafer/packages/interface/src/app/ILeafer.ts:86


IWindingRule

Ƭ IWindingRule: "evenodd" | "nonzero"

Defined in

leafer/packages/interface/src/canvas/ICanvas.ts:3


ICanvasPattern

Ƭ ICanvasPattern: CanvasPattern

Defined in

leafer/packages/interface/src/canvas/ICanvas.ts:114


ICanvasContext2DSettings

Ƭ ICanvasContext2DSettings: ICanvasRenderingContext2DSettings

Defined in

leafer/packages/interface/src/canvas/ICanvas.ts:135


IHitCanvasConfig

Ƭ IHitCanvasConfig: ILeaferCanvasConfig

Defined in

leafer/packages/interface/src/canvas/ILeaferCanvas.ts:21


ILeaferCanvasView

Ƭ ILeaferCanvasView: any

Defined in

leafer/packages/interface/src/canvas/ILeaferCanvas.ts:142


IBlob

Ƭ IBlob: any

Defined in

leafer/packages/interface/src/canvas/ILeaferCanvas.ts:213


ICanvasType

Ƭ ICanvasType: "skia" | "napi" | "canvas" | "wx"

Defined in

leafer/packages/interface/src/canvas/ISkiaCanvas.ts:3


INumber

Ƭ INumber: number

Defined in

leafer/packages/interface/src/data/IData.ts:1


IBoolean

Ƭ IBoolean: boolean

Defined in

leafer/packages/interface/src/data/IData.ts:2


IString

Ƭ IString: string

Defined in

leafer/packages/interface/src/data/IData.ts:3


IValue

Ƭ IValue: INumber | IBoolean | IString | IObject

Defined in

leafer/packages/interface/src/data/IData.ts:4


ITimer

Ƭ ITimer: any

Defined in

leafer/packages/interface/src/data/IData.ts:5


IPathString

Ƭ IPathString: string

Defined in

leafer/packages/interface/src/data/IData.ts:7


IFourNumber

Ƭ IFourNumber: number | number[]

Defined in

leafer/packages/interface/src/data/IData.ts:9


ILeafListItemCallback

Ƭ ILeafListItemCallback: (item: ILeaf, index?: number) => void

Type declaration

▸ (item, index?): void

Parameters
NameType
itemILeaf
index?number
Returns

void

Defined in

leafer/packages/interface/src/data/IList.ts:12


IHitType

Ƭ IHitType: "path" | "pixel" | "all" | "none"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:93


IMaskType

Ƭ IMaskType: "path" | "pixel" | "clipping"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:99


IBlendMode

Ƭ IBlendMode: "pass-through" | "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity" | "source-over" | "source-in" | "source-out" | "source-atop" | "destination-over" | "destination-in" | "destination-out" | "destination-atop" | "xor"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:104


IEditSize

Ƭ IEditSize: "size" | "scale"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:132


IAround

Ƭ IAround: "topLeft" | "top" | "topRight" | "right" | "bottomRight" | "bottom" | "bottomLeft" | "left" | "center" | IPointData

Defined in

leafer/packages/interface/src/display/ILeaf.ts:140


ICursorType

Ƭ ICursorType: IImageCursor | "" | "auto" | "default" | "none" | "context-menu" | "help" | "pointer" | "progress" | "wait" | "cell" | "crosshair" | "text" | "vertical-text" | "alias" | "copy" | "move" | "no-drop" | "not-allowed" | "grab" | "grabbing" | "e-resize" | "n-resize" | "ne-resize" | "nw-resize" | "s-resize" | "se-resize" | "sw-resize" | "w-resize" | "ew-resize" | "ns-resize" | "nesw-resize" | "nwse-resize" | "col-resize" | "row-resize" | "all-scroll" | "zoom-in" | "zoom-out"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:152


IStateStyleType

Ƭ IStateStyleType: "hoverStyle" | "pressStyle" | "focusStyle" | "selectedStyle" | "disabledStyle"

Defined in

leafer/packages/interface/src/display/ILeaf.ts:192


ILeafAttrDescriptor

Ƭ ILeafAttrDescriptor: IObject & ThisType<ILeaf>

Defined in

leafer/packages/interface/src/display/ILeaf.ts:554


IBranchRenderModule

Ƭ IBranchRenderModule: IBranchRender & ThisType<IBranch>

Defined in

leafer/packages/interface/src/display/module/IBranchRender.ts:6


ILeafBoundsModule

Ƭ ILeafBoundsModule: ILeafBounds & ThisType<ILeaf>

Defined in

leafer/packages/interface/src/display/module/ILeafBounds.ts:3


ILeafDataProxyModule

Ƭ ILeafDataProxyModule: ILeafDataProxy & ThisType<ILeaf>

Defined in

leafer/packages/interface/src/display/module/ILeafDataProxy.ts:4


ILeafEventerModule

Ƭ ILeafEventerModule: ILeafEventer & ThisType<ILeaf>

Defined in

leafer/packages/interface/src/display/module/ILeafEventer.ts:7


ILeafHitModule

Ƭ ILeafHitModule: ILeafHit & ThisType<ILeaf>

Defined in

leafer/packages/interface/src/display/module/ILeafHit.ts:5


ILeafMatrixModule

Ƭ ILeafMatrixModule: ILeafMatrix & ThisType<ILeaf>

Defined in

leafer/packages/interface/src/display/module/ILeafMatrix.ts:3


ILeafRenderModule

Ƭ ILeafRenderModule: ILeafRender & ThisType<ILeaf>

Defined in

leafer/packages/interface/src/display/module/ILeafRender.ts:5


IEventListener

Ƭ IEventListener: IFunction

Defined in

leafer/packages/interface/src/event/IEventer.ts:8


InnerId

Ƭ InnerId: number

Defined in

leafer/packages/interface/src/event/IEventer.ts:30


PointerType

Ƭ PointerType: "mouse" | "pen" | "touch"

Defined in

leafer/packages/interface/src/event/IUIEvent.ts:43


IExportImageType

Ƭ IExportImageType: "jpg" | "png" | "webp"

Defined in

leafer/packages/interface/src/file/IFileType.ts:1


IExportFileType

Ƭ IExportFileType: IExportImageType | "svg" | "pdf" | "json"

Defined in

leafer/packages/interface/src/file/IFileType.ts:2


ILocationType

Ƭ ILocationType: "world" | "page" | "local" | "inner"

Defined in

leafer/packages/interface/src/layout/ILeafLayout.ts:4


IBoundsType

Ƭ IBoundsType: "content" | "box" | "stroke" | "margin" | "render"

Defined in

leafer/packages/interface/src/layout/ILeafLayout.ts:5


ILayoutAttr

Ƭ ILayoutAttr: "x" | "y" | "scaleX" | "scaleY" | "rotation" | "skewX" | "skewY"

Defined in

leafer/packages/interface/src/math/IMath.ts:154


MCommandData

Ƭ MCommandData: [Command, x, y]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:15


HCommandData

Ƭ HCommandData: [Command, x]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:16


VCommandData

Ƭ VCommandData: [Command, y]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:17


LCommandData

Ƭ LCommandData: MCommandData

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:18


CCommandData

Ƭ CCommandData: [Command, x1, y1, x2, y2, x, y]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:20


SCommandData

Ƭ SCommandData: [Command, x2, y2, x, y]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:21


QCommandData

Ƭ QCommandData: [Command, x1, y1, x, y]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:23


TCommandData

Ƭ TCommandData: [Command, x, y]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:24


ZCommandData

Ƭ ZCommandData: [Command]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:26


ACommandData

Ƭ ACommandData: [Command, radiusX, radiusY, xAxisRotation, largeArcFlag, sweepFlag, x, y]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:28


RectCommandData

Ƭ RectCommandData: [Command, x, y, width, height]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:41


RoundRectCommandData

Ƭ RoundRectCommandData: [Command, x, y, width, height, cornerRadius]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:42


EllipseCommandData

Ƭ EllipseCommandData: [Command, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:43


ArcCommandData

Ƭ ArcCommandData: [Command, x, y, radius, startAngle, endAngle, anticlockwise]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:44


ArcToCommandData

Ƭ ArcToCommandData: [Command, x1, y1, x2, y2, radius]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:45


CanvasPathCommand

Ƭ CanvasPathCommand: 1 | 2 | 5 | 7 | 11

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:48


IPathCommandData

Ƭ IPathCommandData: number[]

Defined in

leafer/packages/interface/src/path/IPathCommand.ts:50


IAnswer

Ƭ IAnswer: 0 | 1 | 2 | 3

Defined in

leafer/packages/interface/src/selector/ISelector.ts:26


IUITag

Ƭ IUITag: "App" | "Leafer" | "Rect" | "Ellipse" | "Polygon" | "Star" | "Line" | "Path" | "Pen" | "Text" | "Image" | "Canvas" | "Group" | "Frame" | "Box"

Defined in

ui/packages/interface/src/IUI.ts:392


IUIBoundsModule

Ƭ IUIBoundsModule: IUIBounds & ThisType<IUI>

Defined in

ui/packages/interface/src/module/IUIBounds.ts:5


IUIHitModule

Ƭ IUIHitModule: ILeafHit & ThisType<IUI>

Defined in

ui/packages/interface/src/module/IUIHit.ts:5


IUIRenderModule

Ƭ IUIRenderModule: IUIRender & ThisType<IUI>

Defined in

ui/packages/interface/src/module/IUIRender.ts:5


IRectRenderModule

Ƭ IRectRenderModule: IRectRender & ThisType<IRect>

Defined in

ui/packages/interface/src/module/IUIRender.ts:11


IImageRenderModule

Ƭ IImageRenderModule: IImageRender & ThisType<IImage>

Defined in

ui/packages/interface/src/module/IUIRender.ts:17


ITextRenderModule

Ƭ ITextRenderModule: ITextRender & ThisType<IText>

Defined in

ui/packages/interface/src/module/IUIRender.ts:23


IGroupRenderModule

Ƭ IGroupRenderModule: IGroupRender & ThisType<IGroup>

Defined in

ui/packages/interface/src/module/IUIRender.ts:29


IFrameRenderModule

Ƭ IFrameRenderModule: IFrameRender & ThisType<IFrame>

Defined in

ui/packages/interface/src/module/IUIRender.ts:35


ILeafPaintColor

Ƭ ILeafPaintColor: IColorString | CanvasGradient | CanvasPattern

Defined in

ui/packages/interface/src/type/IComputedType.ts:7


ILeafFill

Ƭ ILeafFill: ILeafPaint

Defined in

ui/packages/interface/src/type/IComputedType.ts:33


IPercent

Ƭ IPercent: string

Defined in

ui/packages/interface/src/type/IStringType.ts:1


IColorString

Ƭ IColorString: string

Defined in

ui/packages/interface/src/type/IStringType.ts:2


ICornerRadiusString

Ƭ ICornerRadiusString: string

Defined in

ui/packages/interface/src/type/IStringType.ts:4


IStrokeWidthString

Ƭ IStrokeWidthString: string

Defined in

ui/packages/interface/src/type/IStringType.ts:5


IDashPatternString

Ƭ IDashPatternString: string

Defined in

ui/packages/interface/src/type/IStringType.ts:6


IPaintString

Ƭ IPaintString: ISolidPaintString | IGradientPaintString | IImagePaintString

Defined in

ui/packages/interface/src/type/IStringType.ts:8


IShadowString

Ƭ IShadowString: string

Defined in

ui/packages/interface/src/type/IStringType.ts:13


IPaint

Ƭ IPaint: ISolidPaint | IGradientPaint | IImagePaint

Defined in

ui/packages/interface/src/type/IType.ts:9


IFill

Ƭ IFill: IPaint | IPaint[] | IPaintString

Defined in

ui/packages/interface/src/type/IType.ts:11


IStroke

Ƭ IStroke: IPaint | IPaint[] | IPaintString

Defined in

ui/packages/interface/src/type/IType.ts:13


IPaintAttr

Ƭ IPaintAttr: "fill" | "stroke"

Defined in

ui/packages/interface/src/type/IType.ts:15


IColor

Ƭ IColor: IColorString | IRGB | IRGBA

Defined in

ui/packages/interface/src/type/IType.ts:41


IImagePaintMode

Ƭ IImagePaintMode: "cover" | "fit" | "strench" | "clip" | "repeat"

Defined in

ui/packages/interface/src/type/IType.ts:91


IRepeat

Ƭ IRepeat: boolean | "x" | "y"

Defined in

ui/packages/interface/src/type/IType.ts:92


IStrokeAlign

Ƭ IStrokeAlign: "inside" | "outside" | "center"

Defined in

ui/packages/interface/src/type/IType.ts:95


IStrokeCap

Ƭ IStrokeCap: "none" | "round" | "square"

Defined in

ui/packages/interface/src/type/IType.ts:96


IStrokeJoin

Ƭ IStrokeJoin: "bevel" | "round" | "miter"

Defined in

ui/packages/interface/src/type/IType.ts:97


IArrowType

Ƭ IArrowType: IPathDataArrow | "none" | "angle" | "angle-side" | "arrow" | "triangle" | "triangle-flip" | "circle" | "circle-line" | "square" | "square-line" | "diamond" | "diamond-line" | "mark"

Defined in

ui/packages/interface/src/type/IType.ts:100


ITextAlign

Ƭ ITextAlign: "left" | "center" | "right" | "justify"

Defined in

ui/packages/interface/src/type/IType.ts:119


IVerticalAlign

Ƭ IVerticalAlign: "top" | "middle" | "bottom"

Defined in

ui/packages/interface/src/type/IType.ts:120


ITextCase

Ƭ ITextCase: "upper" | "lower" | "title" | "none" | "small-caps"

Defined in

ui/packages/interface/src/type/IType.ts:121


IFontWeight

Ƭ IFontWeight: IFontWeightNumer | IFontWeightString

Defined in

ui/packages/interface/src/type/IType.ts:122


ITextDecoration

Ƭ ITextDecoration: "none" | "under" | "delete"

Defined in

ui/packages/interface/src/type/IType.ts:134


ITextWrap

Ƭ ITextWrap: "normal" | "none" | "break"

Defined in

ui/packages/interface/src/type/IType.ts:135


IOverflow

Ƭ IOverflow: "show" | "hide"

Defined in

ui/packages/interface/src/type/IType.ts:165

Variables

PathArrowModule

Const PathArrowModule: IPathArrowModule

Defined in

in/packages/arrow/src/PathArrowModule.ts:14


PathMatrixHelper

Const PathMatrixHelper: Object

Type declaration

NameType
layout(data: IPathCommandData, x: number, y: number, scaleX?: number, scaleY?: number, rotation?: number, origin?: IPointData) => void
rotate(data: IPathCommandData, rotation?: number, center?: IPointData) => void

Defined in

in/packages/arrow/src/PathMatrixHelper.ts:9


EditDataHelper

Const EditDataHelper: Object

Type declaration

NameType
getScaleData(bounds: IBoundsData, direction: IDirection8, pointMove: IPointData, lockRatio: boolean | "corner", around: IAround) => IEditorScaleEvent
getRotateData(bounds: IBoundsData, direction: IDirection8, current: IPointData, last: IPointData, around: IAround) => IEditorRotateEvent
getSkewData(bounds: IBoundsData, direction: IDirection8, move: IPointData, around: IAround) => IEditorSkewEvent
getAround(around: IAround, altKey: boolean) => IAround
getRotateDirection(direction: number, rotation: number, totalDirection: number) => number
getFlipDirection(direction: IDirection8, flipedX: boolean, flipedY: boolean) => IDirection8

Defined in

in/packages/editor/src/helper/EditDataHelper.ts:10


EditSelectHelper

Const EditSelectHelper: Object

Type declaration

NameType
findOne(path: ILeafList) => IUI
findBounds(leaf: IUI, bounds: IBounds) => Answer

Defined in

in/packages/editor/src/helper/EditSelectHelper.ts:6


EditorHelper

Const EditorHelper: Object

Type declaration

NameType
group(list: IUI[], element?: IUI, userGroup?: IGroup | IGroupInputData) => IGroup
ungroup(list: IUI[]) => IUI[]
toTop(list: IUI[]) => void
toBottom(list: IUI[]) => void

Defined in

in/packages/editor/src/helper/EditorHelper.ts:8


canvasSizeAttrs

Const canvasSizeAttrs: string[]

Defined in

leafer/packages/canvas/canvas/src/LeaferCanvasBase.ts:12


Run

Const Run: Object

Type declaration

NameType
currentIdnumber
currentNamestring
idMapids
nameMapnames
nameToIdMapids
start(name: string, microsecond?: boolean) => number
end(id: number, microsecond?: boolean) => void
endOfName(name: string, microsecond?: boolean) => void

Defined in

leafer/packages/debug/src/Run.ts:15


DataHelper

Const DataHelper: Object

Type declaration

NameType
default<T>(t: T, defaultData: IObject) => T
assign(t: IObject, merge: IObject) => void
copyAttrs(t: IObject, from: IObject, include: string[]) => IObject
clone(data: unknown) => IObject

Defined in

leafer/packages/display-module/data/src/DataHelper.ts:4


emptyData

Const emptyData: IObject = {}

Defined in

leafer/packages/display-module/data/src/index.ts:13


BranchRender

Const BranchRender: IBranchRenderModule

Defined in

leafer/packages/display-module/display-module/src/BranchRender.ts:7


LeafBounds

Const LeafBounds: ILeafBoundsModule

Defined in

leafer/packages/display-module/display-module/src/LeafBounds.ts:12


LeafDataProxy

Const LeafDataProxy: ILeafDataProxyModule

Defined in

leafer/packages/display-module/display-module/src/LeafDataProxy.ts:9


LeafEventer

Const LeafEventer: ILeafEventerModule

Defined in

leafer/packages/display-module/display-module/src/LeafEventer.ts:6


LeafMatrix

Const LeafMatrix: ILeafMatrixModule

Defined in

leafer/packages/display-module/display-module/src/LeafMatrix.ts:8


LeafRender

Const LeafRender: ILeafRenderModule

Defined in

leafer/packages/display-module/display-module/src/LeafRender.ts:4


BranchHelper

Const BranchHelper: Object

Type declaration

NameType
sort(a: ILeaf, b: ILeaf) => number
pushAllChildBranch(branch: ILeaf, leafList: ILeafList | ILeafLevelList) => void
pushAllParent(leaf: ILeaf, leafList: ILeafList | ILeafLevelList) => void
pushAllBranchStack(branch: ILeaf, pushList: ILeaf[]) => void
updateBounds(branch: ILeaf, exclude?: ILeaf) => void
updateBoundsByBranchStack(branchStack: ILeaf[], exclude?: ILeaf) => void

Defined in

leafer/packages/display-module/helper/src/BranchHelper.ts:7


LeafBoundsHelper

Const LeafBoundsHelper: Object

Type declaration

NameType
worldBounds(target: ILeaf) => IBoundsData
localBoxBounds(target: ILeaf) => IBoundsData
localStrokeBounds(target: ILeaf) => IBoundsData
localRenderBounds(target: ILeaf) => IBoundsData
maskLocalBoxBounds(target: ILeaf) => IBoundsData
maskLocalStrokeBounds(target: ILeaf) => IBoundsData
maskLocalRenderBounds(target: ILeaf) => IBoundsData
excludeRenderBounds(child: ILeaf, options: IRenderOptions) => boolean

Defined in

leafer/packages/display-module/helper/src/LeafBoundsHelper.ts:4


LeafHelper

Const LeafHelper: Object

Type declaration

NameType
updateAllMatrix(leaf: ILeaf, checkAutoLayout?: boolean, waitAutoLayout?: boolean) => void
updateMatrix(leaf: ILeaf, checkAutoLayout?: boolean, waitAutoLayout?: boolean) => void
updateBounds(leaf: ILeaf) => void
updateAllWorldOpacity(leaf: ILeaf) => void
updateAllChange(leaf: ILeaf) => void
worldHittable(t: ILeaf) => boolean
moveWorld(t: ILeaf, x: number, y: number) => void
moveLocal(t: ILeaf, x: number, y: number) => void
zoomOfWorld(t: ILeaf, origin: IPointData, scaleX: number, scaleY?: number, resize?: boolean) => void
zoomOfLocal(t: ILeaf, origin: IPointData, scaleX: number, scaleY: number, resize?: boolean) => void
rotateOfWorld(t: ILeaf, origin: IPointData, angle: number) => void
rotateOfLocal(t: ILeaf, origin: IPointData, angle: number) => void
skewOfWorld(t: ILeaf, origin: IPointData, skewX: number, skewY?: number, resize?: boolean) => void
skewOfLocal(t: ILeaf, origin: IPointData, skewX: number, skewY: number, resize?: boolean) => void
transformWorld(t: ILeaf, transform: IMatrixData, resize?: boolean) => void
transform(t: ILeaf, transform: IMatrixData, resize?: boolean) => void
setTransform(t: ILeaf, transform: IMatrixData, resize?: boolean) => void
getRelativeWorld(t: ILeaf, relative: ILeaf, temp?: boolean) => IMatrixData
drop(t: ILeaf, parent: ILeaf, index?: number, resize?: boolean) => void
hasParent(p: ILeaf, parent: ILeaf) => boolean | void
hasParentAutoLayout(p: ILeaf) => boolean | void

Defined in

leafer/packages/display-module/helper/src/LeafHelper.ts:8


WaitHelper

Const WaitHelper: Object

Type declaration

NameType
run(wait: IFunction[]) => void

Defined in

leafer/packages/display-module/helper/src/WaitHelper.ts:3


FileHelper

Const FileHelper: Object

Type declaration

NameType
opacityTypesIExportFileType[]
upperCaseTypeMapIStringMap
mineType(type: string) => string
fileType(filename: string) => string
isOpaqueImage(filename: string) => boolean
getExportOptions(options?: number | boolean | IExportOptions) => IExportOptions

Defined in

leafer/packages/file/src/FileHelper.ts:3


ImageManager

Const ImageManager: IImageManager

Defined in

leafer/packages/image/image/src/ImageManager.ts:7


AroundHelper

Const AroundHelper: Object

Type declaration

NameType
directionDataIPointData[]
tempPointIPointData
get(around: IAround) => IPointData
toPoint(around: IAround, bounds: IBoundsData, to?: IPointData, onlySize?: boolean) => void

Defined in

leafer/packages/math/src/AroundHelper.ts:17


tempBounds

Const tempBounds: Bounds

Defined in

leafer/packages/math/src/Bounds.ts:175


BoundsHelper

Const BoundsHelper: Object

Type declaration

NameType
tempBoundsIBoundsData
set(t: IBoundsData, x: number, y: number, width: number, height: number) => void
copy(t: IBoundsData, bounds: IBoundsData) => void
copyAndSpread(t: IBoundsData, bounds: IBoundsData, spreadX: IFourNumber, spreadY?: number) => void
minX(t: IBoundsData) => number
minY(t: IBoundsData) => number
maxX(t: IBoundsData) => number
maxY(t: IBoundsData) => number
move(t: IBoundsData, x: number, y: number) => void
getByMove(t: IBoundsData, x: number, y: number) => IBoundsData
toOffsetOutBounds(t: IBoundsData, to?: IOffsetBoundsData, parent?: IBoundsData) => void
scale(t: IBoundsData, scaleX: number, scaleY: number) => void
scaleOf(t: IBoundsData, origin: IPointData, scaleX: number, scaleY: number) => void
tempToOuterOf(t: IBoundsData, matrix: IMatrixData) => IBoundsData
getOuterOf(t: IBoundsData, matrix: IMatrixData) => IBoundsData
toOuterOf(t: IBoundsData, matrix: IMatrixData, to?: IBoundsData) => void
toInnerOf(t: IBoundsData, matrix: IMatrixData, to?: IBoundsData) => void
getFitMatrix(t: IBoundsData, put: IBoundsData, baseScale: number) => IMatrix
getSpread(t: IBoundsData, spreadX: IFourNumber, spreadY?: number) => IBoundsData
spread(t: IBoundsData, spreadX: IFourNumber, spreadY: IFourNumber) => void
ceil(t: IBoundsData) => void
unsign(t: IBoundsData) => void
float(t: IBoundsData, maxLength?: number) => void
add(t: IBoundsData, bounds: IBoundsData, isPoint?: boolean) => void
addList(t: IBoundsData, list: IBoundsData[]) => void
setList(t: IBoundsData, list: IBoundsData[], addMode: boolean) => void
addListWithFn(t: IBoundsData, list: IObject[], boundsDataFn: IBoundsDataFn) => void
setListWithFn(t: IBoundsData, list: IObject[], boundsDataFn: IBoundsDataFn, addMode: boolean) => void
setPoints(t: IBoundsData, points: IPointData[]) => void
addPoint(t: IBoundsData, point: IPointData) => void
getPoints(t: IBoundsData) => IPointData[]
hitRadiusPoint(t: IBoundsData, point: IRadiusPointData, pointMatrix?: IMatrixWithScaleData) => boolean
hitPoint(t: IBoundsData, point: IPointData, pointMatrix?: IMatrixData) => boolean
hit(t: IBoundsData, other: IBoundsData, otherMatrix?: IMatrixData) => boolean
includes(t: IBoundsData, other: IBoundsData, otherMatrix?: IMatrixData) => boolean
getIntersectData(t: IBoundsData, other: IBoundsData, otherMatrix?: IMatrixData) => IBoundsData
intersect(t: IBoundsData, other: IBoundsData, otherMatrix?: IMatrixData) => void
isSame(t: IBoundsData, bounds: IBoundsData) => boolean
isEmpty(t: IBoundsData) => boolean
reset(t: IBoundsData) => void

Defined in

leafer/packages/math/src/BoundsHelper.ts:18


IncrementId

Const IncrementId: Object

Type declaration

NameType
RUNTIMEstring
LEAFstring
TASKstring
CNAVASstring
IMAGEstring
typesINumberMap
create(typeName: string) => number

Defined in

leafer/packages/math/src/IncrementId.ts:4


MathHelper

Const MathHelper: Object

Type declaration

NameType
within(value: number, min: number, max: number) => number
minus(value: number | number[], isFourNumber: boolean) => number | number[]
fourNumber(num: number | number[], maxValue?: number) => number[]
formatRotation(rotation: number, unsign?: boolean) => number
getGapRotation(addRotation: number, gap: number, oldRotation: number) => number
float(num: number, maxLength?: number) => number

Defined in

leafer/packages/math/src/MathHelper.ts:5


OneRadian

Const OneRadian: number

Defined in

leafer/packages/math/src/MathHelper.ts:76


PI2

Const PI2: number

Defined in

leafer/packages/math/src/MathHelper.ts:77


PI_2

Const PI_2: number

Defined in

leafer/packages/math/src/MathHelper.ts:78


tempMatrix

Const tempMatrix: Matrix

Defined in

leafer/packages/math/src/Matrix.ts:168


MatrixHelper

Const MatrixHelper: Object

Type declaration

NameType
defaultMatrixIMatrixData
defaultWorldIMatrixWithLayoutData
tempMatrixIMatrixData
set(t: IMatrixData, a: number, b: number, c: number, d: number, e: number, f: number) => void
get() => IMatrixData
getWorld() => IMatrixWithLayoutData
copy(t: IMatrixData, matrix: IMatrixData) => void
translate(t: IMatrixData, x: number, y: number) => void
translateInner(t: IMatrixData, x: number, y: number) => void
scale(t: IMatrixData, scaleX: number, scaleY: number) => void
scaleOfOuter(t: IMatrixData, origin: IPointData, scaleX: number, scaleY?: number) => void
scaleOfInner(t: IMatrixData, origin: IPointData, scaleX: number, scaleY: number) => void
rotate(t: IMatrixData, rotation: number) => void
rotateOfOuter(t: IMatrixData, origin: IPointData, rotation: number) => void
rotateOfInner(t: IMatrixData, origin: IPointData, rotation: number) => void
skew(t: IMatrixData, skewX: number, skewY?: number) => void
skewOfOuter(t: IMatrixData, origin: IPointData, skewX: number, skewY?: number) => void
skewOfInner(t: IMatrixData, origin: IPointData, skewX: number, skewY: number) => void
multiply(t: IMatrixData, child: IMatrixData) => void
multiplyParent(t: IMatrixWithOptionScaleData, parent: IMatrixWithOptionScaleData, to?: IMatrixWithOptionScaleData, abcdChanged?: number | boolean, childScaleData?: IScaleData) => void
divide(t: IMatrixData, child: IMatrixData) => void
divideParent(t: IMatrixData, parent: IMatrixData) => void
tempInvert(t: IMatrixData) => IMatrixData
invert(t: IMatrixData) => void
toOuterPoint(t: IMatrixData, inner: IPointData, to?: IPointData, distance?: boolean) => void
toInnerPoint(t: IMatrixData, outer: IPointData, to?: IPointData, distance?: boolean) => void
setLayout(t: IMatrixData, layout: ILayoutData, origin?: IPointData, bcChanged?: number | boolean) => void
getLayout(t: IMatrixData, origin?: IPointData, firstSkewY?: boolean) => ILayoutData
withScale(t: IMatrixData, scaleX?: number, scaleY: number) => IMatrixWithScaleData
reset(t: IMatrixData) => void

Defined in

leafer/packages/math/src/MatrixHelper.ts:13


tempPoint

Const tempPoint: Point

Defined in

leafer/packages/math/src/Point.ts:98


PointHelper

Const PointHelper: Object

Type declaration

NameType
defaultPointIPointData
tempPointIPointData
tempRadiusPointIRadiusPointData
set(t: IPointData, x: number, y: number) => void
setRadius(t: IRadiusPointData, x: number, y?: number) => void
copy(t: IPointData, point: IPointData) => void
copyFrom(t: IPointData, x: number, y: number) => void
move(t: IPointData, x: number, y: number) => void
scale(t: IPointData, scaleX: number, scaleY: number) => void
scaleOf(t: IPointData, origin: IPointData, scaleX: number, scaleY: number) => void
rotate(t: IPointData, rotation: number, origin?: IPointData) => void
tempToInnerOf(t: IPointData, matrix: IMatrixData) => IPointData
tempToOuterOf(t: IPointData, matrix: IMatrixData) => IPointData
tempToInnerRadiusPointOf(t: IRadiusPointData, matrix: IMatrixWithScaleData) => IRadiusPointData
toInnerRadiusPointOf(t: IRadiusPointData, matrix: IMatrixWithScaleData, to?: IRadiusPointData) => void
toInnerOf(t: IPointData, matrix: IMatrixData, to?: IPointData) => void
toOuterOf(t: IPointData, matrix: IMatrixData, to?: IPointData) => void
getCenter(t: IPointData, to: IPointData) => IPointData
getCenterX(x1: number, x2: number) => number
getCenterY(y1: number, y2: number) => number
getDistance(t: IPointData, point: IPointData) => number
getDistanceFrom(x1: number, y1: number, x2: number, y2: number) => number
getMinDistanceFrom(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number) => number
getAngle(t: IPointData, to: IPointData) => number
getRotation(t: IPointData, origin: IPointData, to: IPointData, toOrigin?: IPointData) => number
getRadianFrom(fromX: number, fromY: number, originX: number, originY: number, toX: number, toY: number, toOriginX?: number, toOriginY?: number) => number
getAtan2(t: IPointData, to: IPointData) => number
getDistancePoint(t: IPointData, to: IPointData, distance: number, changeTo: boolean) => IPointData
reset(t: IPointData) => void

Defined in

leafer/packages/math/src/PointHelper.ts:11


StringNumberMap

Const StringNumberMap: INumberMap

Defined in

leafer/packages/math/src/StringNumber.ts:4


TwoPointBoundsHelper

Const TwoPointBoundsHelper: Object

Type declaration

NameType
tempPointBoundsITwoPointBoundsData
setPoint(t: ITwoPointBoundsData, minX: number, minY: number) => void
addPoint(t: ITwoPointBoundsData, x: number, y: number) => void
addBounds(t: ITwoPointBoundsData, x: number, y: number, width: number, height: number) => void
copy(t: ITwoPointBoundsData, pb: ITwoPointBoundsData) => void
addPointBounds(t: ITwoPointBoundsData, pb: ITwoPointBoundsData) => void
toBounds(t: ITwoPointBoundsData, setBounds: IBoundsData) => void

Defined in

leafer/packages/math/src/TwoPointBoundsHelper.ts:3


BezierHelper

Const BezierHelper: Object

Type declaration

NameType
points(data: IPathCommandData, points: number[], curve?: number | boolean, close?: boolean) => void
rect(data: IPathCommandData, x: number, y: number, width: number, height: number) => void
roundRect(data: IPathCommandData, x: number, y: number, width: number, height: number, radius: number | number[]) => void
arcTo(data: void | IPathCommandData, fromX: number, fromY: number, x1: number, y1: number, toX: number, toY: number, radius: number, setPointBounds?: ITwoPointBoundsData, setEndPoint?: IPointData, setStartPoint?: IPointData) => void
arc(data: void | IPathCommandData, x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean, setPointBounds?: ITwoPointBoundsData, setEndPoint?: IPointData, setStartPoint?: IPointData) => void
ellipse(data: void | IPathCommandData, cx: number, cy: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean, setPointBounds?: ITwoPointBoundsData, setEndPoint?: IPointData, setStartPoint?: IPointData) => void
quadraticCurveTo(data: IPathCommandData, fromX: number, fromY: number, x1: number, y1: number, toX: number, toY: number) => void
toTwoPointBoundsByQuadraticCurve(fromX: number, fromY: number, x1: number, y1: number, toX: number, toY: number, pointBounds: ITwoPointBoundsData, addMode?: boolean) => void
toTwoPointBounds(fromX: number, fromY: number, x1: number, y1: number, x2: number, y2: number, toX: number, toY: number, pointBounds: ITwoPointBoundsData, addMode?: boolean) => void
getPointAndSet(t: number, fromX: number, fromY: number, x1: number, y1: number, x2: number, y2: number, toX: number, toY: number, setPoint: IPointData) => void
getPoint(t: number, fromX: number, fromY: number, x1: number, y1: number, x2: number, y2: number, toX: number, toY: number) => IPointData

Defined in

leafer/packages/path/src/BezierHelper.ts:14


EllipseHelper

Const EllipseHelper: Object

Type declaration

NameType
ellipticalArc(data: IPathCommandData, fromX: number, fromY: number, radiusX: number, radiusY: number, rotation: number, largeFlag: number, sweepFlag: number, toX: number, toY: number, curveMode?: boolean) => void

Defined in

leafer/packages/path/src/EllipseHelper.ts:12


PathBounds

Const PathBounds: Object

Type declaration

NameType
toBounds(data: IPathCommandData, setBounds: IBoundsData) => void
toTwoPointBounds(data: IPathCommandData, setPointBounds: ITwoPointBoundsData) => void

Defined in

leafer/packages/path/src/PathBounds.ts:19


PathCommandDataHelper

Const PathCommandDataHelper: Object

Type declaration

NameType
beginPath(data: IPathCommandData) => void
moveTo(data: IPathCommandData, x: number, y: number) => void
lineTo(data: IPathCommandData, x: number, y: number) => void
bezierCurveTo(data: IPathCommandData, x1: number, y1: number, x2: number, y2: number, x: number, y: number) => void
quadraticCurveTo(data: IPathCommandData, x1: number, y1: number, x: number, y: number) => void
closePath(data: IPathCommandData) => void
rect(data: IPathCommandData, x: number, y: number, width: number, height: number) => void
roundRect(data: IPathCommandData, x: number, y: number, width: number, height: number, cornerRadius: number | number[]) => void
ellipse(data: IPathCommandData, x: number, y: number, radiusX: number, radiusY: number, rotation?: number, startAngle?: number, endAngle?: number, anticlockwise?: boolean) => void
arc(data: IPathCommandData, x: number, y: number, radius: number, startAngle?: number, endAngle?: number, anticlockwise?: boolean) => void
arcTo(data: IPathCommandData, x1: number, y1: number, x2: number, y2: number, radius: number, lastX?: number, lastY?: number) => void
drawEllipse(data: IPathCommandData, x: number, y: number, radiusX: number, radiusY: number, rotation?: number, startAngle?: number, endAngle?: number, anticlockwise?: boolean) => void
drawArc(data: IPathCommandData, x: number, y: number, radius: number, startAngle?: number, endAngle?: number, anticlockwise?: boolean) => void
drawPoints(data: IPathCommandData, points: number[], curve?: number | boolean, close?: boolean) => void

Defined in

leafer/packages/path/src/PathCommandDataHelper.ts:13


PathCommandMap

Const PathCommandMap: INumberMap

Defined in

leafer/packages/path/src/PathCommandMap.ts:16


NeedConvertToCanvasCommandMap

Const NeedConvertToCanvasCommandMap: INumberMap

Defined in

leafer/packages/path/src/PathCommandMap.ts:83


PathNumberCommandMap

Const PathNumberCommandMap: IStringMap = {}

Defined in

leafer/packages/path/src/PathCommandMap.ts:116


PathNumberCommandLengthMap

Const PathNumberCommandLengthMap: INumberMap = {}

Defined in

leafer/packages/path/src/PathCommandMap.ts:122


PathConvert

Const PathConvert: Object

Type declaration

NameType
currentICurrentCommand
stringify(data: IPathCommandData, floatLength?: number) => string
parse(pathString: string, curveMode?: boolean) => IPathCommandData
toCanvasData(old: IPathCommandData, curveMode?: boolean) => IPathCommandData
copyData(data: IPathCommandData, old: IPathCommandData, index: number, count: number) => void
pushData(data: IPathCommandData, strNum: string | number) => void

Defined in

leafer/packages/path/src/PathConvert.ts:25


PathCorner

Const PathCorner: Object

Type declaration

NameType
smooth(data: IPathCommandData, cornerRadius: number, _cornerSmoothing?: number) => IPathCommandData

Defined in

leafer/packages/path/src/PathCorner.ts:12


PathDrawer

Const PathDrawer: Object

Type declaration

NameType
drawPathByData(drawer: IPathDrawer, data: IPathCommandData) => void

Defined in

leafer/packages/path/src/PathDrawer.ts:11


PathHelper

Const PathHelper: Object

Type declaration

NameType
creatorIPathCreator
parse(_pathString: string, _curveMode?: boolean) => IPathCommandData
convertToCanvasData(_old: IPathCommandData, _curveMode?: boolean) => IPathCommandData

Defined in

leafer/packages/path/src/PathHelper.ts:3


RectHelper

Const RectHelper: Object

Type declaration

NameType
drawRoundRect(drawer: IPathDrawer, x: number, y: number, width: number, height: number, cornerRadius: number | number[]) => void

Defined in

leafer/packages/path/src/RectHelper.ts:4


pen

Const pen: PathCreator

Defined in

leafer/packages/path/src/index.ts:23


Platform

Const Platform: IPlatform

Defined in

leafer/packages/platform/platform/src/Platform.ts:4


Creator

Const Creator: ICreator = {}

Defined in

leafer/packages/platform/platform/src/creator/Creator.ts:4


EventCreator

Const EventCreator: Object

Type declaration

NameType
nameListIObject
register(Event: IObject) => void
changeName(oldName: string, newName: string) => void
has(type: string) => boolean
get(type: string, ...params: unknown[]) => IEvent

Defined in

leafer/packages/platform/platform/src/creator/EventCreator.ts:7


UICreator

Const UICreator: Object

Type declaration

NameType
listIObject
register(UI: IObject) => void
get(tag: string, data?: IObject, x?: number, y?: number, width?: number, height?: number) => ILeaf

Defined in

leafer/packages/platform/platform/src/creator/UICreator.ts:7


version

Const version: "1.0.0-rc.21"

Defined in

ui/packages/core/draw/src/index.ts:1


UIBounds

Const UIBounds: IUIBoundsModule

Defined in

ui/packages/display-module/bounds/src/UIBounds.ts:6


UnitConvert

Const UnitConvert: Object

Type declaration

NameType
number(value: number | IUnitData, percentRefer?: number) => number

Defined in

ui/packages/display-module/data/src/UIData.ts:164


RectRender

Const RectRender: IRectRenderModule

Defined in

ui/packages/display-module/render/src/RectRender.ts:6


UIRender

Const UIRender: IUIRenderModule

Defined in

ui/packages/display-module/render/src/UIRender.ts:7


Keyboard

Const Keyboard: Object

Type declaration

NameType
isHoldSpaceKey() => boolean
isHold(code: string) => boolean
setDownCode(code: string) => void
setUpCode(code: string) => void

Defined in

ui/packages/event/src/Keyboard.ts:6


PointerButton

Const PointerButton: Object

Type declaration

NameType
LEFTnumber
RIGHTnumber
MIDDLEnumber
defaultLeft(event: IUIEvent) => void
left(event: IUIEvent) => boolean
right(event: IUIEvent) => boolean
middle(event: IUIEvent) => boolean

Defined in

ui/packages/event/src/PointerButton.ts:4


TextConvert

Const TextConvert: ITextConvertModule

Defined in

ui/packages/external/src/index.ts:5


ColorConvert

Const ColorConvert: IColorConvertModule

Defined in

ui/packages/external/src/index.ts:7


PathArrow

Const PathArrow: IPathArrowModule

Defined in

ui/packages/external/src/index.ts:9


Paint

Const Paint: IPaintModule

Defined in

ui/packages/external/src/index.ts:12


PaintImage

Const PaintImage: IPaintImageModule

Defined in

ui/packages/external/src/index.ts:14


PaintGradient

Const PaintGradient: IPaintGradientModule

Defined in

ui/packages/external/src/index.ts:16


Effect

Const Effect: IEffectModule

Defined in

ui/packages/external/src/index.ts:18


Export

Const Export: IExportModule

Defined in

ui/packages/external/src/index.ts:20


State

Const State: IStateModule

Defined in

ui/packages/external/src/index.ts:22


InteractionHelper

Const InteractionHelper: Object

Type declaration

NameType
getMoveEventData(center: IPointData, move: IPointData, event: IEvent) => IMoveEvent
getRotateEventData(center: IPointData, angle: number, event: IEvent) => IRotateEvent
getZoomEventData(center: IPointData, scale: number, event: IEvent) => IZoomEvent
getDragEventData(startPoint: IPointData, lastPoint: IPointData, event: IPointerEvent) => IDragEvent
getDropEventData(event: IPointerEvent, list: ILeafList, data: IObject) => IDropEvent
getSwipeDirection(angle: number) => string
getSwipeEventData(startPoint: IPointData, lastDragData: IDragEvent, event: IPointerEvent) => ISwipeEvent
getBase(e: IObject) => IUIEvent
pathHasEventType(path: ILeafList, type: string) => boolean
filterPathByEventType(path: ILeafList, type: string) => ILeafList

Defined in

ui/packages/interaction/interaction/src/InteractionHelper.ts:7


MultiTouchHelper

Const MultiTouchHelper: Object

Type declaration

NameType
getData(list: IKeepTouchData[]) => IMultiTouchData

Defined in

ui/packages/interaction/interaction/src/MultiTouchHelper.ts:5


LeaferTypeCreator

Const LeaferTypeCreator: Object

Type declaration

NameType
listILeaferTypeList
register(name: string, fn: ILeaferTypeFunction) => void
run(name: string, leafer: ILeaferBase) => void

Defined in

ui/packages/type/src/LeaferTypeCreator.ts:11

Functions

canvasPatch

canvasPatch(drawer): void

Parameters

NameType
drawerIPathDrawer

Returns

void

Defined in

leafer/packages/canvas/canvas/src/patch/index.ts:5


registerUI

registerUI(): (target: IObject) => void

Returns

fn

▸ (target): void

Parameters
NameType
targetIObject
Returns

void

Defined in

leafer/packages/decorator/src/class.ts:4


registerUIEvent

registerUIEvent(): (target: IObject) => void

Returns

fn

▸ (target): void

Parameters
NameType
targetIObject
Returns

void

Defined in

leafer/packages/decorator/src/class.ts:10


decorateLeafAttr

decorateLeafAttr(defaultValue?, descriptorFn?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue
descriptorFn?ILeafAttrDescriptorFn

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:8


attr

attr(partDescriptor?): ILeafAttrDescriptor

Parameters

NameType
partDescriptor?ILeafAttrDescriptor

Returns

ILeafAttrDescriptor

Defined in

leafer/packages/decorator/src/data.ts:12


defineLeafAttr

defineLeafAttr(target, key, defaultValue?, partDescriptor?): void

Parameters

NameType
targetILeaf
keystring
defaultValue?IValue
partDescriptor?ILeafAttrDescriptor

Returns

void

Defined in

leafer/packages/decorator/src/data.ts:17


dataType

dataType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:29


positionType

positionType(defaultValue?, checkFiniteNumber?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue
checkFiniteNumber?boolean

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:33


autoLayoutType

autoLayoutType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:42


scaleType

scaleType(defaultValue?, checkFiniteNumber?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue
checkFiniteNumber?boolean

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:53


rotationType

rotationType(defaultValue?, checkFiniteNumber?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue
checkFiniteNumber?boolean

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:62


boundsType

boundsType(defaultValue?, checkFiniteNumber?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue
checkFiniteNumber?boolean

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:72


naturalBoundsType

naturalBoundsType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:80


doBoundsType

doBoundsType(leaf): void

Parameters

NameType
leafILeaf

Returns

void

Defined in

leafer/packages/decorator/src/data.ts:90


pathInputType

pathInputType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:95


pathType

pathType(defaultValue?, checkFiniteNumber?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue
checkFiniteNumber?boolean

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:72


affectStrokeBoundsType

affectStrokeBoundsType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:108


doStrokeType

doStrokeType(leaf): void

Parameters

NameType
leafILeaf

Returns

void

Defined in

leafer/packages/decorator/src/data.ts:116


strokeType

strokeType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:108


affectRenderBoundsType

affectRenderBoundsType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:123


surfaceType

surfaceType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:132


opacityType

opacityType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:141


sortType

sortType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:150


maskType

maskType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:160


eraserType

eraserType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:170


hitType

hitType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:179


cursorType

cursorType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:189


dataProcessor

dataProcessor(processor): (target: IObject, _key?: string) => void

Parameters

NameType
processorIObject

Returns

fn

▸ (target, _key?): void

Parameters
NameType
targetIObject
_key?string
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:201


layoutProcessor

layoutProcessor(processor): (target: IObject, _key?: string) => void

Parameters

NameType
processorIObject

Returns

fn

▸ (target, _key?): void

Parameters
NameType
targetIObject
_key?string
Returns

void

Defined in

leafer/packages/decorator/src/data.ts:209


defineDataProcessor

defineDataProcessor(target, key, defaultValue?): void

Parameters

NameType
targetILeaf
keystring
defaultValue?IValue

Returns

void

Defined in

leafer/packages/decorator/src/data.ts:226


defineKey

defineKey<T>(target, key, descriptor): void

Type parameters

Name
T

Parameters

NameType
targetT
keystring
descriptorIObject & ThisType<T>

Returns

void

Defined in

leafer/packages/decorator/src/object.ts:3


getDescriptor

getDescriptor(object, name): PropertyDescriptor

Parameters

NameType
objectIObject
namestring

Returns

PropertyDescriptor

Defined in

leafer/packages/decorator/src/object.ts:7


rewrite

rewrite(method): (target: IObject, key: string) => void

Parameters

NameType
methodIFunction

Returns

fn

▸ (target, key): void

Parameters
NameType
targetIObject
keystring
Returns

void

Defined in

leafer/packages/decorator/src/rewrite.ts:18


rewriteAble

rewriteAble(): (_target: IObject) => void

Returns

fn

▸ (_target): void

Parameters
NameType
_targetIObject
Returns

void

Defined in

leafer/packages/decorator/src/rewrite.ts:24


useModule

useModule(module, exclude?): (target: IObject) => void

Parameters

NameType
moduleIObject
exclude?string[]

Returns

fn

▸ (target): void

Parameters
NameType
targetIObject
Returns

void

Defined in

leafer/packages/decorator/src/rewrite.ts:45


getPointData

getPointData(): IPointData

Returns

IPointData

Defined in

leafer/packages/math/src/MathHelper.ts:80


getBoundsData

getBoundsData(): IBoundsData

Returns

IBoundsData

Defined in

leafer/packages/math/src/MathHelper.ts:81


useCanvas

useCanvas(_canvasType, _power?): void

Parameters

NameType
_canvasTypeICanvasType
_power?IObject

Returns

void

Defined in

leafer/packages/platform/web/src/index.ts:22


stateType

stateType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

ui/packages/decorator/src/data.ts:8


arrowType

arrowType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

ui/packages/decorator/src/data.ts:17


effectType

effectType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

ui/packages/decorator/src/data.ts:28


resizeType

resizeType(defaultValue?): (target: ILeaf, key: string) => void

Parameters

NameType
defaultValue?IValue

Returns

fn

▸ (target, key): void

Parameters
NameType
targetILeaf
keystring
Returns

void

Defined in

ui/packages/decorator/src/data.ts:38


zoomLayerType

zoomLayerType(): (target: IUI, key: string) => void

Returns

fn

▸ (target, key): void

Parameters
NameType
targetIUI
keystring
Returns

void

Defined in

ui/packages/decorator/src/data.ts:48

Released under the MIT License.