Merge pull request #25624 from nekomatata/texture-rect-flip
Add ability to flip TextureRect horizontally or vertically
This commit is contained in:
commit
2db0613fb0
4 changed files with 74 additions and 21 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue