gameforge - v0.0.19
    Preparing search index...

    Class Rectangle

    Hierarchy

    • Rectangle
      • Rectangle
    Index

    Constructors

    • Parameters

      • Optionalx: string | number

        The X coordinate of the upper-left corner of the rectangle

      • Optionaly: string | number

        The Y coordinate of the upper-left corner of the rectangle

      • Optionalwidth: string | number

        The overall width of the rectangle

      • Optionalheight: string | number

        The overall height of the rectangle

      Returns Rectangle

    Properties

    height: number
    0
    
    type: RECT

    The type of the object, mainly used to avoid instanceof checks

    PIXI.SHAPES.RECT
    

    PIXI.SHAPES

    width: number
    0
    
    x: number
    0
    
    y: number
    0
    

    Accessors

    • get bottom(): number

      Returns the bottom edge of the rectangle.

      Returns number

    • get left(): number

      Returns the left edge of the rectangle.

      Returns number

    • get right(): number

      Returns the right edge of the rectangle.

      Returns number

    • get top(): number

      Returns the top edge of the rectangle.

      Returns number

    • get EMPTY(): Rectangle

      A constant empty rectangle.

      Returns Rectangle

    Methods

    • Enlarges rectangle that way its corners lie on grid

      Parameters

      • Optionalresolution: number

        resolution

      • Optionaleps: number

        precision

      Returns this

      Returns itself.

    • Creates a clone of this Rectangle

      Returns Rectangle

      a copy of the rectangle

    • Checks whether the x and y coordinates given are contained within this Rectangle

      Parameters

      • x: number

        The X coordinate of the point to test

      • y: number

        The Y coordinate of the point to test

      Returns boolean

      Whether the x/y coordinates are within this Rectangle

    • Copies another rectangle to this one.

      Parameters

      • rectangle: Rectangle

        The rectangle to copy from.

      Returns Rectangle

      Returns itself.

    • Copies this rectangle to another one.

      Parameters

      • rectangle: Rectangle

        The rectangle to copy to.

      Returns Rectangle

      Returns given parameter.

    • Enlarges this rectangle to include the passed rectangle.

      Parameters

      • rectangle: Rectangle

        The rectangle to include.

      Returns this

      Returns itself.

    • Fits this rectangle around the passed one.

      Parameters

      • rectangle: Rectangle

        The rectangle to fit.

      Returns this

      Returns itself.

    • Determines whether the other Rectangle transformed by transform intersects with this Rectangle object. Returns true only if the area of the intersection is >0, this means that Rectangles sharing a side are not overlapping. Another side effect is that an arealess rectangle (width or height equal to zero) can't intersect any other rectangle.

      Parameters

      • other: Rectangle

        The Rectangle to intersect with this.

      • Optionaltransform: Matrix

        The transformation matrix of other.

      Returns boolean

      A value of true if the transformed other Rectangle intersects with this; otherwise false.

    • Pads the rectangle making it grow in all directions. If paddingY is omitted, both paddingX and paddingY will be set to paddingX.

      Parameters

      • OptionalpaddingX: number

        The horizontal padding amount.

      • OptionalpaddingY: number

        The vertical padding amount.

      Returns this

      Returns itself.