Ultralight
1.0.0
A fast, lightweight, HTML UI engine for native apps.
|
#include <Matrix.h>
Public Member Functions | |
void | SetIdentity () |
Set to identity matrix. | |
void | Set (const Matrix &other) |
Set to another matrix. | |
void | Set (float a, float b, float c, float d, float e, float f) |
Set from raw affine members. | |
bool | IsIdentity () const |
Whether or not this is an identity matrix. | |
bool | IsIdentityOrTranslation () const |
Whether or not this is an identity matrix or translation. | |
bool | IsSimple () const |
Whether or not this is an identity, translation, or non-negative uniform scale. | |
void | Translate (float x, float y) |
Translate by x and y. | |
void | Scale (float x, float y) |
Scale by x and y. | |
void | Rotate (float theta) |
Rotate matrix by theta (in degrees) | |
void | Rotate (float x, float y) |
Rotate matrix by x and y. | |
void | Transform (const Matrix &other) |
Transform (multiply) by another Matrix. | |
bool | GetInverse (Matrix &result) const |
Get the inverse of this matrix. More... | |
Point | Apply (const Point &p) const |
Transform point by this matrix and get the result. | |
Rect | Apply (const Rect &r) const |
Transform rect by this matrix and get the result as an axis-aligned rect. | |
uint32_t | Hash () const |
Get an integer hash of this matrix's members. | |
Public Attributes | |
float | data [6] |
Raw affine matrix as an array. | |
bool ultralight::Matrix::GetInverse | ( | Matrix & | result | ) | const |
Get the inverse of this matrix.
May return false if not invertible.