summaryrefslogtreecommitdiffstats
path: root/scene/2d/node_2d.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2020-05-01 13:38:04 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-05-01 13:38:04 -0300
commitefb1f7d76b63d56fc0c097d13b4b6d7b91250611 (patch)
tree98cda38a73f1e6cf4f20c0ab5acda71dd9e40ad2 /scene/2d/node_2d.h
parent316b60aa68bc348b8d6ab125ee2fb7cd3793cb49 (diff)
downloadredot-engine-efb1f7d76b63d56fc0c097d13b4b6d7b91250611.tar.gz
Implement Skew in Node2D
Skew is x-axis only, because it must be bidirectionally convertible to a 2x3 matrix, but you can subtract it to the rotation to get the effect on y-axis
Diffstat (limited to 'scene/2d/node_2d.h')
-rw-r--r--scene/2d/node_2d.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/2d/node_2d.h b/scene/2d/node_2d.h
index abed05ed0c..0afec36254 100644
--- a/scene/2d/node_2d.h
+++ b/scene/2d/node_2d.h
@@ -40,6 +40,7 @@ class Node2D : public CanvasItem {
Point2 pos;
float angle;
Size2 _scale;
+ float skew;
int z_index;
bool z_relative;
@@ -75,6 +76,8 @@ public:
void set_position(const Point2 &p_pos);
void set_rotation(float p_radians);
void set_rotation_degrees(float p_degrees);
+ void set_skew(float p_radians);
+ void set_skew_degrees(float p_radians);
void set_scale(const Size2 &p_scale);
void rotate(float p_radians);
@@ -86,7 +89,9 @@ public:
Point2 get_position() const;
float get_rotation() const;
+ float get_skew() const;
float get_rotation_degrees() const;
+ float get_skew_degrees() const;
Size2 get_scale() const;
Point2 get_global_position() const;