@awayjs/graphics
Version:
AwayJS graphics classes
83 lines (82 loc) • 2.96 kB
TypeScript
import { Matrix3D, Box } from '@awayjs/core';
import { GraphicsPathCommand } from '../draw/GraphicsPathCommand';
import { IGraphicsData, IStyleData } from '../draw/IGraphicsData';
import { GraphicsStrokeStyle } from '../draw/GraphicsStrokeStyle';
/**
* Defines the values to use for specifying path-drawing commands.
* The values in this class are used by the Graphics.drawPath() method,
*or stored in the commands vector of a GraphicsPath object.
*/
export declare class GraphicsPath implements IGraphicsData {
/**
* The Vector of drawing commands as integers representing the path.
*/
commands: GraphicsPathCommand[];
/**
* The Vector of numbers containing the parameters used with the drawing commands.
*/
data: number[];
/**
* Specifies the winding rule using a value defined in the GraphicsPathWinding class.
*/
winding: string;
private _orientedBoxBounds;
private _orientedBoxBoundsDirty;
static data_type: string;
private _lastPrepareScale;
/**
* When path is morph, we can't filtrate commands
*/
morphSource: boolean;
/**
* The Vector of Numbers containing the parameters used with the drawing commands.
*/
_positions: number[][];
private _verts;
/**
* The Vector of Numbers containing the parameters used with the drawing commands.
*/
get verts(): number[];
set verts(v: number[]);
private _style;
private _lastDirtyID;
private _dirtyID;
get dirty(): boolean;
constructor(
/**
* The Vector of drawing commands as integers representing the path.
*/
commands?: GraphicsPathCommand[],
/**
* The Vector of numbers containing the parameters used with the drawing commands.
*/
data?: number[],
/**
* Specifies the winding rule using a value defined in the GraphicsPathWinding class.
*/
winding?: string);
get data_type(): string;
get style(): IStyleData;
set style(value: IStyleData);
get fill(): IGraphicsData;
get stroke(): GraphicsStrokeStyle<any>;
curveTo(controlX: number, controlY: number, anchorX: number, anchorY: number): void;
cubicCurveTo(controlX: number, controlY: number, control2X: number, control2Y: number, anchorX: number, anchorY: number): void;
lineTo(x: number, y: number): void;
moveTo(x: number, y: number): void;
wideLineTo(_x: number, _y: number): void;
wideMoveTo(_x: number, _y: number): void;
forceClose: boolean;
/**
*
* @param qualityScale change a pretesselation quality, > 1 decrease limits
* shape will have more vertices, < 1 >0, reduce vertices - bad scale ratio
*/
prepare(qualityScale?: number): boolean;
invalidate(): void;
getBoxBounds(matrix3D?: Matrix3D, cache?: Box, target?: Box): Box;
private _internalGetBoxBounds;
private static lensq;
private _minimumCheck;
}
//# sourceMappingURL=GraphicsPath.d.ts.map