Gamalto

Fork me on GitHub

Object Polygon Overview

Gamalto. Polygon

new Gamalto.Polygon(x, y, points)

Creates a polygon shape.

Parameters
Name Type Description
x number

Horizontal position of the shape origin.

y number

Vertical position of the shape origin.

points array.<Gamalto.IPoint>

List of polygon points excluding the origin.

Extends

Members

origin :Gamalto.IPoint

inherited

Gets of sets the origin of the shape.

Inherited From

tag :object

inherited

Utility property to exchange data between objects.

Inherited From

Methods

clone() Gamalto.Path

inherited

Creates a clone of the current object.

Inherited From
Returns
  • Deep copy of the object.

equals(that) boolean

inherited

Determines if an object is equal to the current object.

Parameters
Name Type Description
that Gamalto.Path

Object to test.

Inherited From
Returns
  • True if the two objects are equal.

pointInShape(x, y) boolean

override

Determines if a point lies inside the shape.

Parameters
Name Type Description
x number

Horizontal position of the point to test.

y number

Vertical position of the point to test.

Overrides
See
Returns
  • True if the point lies inside the shape.

toBox() Gamalto.Box

inherited

Gets the bounding box of the shape.

Inherited From
Returns
  • Bounding box of the shape.

toString() string

inherited abstract

Converts the object into a string.

Inherited From
Returns
  • string

translate(vec)

inherited

Translates the shape by the vector.

Parameters
Name Type Description
vec Gamalto.IPoint

Vector to use for the translation.

Inherited From
Documentation generated by JSDoc 3.3.2 on Sun Sep 13 2015 20:13:31 GMT+0200 (CEST)