new Quad(x1, y1, x2, y2, x3, y3, x4, y4)
Create a new Quad with the x and y coordinates of the the four points of a quadrilateral.
Parameters:
Name | Type | Description |
---|---|---|
x1 |
number | the x coordinate of the lower-left point |
y1 |
number | the y coordinate of the lower-left point |
x2 |
number | the x coordinate of the lower-right point |
y2 |
number | the y coordinate of the lower-right point |
x3 |
number | the x coordinate of the upper-right point |
y3 |
number | the y coordinate of the upper-right point |
x4 |
number | the x coordinate of the upper-left point |
y4 |
number | the y coordinate of the upper-left point |
Properties:
Name | Type | Description |
---|---|---|
x1 |
number | the x coordinate of the lower-left point |
y1 |
number | the y coordinate of the lower-left point |
x2 |
number | the x coordinate of the lower-right point |
y2 |
number | the y coordinate of the lower-right point |
x3 |
number | the x coordinate of the upper-right point |
y3 |
number | the y coordinate of the upper-right point |
x4 |
number | the x coordinate of the upper-left point |
y4 |
number | the y coordinate of the upper-left point |
Example
(x4,y4)---(x3,y3)
| |
(x1,y1)---(x2,y2)
Methods
-
toRect()
-
Returns a Rect that represents this quad.
Returns:
A rect that represents this quad- Type
- Core.Math.Rect