mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user