mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 23:31:53 -05:00
Merge commit godotengine/godot@1f47e4c4e3
This commit is contained in:
@@ -110,7 +110,7 @@ void CanvasLayer::_update_xform() {
|
||||
}
|
||||
}
|
||||
|
||||
void CanvasLayer::_update_locrotscale() {
|
||||
void CanvasLayer::_update_locrotscale() const {
|
||||
ofs = transform.columns[2];
|
||||
rot = transform.get_rotation();
|
||||
scale = transform.get_scale();
|
||||
@@ -128,7 +128,7 @@ void CanvasLayer::set_offset(const Vector2 &p_offset) {
|
||||
|
||||
Vector2 CanvasLayer::get_offset() const {
|
||||
if (locrotscale_dirty) {
|
||||
const_cast<CanvasLayer *>(this)->_update_locrotscale();
|
||||
_update_locrotscale();
|
||||
}
|
||||
|
||||
return ofs;
|
||||
@@ -145,7 +145,7 @@ void CanvasLayer::set_rotation(real_t p_radians) {
|
||||
|
||||
real_t CanvasLayer::get_rotation() const {
|
||||
if (locrotscale_dirty) {
|
||||
const_cast<CanvasLayer *>(this)->_update_locrotscale();
|
||||
_update_locrotscale();
|
||||
}
|
||||
|
||||
return rot;
|
||||
@@ -162,7 +162,7 @@ void CanvasLayer::set_scale(const Vector2 &p_scale) {
|
||||
|
||||
Vector2 CanvasLayer::get_scale() const {
|
||||
if (locrotscale_dirty) {
|
||||
const_cast<CanvasLayer *>(this)->_update_locrotscale();
|
||||
_update_locrotscale();
|
||||
}
|
||||
|
||||
return scale;
|
||||
|
||||
Reference in New Issue
Block a user