mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
Added Transform objects to love.math (resolves issue #1228).
- Added love.math.newTransform. - Added love.graphics.applyTransform and love.graphics.replaceTransform. - love.graphics.draw/print/printf, Text:add/addf, and SpriteBatch:add can accept a Transform argument. - love.graphics.push can accept an optional Transform as a second argument, which will apply the Transform after pushing the matrix stack, - Shader:send can accept Transform objects when sending to a mat4 uniform variable. --HG-- branch : minor
This commit is contained in:
@@ -38,6 +38,8 @@
|
||||
|
||||
#include "video/VideoStream.h"
|
||||
|
||||
#include "math/Transform.h"
|
||||
|
||||
#include "Font.h"
|
||||
#include "Image.h"
|
||||
#include "graphics/Quad.h"
|
||||
@@ -488,6 +490,10 @@ public:
|
||||
void translate(float x, float y);
|
||||
void shear(float kx, float ky);
|
||||
void origin();
|
||||
|
||||
void applyTransform(love::math::Transform *transform);
|
||||
void replaceTransform(love::math::Transform *transform);
|
||||
|
||||
Vector transformPoint(Vector point);
|
||||
Vector inverseTransformPoint(Vector point);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user