summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorIgnacio Etcheverry <neikeq@users.noreply.github.com>2016-09-20 09:28:26 +0200
committerGitHub <noreply@github.com>2016-09-20 09:28:26 +0200
commit1c50dfdf6c352574391c953d88732382adc15e83 (patch)
treef719805d251e51d8dd87e12d35318e512601a177 /scene
parent82f5130cad04c2a959a87ea0bca63e82454fa3cf (diff)
parentaa5ade834c8646b81e2320089314393c00ee8020 (diff)
Merge pull request #6557 from anneomcl/master
Fix for #6158
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/node_2d.cpp2
-rw-r--r--scene/2d/node_2d.h4
-rw-r--r--scene/2d/polygon_2d.cpp4
-rw-r--r--scene/2d/polygon_2d.h6
-rw-r--r--scene/main/canvas_layer.h6
5 files changed, 10 insertions, 12 deletions
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp
index df43e8e373..b3f925cb14 100644
--- a/scene/2d/node_2d.cpp
+++ b/scene/2d/node_2d.cpp
@@ -253,7 +253,7 @@ void Node2D::global_translate(const Vector2& p_amount) {
set_global_pos( get_global_pos() + p_amount );
}
-void Node2D::scale(const Vector2& p_amount) {
+void Node2D::scale(const Size2& p_amount) {
set_scale( get_scale() * p_amount );
}
diff --git a/scene/2d/node_2d.h b/scene/2d/node_2d.h
index aa8d0ef33c..b31ee08af6 100644
--- a/scene/2d/node_2d.h
+++ b/scene/2d/node_2d.h
@@ -79,7 +79,7 @@ public:
void move_y(float p_delta,bool p_scaled=false);
void translate(const Vector2& p_amount);
void global_translate(const Vector2& p_amount);
- void scale(const Vector2& p_amount);
+ void scale(const Size2& p_amount);
Point2 get_pos() const;
float get_rot() const;
@@ -110,8 +110,6 @@ public:
Matrix32 get_relative_transform_to_parent(const Node *p_parent) const;
-
-
Matrix32 get_transform() const;
Node2D();
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp
index cfb87fb998..12893524d1 100644
--- a/scene/2d/polygon_2d.cpp
+++ b/scene/2d/polygon_2d.cpp
@@ -288,12 +288,12 @@ float Polygon2D::_get_texture_rotationd() const{
}
-void Polygon2D::set_texture_scale(const Vector2& p_scale){
+void Polygon2D::set_texture_scale(const Size2& p_scale){
tex_scale=p_scale;
update();
}
-Vector2 Polygon2D::get_texture_scale() const{
+Size2 Polygon2D::get_texture_scale() const{
return tex_scale;
}
diff --git a/scene/2d/polygon_2d.h b/scene/2d/polygon_2d.h
index 04e8aeb6fd..cecb9081f7 100644
--- a/scene/2d/polygon_2d.h
+++ b/scene/2d/polygon_2d.h
@@ -40,7 +40,7 @@ class Polygon2D : public Node2D {
DVector<Color> vertex_colors;
Color color;
Ref<Texture> texture;
- Vector2 tex_scale;
+ Size2 tex_scale;
Vector2 tex_ofs;
bool tex_tile;
float tex_rot;
@@ -81,8 +81,8 @@ public:
void set_texture_rotation(float p_rot);
float get_texture_rotation() const;
- void set_texture_scale(const Vector2& p_scale);
- Vector2 get_texture_scale() const;
+ void set_texture_scale(const Size2& p_scale);
+ Size2 get_texture_scale() const;
void set_invert(bool p_rot);
bool get_invert() const;
diff --git a/scene/main/canvas_layer.h b/scene/main/canvas_layer.h
index 6aad90a09d..a1311390be 100644
--- a/scene/main/canvas_layer.h
+++ b/scene/main/canvas_layer.h
@@ -40,7 +40,7 @@ class CanvasLayer : public Node {
bool locrotscale_dirty;
Vector2 ofs;
- Vector2 scale;
+ Size2 scale;
real_t rot;
int layer;
Matrix32 transform;
@@ -81,8 +81,8 @@ public:
void set_rotationd(real_t p_degrees);
real_t get_rotationd() const;
- void set_scale(const Vector2& p_scale);
- Vector2 get_scale() const;
+ void set_scale(const Size2& p_scale);
+ Size2 get_scale() const;
Ref<World2D> get_world_2d() const;