Matrix2x4& SetParlToRect(const T* parl, T x1, T y1, T x2, T y2);
SetParlToRect transforms a parallelogram to a rectangle.
The parallelograms are defined by the matrices which represent the edge coordinates of the parallelogram. The 3 corners of the parallelogram are identified by a float array Float[6] mapped to x1, y1, x2, y2, x3, y3 and the fourth point is calculated internally.
*---------------*(a3,b3) *----------*(x2,y2) / / | | / / ----> | | (a1,b1)*---------------*(a2,b2) (x1,y1) *----------*
Parameters |
Description |
const T* parl |
Pointer to float array representing the coordinates of the parallelogram. |
T x1 |
The x coordinate value of the bottom left corner of the rectangle. |
T y1 |
The y coordinate value of a bottom left corner of the rectangle. |
T x2 |
The x coordinate value of top right corner point of the rectangle. |
T y2 |
The y coordinate value of top right corner point of the rectangle. |
Matrix2x4 representing the transformed rectangle.