@leafer/interface
Advanced tools
+1
-1
| { | ||
| "name": "@leafer/interface", | ||
| "version": "1.0.5", | ||
| "version": "1.0.6", | ||
| "description": "@leafer/interface", | ||
@@ -5,0 +5,0 @@ "author": "Chao (Leafer) Wan", |
@@ -19,3 +19,3 @@ import { ILeaferBase } from '../app/ILeafer' | ||
| import { IFindMethod } from '../selector/ISelector' | ||
| import { IPathCommandData } from '../path/IPathCommand' | ||
| import { IPathCommandObject, IPathCommandData } from '../path/IPathCommand' | ||
| import { IWindingRule, IPath2D } from '../canvas/ICanvas' | ||
@@ -250,3 +250,3 @@ import { IJSONOptions } from '../file/IExport' | ||
| path?: IPathCommandData | IPathString | ||
| path?: IPathCommandData | IPathCommandObject[] | IPathString | ||
| windingRule?: IWindingRule | ||
@@ -670,3 +670,3 @@ closed?: IBoolean | ||
| __updateSortChildren(): void | ||
| add(child: ILeaf | ILeafInputData, index?: number): void | ||
| add(child: ILeaf | ILeaf[] | ILeafInputData | ILeafInputData[], index?: number): void | ||
| remove(child?: ILeaf | number | string | IFindMethod, destroy?: boolean): void | ||
@@ -673,0 +673,0 @@ dropTo(parent: ILeaf, index?: number, resize?: boolean): void |
+1
-1
@@ -41,3 +41,3 @@ export { IAppBase } from './app/IApp' | ||
| export { IWindingRule, ICanvasContext2D, ICanvasContext2DSettings, ITextMetrics, IPath2D, ICanvasPattern } from './canvas/ICanvas' | ||
| export { CanvasPathCommand, IPathCommandData, MCommandData, HCommandData, VCommandData, LCommandData, CCommandData, SCommandData, QCommandData, TCommandData, ZCommandData, ACommandData, RectCommandData, RoundRectCommandData, EllipseCommandData, ArcCommandData, ArcToCommandData } from './path/IPathCommand' | ||
| export { CanvasPathCommand, IPathCommandData, MCommandData, HCommandData, VCommandData, LCommandData, CCommandData, SCommandData, QCommandData, TCommandData, ZCommandData, ACommandData, RectCommandData, RoundRectCommandData, EllipseCommandData, ArcCommandData, ArcToCommandData, MoveToCommandObject, LineToCommandObject, BezierCurveToCommandObject, QuadraticCurveToCommandObject, IPathCommandObject } from './path/IPathCommand' | ||
@@ -44,0 +44,0 @@ export { ILeaferImage, ILeaferImageConfig, ILeaferImageOnLoaded, ILeaferImageOnError, ILeaferImageCacheCanvas, ILeaferImagePatternPaint } from './image/ILeaferImage' |
@@ -51,1 +51,38 @@ type Command = number | ||
| export type IPathCommandData = number[] // ...(MCommandData | LCommandData | CCommandData | QCommandData | ZCommandData) | ||
| // 路径命令对象 | ||
| export interface MoveToCommandObject { | ||
| name: 'M' | ||
| x: number | ||
| y: number | ||
| } | ||
| export interface LineToCommandObject { | ||
| name: 'L' | ||
| x: number | ||
| y: number | ||
| } | ||
| export interface BezierCurveToCommandObject { | ||
| name: 'C' | ||
| x1: number | ||
| y1: number | ||
| x2: number | ||
| y2: number | ||
| x: number | ||
| y: number | ||
| } | ||
| export interface QuadraticCurveToCommandObject { | ||
| name: 'Q' | ||
| x1: number | ||
| y1: number | ||
| x: number | ||
| y: number | ||
| } | ||
| export interface ClosePathCommandObject { | ||
| name: 'Z' | ||
| } | ||
| export type IPathCommandObject = MoveToCommandObject | LineToCommandObject | BezierCurveToCommandObject | QuadraticCurveToCommandObject | ClosePathCommandObject // M | L | C | Q | Z canvas可以绘制的命令 |
@@ -7,4 +7,4 @@ import { IPathCommandData } from './IPathCommand' | ||
| lineTo(x: number, y: number): void | ||
| bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void | ||
| quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void | ||
| bezierCurveTo(x1: number, y1: number, x2: number, y2: number, x: number, y: number): void | ||
| quadraticCurveTo(x1: number, y1: number, x: number, y: number): void | ||
| closePath(): void | ||
@@ -28,4 +28,4 @@ | ||
| lineTo(x: number, y: number): IPathCreator | ||
| bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): IPathCreator | ||
| quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): IPathCreator | ||
| bezierCurveTo(x1: number, y1: number, x2: number, y2: number, x: number, y: number): IPathCreator | ||
| quadraticCurveTo(x1: number, y1: number, x: number, y: number): IPathCreator | ||
| closePath(): IPathCreator | ||
@@ -32,0 +32,0 @@ |
Sorry, the diff of this file is too big to display
178341
0.96%4617
1.32%