gameforge - v0.1.12
    Preparing search index...

    Class Polygon

    A class to define a shape via user defined coordinates.

    PIXI

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Parameters

      Returns Polygon

    • Parameters

      Returns Polygon

    Properties

    closeStroke: boolean

    false after moveTo, true after closePath. In all other cases it is true.

    points: number[]

    An array of the points of this polygon.

    type: POLY

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

    PIXI.SHAPES.POLY
    

    PIXI.SHAPES

    Methods

    • Creates a clone of this polygon.

      Returns Polygon

      • A copy of the polygon.
    • Checks whether the x and y coordinates passed to this function are contained within this polygon.

      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 polygon.