Description

The Rect class represents an axis-aligned rectangle as defined by the points (left, top) and (left + width, and top + height).

Syntax

new flwebgl.geom.Rect(left, top, width, height)

Parameters

Name Type Description
left number The horizontal coordinate of the top-left corner.
top number The vertical coordinate of the top-left corner.
width number The width of the rectangle.
height number The height of the rectangle.

Properties

Name Type Description
left number The horizontal coordinate of the top-left corner.
top number The vertical coordinate of the top-left corner.
width number The width of the rectangle.
height number The height of the rectangle.

Methods

intersects(r)

Description

This method checks whether a rect intersects with this instance.

Parameters

Name Type Description
r Rect The rect with which we need to check the intersection.

Returns

  • Type - boolean

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy