import '../../../assert/js/assert.js';
import '../../../globals.js';
/**
 * A rectangular node that inherits Path, and allows for optimized drawing and improved rectangle handling.
 *
 * @author Jonathan Olson <jonathan.olson@colorado.edu>
 */
import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';
import Bounds2 from '../../../dot/js/Bounds2.js';
import Dimension2 from '../../../dot/js/Dimension2.js';
import Matrix3 from '../../../dot/js/Matrix3.js';
import Vector2 from '../../../dot/js/Vector2.js';
import { Shape } from '../../../kite/js/imports.js';
import StrictOmit from '../../../phet-core/js/types/StrictOmit.js';
import { CanvasContextWrapper, CanvasSelfDrawable, DOMSelfDrawable, Instance, Path, PathOptions, SizableOptions, SVGSelfDrawable, WebGLSelfDrawable } from '../imports.js';
type SelfOptions = {
    rectBounds?: Bounds2;
    rectSize?: Dimension2;
    rectX?: number;
    rectY?: number;
    rectWidth?: number;
    rectHeight?: number;
    cornerRadius?: number;
    cornerXRadius?: number;
    cornerYRadius?: number;
};
type ParentOptions = SizableOptions & PathOptions;
export type RectangleOptions = SelfOptions & StrictOmit<ParentOptions, 'shape' | 'shapeProperty'>;
declare const SuperType: typeof Path & import("../../../phet-core/js/types/Constructor.js").default<import("../imports.js").TWidthSizable & import("../imports.js").THeightSizable & {
    validateLocalPreferredSize(): void;
}>;
export default class Rectangle extends SuperType {
    _rectX: number;
    _rectY: number;
    _rectWidth: number;
    _rectHeight: number;
    _cornerXRadius: number;
    _cornerYRadius: number;
    /**
     *
     * Possible constructor signatures
     * new Rectangle( x, y, width, height, cornerXRadius, cornerYRadius, [options] )
     * new Rectangle( x, y, width, height, [options] )
     * new Rectangle( [options] )
     * new Rectangle( bounds2, [options] )
     * new Rectangle( bounds2, cornerXRadius, cornerYRadius, [options] )
     *
     * Current available options for the options object (custom for Rectangle, not Path or Node):
     * rectX - Left edge of the rectangle in the local coordinate frame
     * rectY - Top edge of the rectangle in the local coordinate frame
     * rectWidth - Width of the rectangle in the local coordinate frame
     * rectHeight - Height of the rectangle in the local coordinate frame
     * cornerXRadius - The x-axis radius for elliptical/circular rounded corners.
     * cornerYRadius - The y-axis radius for elliptical/circular rounded corners.
     * cornerRadius - Sets both "X" and "Y" corner radii above.
     *
     * NOTE: the X and Y corner radii need to both be greater than zero for rounded corners to appear. If they have the
     * same non-zero value, circular rounded corners will be used.
     *
     * Available parameters to the various constructor options:
     * @param x - x-position of the upper-left corner (left bound)
     * @param [y] - y-position of the upper-left corner (top bound)
     * @param [width] - width of the rectangle to the right of the upper-left corner, required to be >= 0
     * @param [height] - height of the rectangle below the upper-left corner, required to be >= 0
     * @param [cornerXRadius] - positive vertical radius (width) of the rounded corner, or 0 to indicate the corner should be sharp
     * @param [cornerYRadius] - positive horizontal radius (height) of the rounded corner, or 0 to indicate the corner should be sharp
     * @param [options] - Rectangle-specific options are documented in RECTANGLE_OPTION_KEYS above, and can be provided
     *                             along-side options for Node
     */
    constructor(options?: RectangleOptions);
    constructor(bounds: Bounds2, options?: RectangleOptions);
    constructor(bounds: Bounds2, cornerRadiusX: number, cornerRadiusY: number, options?: RectangleOptions);
    constructor(x: number, y: number, width: number, height: number, options?: RectangleOptions);
    constructor(x: number, y: number, width: number, height: number, cornerXRadius: number, cornerYRadius: number, options?: RectangleOptions);
    /**
     * Determines the maximum arc size that can be accommodated by the current width and height.
     *
     * If the corner radii are the same as the maximum arc size on a square, it will appear to be a circle (the arcs
     * take up all of the room, and leave no straight segments). In the case of a non-square, one direction of edges
     * will exist (e.g. top/bottom or left/right), while the other edges would be fully rounded.
     */
    private getMaximumArcSize;
    /**
     * Determines the default allowed renderers (returned via the Renderer bitmask) that are allowed, given the
     * current stroke options. (scenery-internal)
     *
     * We can support the DOM renderer if there is a solid-styled stroke with non-bevel line joins
     * (which otherwise wouldn't be supported).
     *
     * @returns - Renderer bitmask, see Renderer for details
     */
    getStrokeRendererBitmask(): number;
    /**
     * Determines the allowed renderers that are allowed (or excluded) based on the current Path. (scenery-internal)
     *
     * @returns - Renderer bitmask, see Renderer for details
     */
    getPathRendererBitmask(): number;
    /**
     * Sets all of the shape-determining parameters for the rectangle.
     *
     * @param x - The x-position of the left side of the rectangle.
     * @param y - The y-position of the top side of the rectangle.
     * @param width - The width of the rectangle.
     * @param height - The height of the rectangle.
     * @param [cornerXRadius] - The horizontal radius of curved corners (0 for sharp corners)
     * @param [cornerYRadius] - The vertical radius of curved corners (0 for sharp corners)
     */
    setRect(x: number, y: number, width: number, height: number, cornerXRadius?: number, cornerYRadius?: number): this;
    /**
     * Sets the x coordinate of the left side of this rectangle (in the local coordinate frame).
     */
    setRectX(x: number): this;
    set rectX(value: number);
    get rectX(): number;
    /**
     * Returns the x coordinate of the left side of this rectangle (in the local coordinate frame).
     */
    getRectX(): number;
    /**
     * Sets the y coordinate of the top side of this rectangle (in the local coordinate frame).
     */
    setRectY(y: number): this;
    set rectY(value: number);
    get rectY(): number;
    /**
     * Returns the y coordinate of the top side of this rectangle (in the local coordinate frame).
     */
    getRectY(): number;
    /**
     * Sets the width of the rectangle (in the local coordinate frame).
     */
    setRectWidth(width: number): this;
    set rectWidth(value: number);
    get rectWidth(): number;
    /**
     * Returns the width of the rectangle (in the local coordinate frame).
     */
    getRectWidth(): number;
    /**
     * Sets the height of the rectangle (in the local coordinate frame).
     */
    setRectHeight(height: number): this;
    set rectHeight(value: number);
    get rectHeight(): number;
    /**
     * Returns the height of the rectangle (in the local coordinate frame).
     */
    getRectHeight(): number;
    /**
     * Sets the horizontal corner radius of the rectangle (in the local coordinate frame).
     *
     * If the cornerXRadius and cornerYRadius are the same, the corners will be rounded circular arcs with that radius
     * (or a smaller radius if the rectangle is too small).
     *
     * If the cornerXRadius and cornerYRadius are different, the corners will be elliptical arcs, and the horizontal
     * radius will be equal to cornerXRadius (or a smaller radius if the rectangle is too small).
     */
    setCornerXRadius(radius: number): this;
    set cornerXRadius(value: number);
    get cornerXRadius(): number;
    /**
     * Returns the horizontal corner radius of the rectangle (in the local coordinate frame).
     */
    getCornerXRadius(): number;
    /**
     * Sets the vertical corner radius of the rectangle (in the local coordinate frame).
     *
     * If the cornerXRadius and cornerYRadius are the same, the corners will be rounded circular arcs with that radius
     * (or a smaller radius if the rectangle is too small).
     *
     * If the cornerXRadius and cornerYRadius are different, the corners will be elliptical arcs, and the vertical
     * radius will be equal to cornerYRadius (or a smaller radius if the rectangle is too small).
     */
    setCornerYRadius(radius: number): this;
    set cornerYRadius(value: number);
    get cornerYRadius(): number;
    /**
     * Returns the vertical corner radius of the rectangle (in the local coordinate frame).
     */
    getCornerYRadius(): number;
    /**
     * Sets the Rectangle's x/y/width/height from the Bounds2 passed in.
     */
    setRectBounds(bounds: Bounds2): this;
    set rectBounds(value: Bounds2);
    get rectBounds(): Bounds2;
    /**
     * Returns a new Bounds2 generated from this Rectangle's x/y/width/height.
     */
    getRectBounds(): Bounds2;
    /**
     * Sets the Rectangle's width/height from the Dimension2 size passed in.
     */
    setRectSize(size: Dimension2): this;
    set rectSize(value: Dimension2);
    get rectSize(): Dimension2;
    /**
     * Returns a new Dimension2 generated from this Rectangle's width/height.
     */
    getRectSize(): Dimension2;
    /**
     * Sets the width of the rectangle while keeping its right edge (x + width) in the same position
     */
    setRectWidthFromRight(width: number): this;
    set rectWidthFromRight(value: number);
    get rectWidthFromRight(): number;
    /**
     * Sets the height of the rectangle while keeping its bottom edge (y + height) in the same position
     */
    setRectHeightFromBottom(height: number): this;
    set rectHeightFromBottom(value: number);
    get rectHeightFromBottom(): number;
    /**
     * Returns whether this rectangle has any rounding applied at its corners. If either the x or y corner radius is 0,
     * then there is no rounding applied.
     */
    isRounded(): boolean;
    /**
     * Computes the bounds of the Rectangle, including any applied stroke. Overridden for efficiency.
     */
    computeShapeBounds(): Bounds2;
    /**
     * Returns a Shape that is equivalent to our rendered display. Generally used to lazily create a Shape instance
     * when one is needed, without having to do so beforehand.
     */
    private createRectangleShape;
    /**
     * Notifies that the rectangle has changed, and invalidates path information and our cached shape.
     */
    protected invalidateRectangle(): void;
    private updatePreferredSizes;
    invalidateStroke(): void;
    /**
     * Computes whether the provided point is "inside" (contained) in this Rectangle's self content, or "outside".
     *
     * Handles axis-aligned optionally-rounded rectangles, although can only do optimized computation if it isn't
     * rounded. If it IS rounded, we check if a corner computation is needed (usually isn't), and only need to check
     * one corner for that test.
     *
     * @param point - Considered to be in the local coordinate frame
     */
    containsPointSelf(point: Vector2): boolean;
    /**
     * Returns whether this Rectangle's selfBounds is intersected by the specified bounds.
     *
     * @param bounds - Bounds to test, assumed to be in the local coordinate frame.
     */
    intersectsBoundsSelf(bounds: Bounds2): boolean;
    /**
     * Draws the current Node's self representation, assuming the wrapper's Canvas context is already in the local
     * coordinate frame of this node.
     *
     * @param wrapper
     * @param matrix - The transformation matrix already applied to the context.
     */
    protected canvasPaintSelf(wrapper: CanvasContextWrapper, matrix: Matrix3): void;
    /**
     * Creates a DOM drawable for this Rectangle. (scenery-internal)
     *
     * @param renderer - In the bitmask format specified by Renderer, which may contain additional bit flags.
     * @param instance - Instance object that will be associated with the drawable
     */
    createDOMDrawable(renderer: number, instance: Instance): DOMSelfDrawable;
    /**
     * Creates a SVG drawable for this Rectangle. (scenery-internal)
     *
     * @param renderer - In the bitmask format specified by Renderer, which may contain additional bit flags.
     * @param instance - Instance object that will be associated with the drawable
     */
    createSVGDrawable(renderer: number, instance: Instance): SVGSelfDrawable;
    /**
     * Creates a Canvas drawable for this Rectangle. (scenery-internal)
     *
     * @param renderer - In the bitmask format specified by Renderer, which may contain additional bit flags.
     * @param instance - Instance object that will be associated with the drawable
     */
    createCanvasDrawable(renderer: number, instance: Instance): CanvasSelfDrawable;
    /**
     * Creates a WebGL drawable for this Rectangle. (scenery-internal)
     *
     * @param renderer - In the bitmask format specified by Renderer, which may contain additional bit flags.
     * @param instance - Instance object that will be associated with the drawable
     */
    createWebGLDrawable(renderer: number, instance: Instance): WebGLSelfDrawable;
    /**
     * It is impossible to set another shape on this Path subtype, as its effective shape is determined by other
     * parameters.
     *
     * @param shape - Throws an error if it is not null.
     */
    setShape(shape: Shape | string | null): this;
    /**
     * Returns an immutable copy of this Path subtype's representation.
     *
     * NOTE: This is created lazily, so don't call it if you don't have to!
     */
    getShape(): Shape;
    /**
     * Returns whether this Path has an associated Shape (instead of no shape, represented by null)
     */
    hasShape(): boolean;
    setShapeProperty(newTarget: TReadOnlyProperty<Shape | string | null> | null): this;
    /**
     * Sets both of the corner radii to the same value, so that the rounded corners will be circular arcs.
     */
    setCornerRadius(cornerRadius: number): this;
    set cornerRadius(value: number);
    get cornerRadius(): number;
    /**
     * Returns the corner radius if both the horizontal and vertical corner radii are the same.
     *
     * NOTE: If there are different horizontal and vertical corner radii, this will fail an assertion and return the horizontal radius.
     */
    getCornerRadius(): number;
    mutate(options?: RectangleOptions): this;
    /**
     * Returns whether a point is within a rounded rectangle.
     *
     * @param x - X value of the left side of the rectangle
     * @param y - Y value of the top side of the rectangle
     * @param width - Width of the rectangle
     * @param height - Height of the rectangle
     * @param arcWidth - Horizontal corner radius of the rectangle
     * @param arcHeight - Vertical corner radius of the rectangle
     * @param point - The point that may or may not be in the rounded rectangle
     */
    static intersects(x: number, y: number, width: number, height: number, arcWidth: number, arcHeight: number, point: Vector2): boolean;
    /**
     * Creates a rectangle with the specified x/y/width/height.
     *
     * See Rectangle's constructor for detailed parameter information.
     */
    static rect(x: number, y: number, width: number, height: number, options?: RectangleOptions): Rectangle;
    /**
     * Creates a rounded rectangle with the specified x/y/width/height/cornerXRadius/cornerYRadius.
     *
     * See Rectangle's constructor for detailed parameter information.
     */
    static roundedRect(x: number, y: number, width: number, height: number, cornerXRadius: number, cornerYRadius: number, options?: RectangleOptions): Rectangle;
    /**
     * Creates a rectangle x/y/width/height matching the specified bounds.
     *
     * See Rectangle's constructor for detailed parameter information.
     */
    static bounds(bounds: Bounds2, options?: RectangleOptions): Rectangle;
    /**
     * Creates a rounded rectangle x/y/width/height matching the specified bounds (Rectangle.bounds, but with additional
     * cornerXRadius and cornerYRadius).
     *
     * See Rectangle's constructor for detailed parameter information.
     */
    static roundedBounds(bounds: Bounds2, cornerXRadius: number, cornerYRadius: number, options?: RectangleOptions): Rectangle;
    /**
     * Creates a rectangle with top/left of (0,0) with the specified {Dimension2}'s width and height.
     *
     * See Rectangle's constructor for detailed parameter information.
     */
    static dimension(dimension: Dimension2, options?: RectangleOptions): Rectangle;
}
export {};
//# sourceMappingURL=Rectangle.d.ts.map