summaryrefslogtreecommitdiff
path: root/scene/2d/canvas_item.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-04-14 22:43:44 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-04-14 22:43:44 -0300
commitec4ef2d2e794819548d731f93728266d31261d71 (patch)
tree6c2940a9029d07a22288c93684dac19cc39de7ed /scene/2d/canvas_item.cpp
parent162d2ebe4f1a6da2da62ad45c4cbfb161157d31d (diff)
-Added google play services (needed for some stuff)
-Added new screen resizing options, stretch_2d is removed, new much more flexible ones. -Fixed bug in viewport (can create more instances in 3d-in-2d demo now) -Can set android permissions and screen sizes manually in the export settings -Changed export templates extension to .tpz (too many people unzipped the manually..) -File dialog now ensures that the proper extension is used (will not allow to save without it) -Fixed bug that made collision exceptions not work in 2D
Diffstat (limited to 'scene/2d/canvas_item.cpp')
-rw-r--r--scene/2d/canvas_item.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index 8eb5c9dfc8..b9cddfa572 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -821,6 +821,17 @@ void CanvasItem::_bind_methods() {
}
+Matrix32 CanvasItem::get_canvas_transform() const {
+
+ ERR_FAIL_COND_V(!is_inside_scene(),Matrix32());
+
+ if (canvas_layer)
+ return canvas_layer->get_transform();
+ else
+ return get_viewport()->get_canvas_transform();
+
+}
+
Matrix32 CanvasItem::get_viewport_transform() const {
ERR_FAIL_COND_V(!is_inside_scene(),Matrix32());