Add shear transformation and transform object (issue #152).

Add origin parameters to love.graphics.print.

New shear parameters kx,ky for:
- love.graphics.draw,
- love.graphics.drawq,
- love.graphics.print,
- SpriteBatch:add,
- SpriteBatch:addq.

Transform objects apply to:
- love.graphics.draw,
- love.graphics.drawq,
- love.graphics.print.
This commit is contained in:
vrld
2011-07-05 14:33:34 +02:00
parent ce5927379d
commit d420d68048
20 changed files with 214 additions and 55 deletions
+4 -4
View File
@@ -102,20 +102,20 @@ namespace opengl
vertices[3].s = tx+tw; vertices[3].t = ty;
}
void Image::draw(float x, float y, float angle, float sx, float sy, float ox, float oy) const
void Image::draw(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky) const
{
static Matrix t;
t.setTransformation(x, y, angle, sx, sy, ox, oy);
t.setTransformation(x, y, angle, sx, sy, ox, oy, kx, ky);
drawv(t, vertices);
}
void Image::drawq(Quad * quad, float x, float y, float angle, float sx, float sy, float ox, float oy) const
void Image::drawq(Quad * quad, float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky) const
{
static Matrix t;
const vertex * v = quad->getVertices();
t.setTransformation(x, y, angle, sx, sy, ox, oy);
t.setTransformation(x, y, angle, sx, sy, ox, oy, kx, ky);
drawv(t, v);
}