import * as em from "./Enums"; import * as ds from "./Types"; import { ObjectBase } from "./ObjectBase"; import { type Transform } from "./Transform"; /** * Represents a path for drawing, filling, or clipping. **/ export declare class GraphicsPath extends ObjectBase { /** * Gets or sets the method used to determine which points are inside the geometry * described by this {@link GraphicsPath} and which points are outside. **/ get fillMode(): em.FillMode; /** * Gets or sets the method used to determine which points are inside the geometry * described by this {@link GraphicsPath} and which points are outside. **/ set fillMode(fillMode: em.FillMode); /** * Gets a value indicating if the path is closed for subsequent modifications. **/ get isClosed(): boolean; /** * Closes the path for modifications. The path cannot be modified after it is closed. **/ close(): void; /** * Gets a value indicating if there is an active figure to update. **/ get figureStarted(): boolean; /** * Starts a new figure at the specified point. * @param x The X coordinate at which to begin the new figure. * @param y The Y coordinate at which to begin the new figure. **/ beginFigure(x: number, y: number): void; /** * Ends the current figure; optionally, closes it. * @param closeFigure A value that indicates whether the current figure is closed. * If the figure is closed, a line is drawn between the current point and * the start point specified by {@link GraphicsPath#beginFigure}. **/ endFigure(closeFigure: boolean): void; /** * Discards the active figure. **/ cancelFigure(): void; /** * Gets a value indicating if the active figure contains one or more segments. **/ get figureHasSegments(): boolean; /** * Creates a line segment between the current point and the specified end point. * @param x The X coordinate of the end point of the line to draw. * @param y The Y coordinate of the end point of the line to draw. **/ addLine(x: number, y: number): void; /** * Creates a cubic Bezier curve between the current point and the specified end point. * @param xP1 The X coordinate of the first control point for the Bezier segment. * @param yP1 The Y coordinate of the first control point for the Bezier segment. * @param xP2 The X coordinate of the second control point for the Bezier segment. * @param yP2 The Y coordinate of the second control point for the Bezier segment. * @param xEndPoint The X coordinate of the end point for the Bezier segment. * @param yEndPoint The Y coordinate of the end point for the Bezier segment. **/ addBezier(xP1: number, yP1: number, xP2: number, yP2: number, xEndPoint: number, yEndPoint: number): void; /** * Creates a quadratic Bezier curve between the current point and the specified end point. * @param xP1 The X coordinate of the control point for the quadratic Bezier segment. * @param yP1 The Y coordinate of the control point for the quadratic Bezier segment. * @param xEndPoint The X coordinate of the end point for the quadratic Bezier segment. * @param yEndPoint The Y coordinate of the end point for the quadratic Bezier segment. **/ addQuadraticBezier(xP1: number, yP1: number, xEndPoint: number, yEndPoint: number): void; /** * Adds a single arc to the path geometry. * @param arcProperties The arc segment to add to the figure. **/ addArc(arcProperties: ds.ArcSegmentProperties): void; /** * Adds an ellipse figure to the path. * Note! The method calls the {@link GraphicsPath#beginFigure} and {@link GraphicsPath#endFigure} methods. * @param x The X coordinate of the rectangle enclosing an ellipse. * @param y The Y coordinate of the rectangle enclosing an ellipse. * @param width The width of the rectangle enclosing an ellipse. * @param height The height of the rectangle enclosing an ellipse. **/ addEllipse(x: number, y: number, width: number, height: number): void; /** * Adds an ellipse figure to the path. * Note! The method calls the {@link GraphicsPath#beginFigure} and {@link GraphicsPath#endFigure} methods. * @param bounds The ellipse's bounds. **/ addEllipse(bounds: ds.Bounds): void; /** * Adds a rectangular figure to the path. * Note! The method calls the {@link GraphicsPath#beginFigure} and {@link GraphicsPath#endFigure} methods. * @param x The X coordinate of the rectangle. * @param y The Y coordinate of the rectangle. * @param width The width of the rectangle. * @param height The height of the rectangle. **/ addRect(x: number, y: number, width: number, height: number): void; /** * Adds a rectangular figure to the path. * Note! The method calls the {@link GraphicsPath#beginFigure} and {@link GraphicsPath#endFigure} methods. * @param bounds The rectangle bounds. **/ addRect(bounds: ds.Bounds): void; /** * Returns a rectangle that bounds this {@link GraphicsPath} when it is transformed by the specified {@link Transform}. * @param transform The transform to apply to this path before calculating its bounds. * @returns A rectangle that bounds this path. **/ getBounds(transform?: Transform | null): ds.Rect; }