Module Polygon-PIXI

class type _t = { ... }
type t = Js.t(_t);

A class to define a shape via user defined co-orinates.

module Impl: { ... };
include Impl;
let create: [ `Point(array(Js.t(PIXI.Point.#_t))) | `Array(array(float)) | `Array2d(array(array(float))) ] => t;
let getCloseStroke: Js.t(_t) => bool;

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

let setCloseStroke: Js.t(_t) => bool => unit;

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

let getPoints: Js.t(_t) => array(float);

An array of the points of this polygon

let setPoints: Js.t(_t) => array(float) => unit;

An array of the points of this polygon

let _getType: Js.t(_t) => int;
let getType: Js.t(_t) => PIXI.SHAPES.t;

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

let clone: Js.t(_t) => Js.t(_t);

Creates a clone of this polygon

let contains: Js.t(_t) => x:float => y:float => bool;

Checks whether the x and y coordinates passed to this function are contained within this polygon