summaryrefslogtreecommitdiffstats
path: root/servers
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-04-06 13:15:01 +0200
committerGitHub <noreply@github.com>2019-04-06 13:15:01 +0200
commit2db0613fb0d4586436cf17b3afa2cf5b64bc96b5 (patch)
treefde2b719e1d0cc84641bca32dce5049110ca7345 /servers
parent0b747f5312504d51097382fd6e39fd9a743a6086 (diff)
parent8b84638322f75e96f7220a1040652ff41fa9d06c (diff)
downloadredot-engine-2db0613fb0d4586436cf17b3afa2cf5b64bc96b5.tar.gz
Merge pull request #25624 from nekomatata/texture-rect-flip
Add ability to flip TextureRect horizontally or vertically
Diffstat (limited to 'servers')
-rw-r--r--servers/visual/visual_server_canvas.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp
index af6e3db149..4adf53c183 100644
--- a/servers/visual/visual_server_canvas.cpp
+++ b/servers/visual/visual_server_canvas.cpp
@@ -629,7 +629,7 @@ void VisualServerCanvas::canvas_item_add_texture_rect(RID p_item, const Rect2 &p
if (p_tile) {
rect->flags |= RasterizerCanvas::CANVAS_RECT_TILE;
rect->flags |= RasterizerCanvas::CANVAS_RECT_REGION;
- rect->source = Rect2(0, 0, p_rect.size.width, p_rect.size.height);
+ rect->source = Rect2(0, 0, fabsf(p_rect.size.width), fabsf(p_rect.size.height));
}
if (p_rect.size.x < 0) {