diff options
| author | Rémi Verschelde | 2017-06-05 15:52:05 +0200 |
|---|---|---|
| committer | GitHub | 2017-06-05 15:52:05 +0200 |
| commit | f8d7670e82007103573b88f48fe7b7c4addbd66d (patch) | |
| tree | f4802061ca26ae9220ec9a5e9d51d80e1a465faa /scene/2d/polygon_2d.cpp | |
| parent | 075c7d8133e4fde353ab54a255638b0c9a3740a5 (diff) | |
| parent | a3c90b029308eb46b7fd83a0cf7b502ecbd79d55 (diff) | |
| download | godot-f8d7670.tar.gz godot-f8d7670.tar.zst godot-f8d7670.zip | |
Merge pull request #9038 from AlexHolly/rect2-rename-pos
renamed all Rect2.pos to Rect2.position
Diffstat (limited to 'scene/2d/polygon_2d.cpp')
| -rw-r--r-- | scene/2d/polygon_2d.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp index cb3e67f89..5c1c953a3 100644 --- a/scene/2d/polygon_2d.cpp +++ b/scene/2d/polygon_2d.cpp @@ -38,7 +38,7 @@ Rect2 Polygon2D::get_item_rect() const { for (int i = 0; i < l; i++) { Vector2 pos = r[i] + offset; if (i == 0) - item_rect.pos = pos; + item_rect.position = pos; else item_rect.expand_to(pos); } @@ -95,7 +95,7 @@ void Polygon2D::_notification(int p_what) { for (int i = 0; i < len; i++) { if (i == 0) - bounds.pos = points[i]; + bounds.position = points[i]; else bounds.expand_to(points[i]); if (points[i].y > highest_y) { @@ -110,10 +110,10 @@ void Polygon2D::_notification(int p_what) { Vector2 ep[7] = { Vector2(points[highest_idx].x, points[highest_idx].y + invert_border), - Vector2(bounds.pos + bounds.size), - Vector2(bounds.pos + Vector2(bounds.size.x, 0)), - Vector2(bounds.pos), - Vector2(bounds.pos + Vector2(0, bounds.size.y)), + Vector2(bounds.position + bounds.size), + Vector2(bounds.position + Vector2(bounds.size.x, 0)), + Vector2(bounds.position), + Vector2(bounds.position + Vector2(0, bounds.size.y)), Vector2(points[highest_idx].x - CMP_EPSILON, points[highest_idx].y + invert_border), Vector2(points[highest_idx].x - CMP_EPSILON, points[highest_idx].y), }; |
