Thanks that works, here's some (semi-pseudo) code to rotate an overlay in the lower left corner:
Code:
#define DEG2RAD(x) (((x)/180)*3.14159265)
typedef struct {
float x,y;
} point;
point ll = {0.0, 0.0};
point lr = {0.1, 0.0};
point ur = {0.1, 0.1};
point ul = {0.0, 0.1};
point center;
center.x = (ll.x + lr.x) / 2.0;
center.y = (ll.x + ul.y) / 2.0;
float rot = DEG2RAD(45); // rotate 45 degrees
void rotate_2d(point &p) {
float newx = (cos(rot) * (p.x - center.x)) + (sin(rot) * (p.y - center.y));
float newy = (-sin(rot) * (p.x - center.x)) + (cos(rot) * (p.y - center.y));
p.x = newx + center.x;
p.y = newx + center.y;
}
rotate_2d(ll);
rotate_2d(lr);
rotate_2d(ur);
rotate_2d(ul);
Horde3D::showOverlay(ll.x, ll.y, 0, 0, lr.x, lr.y, 1, 0, ur.x, ur.y, 1, 1, ul.x, ul.y, 0, 1, 1, res);