2025-03-09 10:51:22 +02:00
|
|
|
import Context from "./context";
|
|
|
|
import RoundRect from "./roundRect";
|
|
|
|
|
2025-03-09 10:37:06 +02:00
|
|
|
export default class Path2D {
|
2025-03-09 10:51:22 +02:00
|
|
|
constructor(ctx: Context, arg: any);
|
|
|
|
__pathString: any;
|
|
|
|
ctx: any;
|
|
|
|
__subPaths: any[];
|
|
|
|
__currentPosition: {
|
|
|
|
x: any;
|
|
|
|
y: any;
|
|
|
|
};
|
|
|
|
__matrixTransform(x: number, y: number);
|
|
|
|
addPath(path, transform): any;
|
|
|
|
appendPath(path): any;
|
|
|
|
closePath(): any;
|
|
|
|
moveTo(x: number, y: number): any;
|
|
|
|
lineTo(x: number, y: number): any;
|
|
|
|
rect(x: number, y: number, width: number, height: number): any;
|
|
|
|
roundRect: typeof RoundRect;
|
|
|
|
bezierCurveTo(
|
|
|
|
cp1x: number,
|
|
|
|
cp1y: number,
|
|
|
|
cp2x: number,
|
|
|
|
cp2y: number,
|
|
|
|
x: number,
|
|
|
|
y: number
|
|
|
|
): any;
|
|
|
|
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): any;
|
|
|
|
arc(
|
|
|
|
x: number,
|
|
|
|
y: number,
|
|
|
|
radius: number,
|
|
|
|
startAngle: number,
|
|
|
|
endAngle: number,
|
|
|
|
counterClockwise: boolean
|
|
|
|
): any;
|
|
|
|
arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): any;
|
|
|
|
ellipse(
|
|
|
|
x: number,
|
|
|
|
y: number,
|
|
|
|
radiusX: number,
|
|
|
|
radiusY: number,
|
|
|
|
rotation: number,
|
|
|
|
startAngle: number,
|
|
|
|
endAngle: number,
|
|
|
|
counterClockwise?: boolean
|
|
|
|
): any;
|
2025-03-09 10:37:06 +02:00
|
|
|
}
|