Skip to main content

Quad

Quadrilateral represented as a flat tuple of vertices. Vertices order is fixed: · left-top → right-top → left-bottom → right-bottom

Invariants: · x1 <= x2 (top edge goes left → right) · x3 <= x4 (bottom edge goes left → right) · y1 <= y3 (left edge goes top → bottom) · y2 <= y4 (right edge goes top → bottom)

Type

Object

Properties

NameTypeDescription
0ptx1 (left top)
1pty1 (left top)
2ptx2 (right top)
3pty2 (right top)
4ptx3 (left bottom)
5pty3 (left bottom)
6ptx4 (right bottom)
7pty4 (right bottom)