Fix Line2D tile mode for non-square textures
This commit is contained in:
parent
71602c7491
commit
d2fae5c9a6
3 changed files with 15 additions and 7 deletions
|
|
@ -252,12 +252,15 @@ void Line2D::_draw() {
|
|||
lb.sharp_limit = _sharp_limit;
|
||||
lb.width = _width;
|
||||
|
||||
lb.build();
|
||||
|
||||
RID texture_rid;
|
||||
if (_texture.is_valid())
|
||||
if (_texture.is_valid()) {
|
||||
texture_rid = (**_texture).get_rid();
|
||||
|
||||
lb.tile_aspect = _texture->get_size().aspect();
|
||||
}
|
||||
|
||||
lb.build();
|
||||
|
||||
VS::get_singleton()->canvas_item_add_triangle_array(
|
||||
get_canvas_item(),
|
||||
lb.indices,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue