Fix storyboard sprites leaving gaps on edges when resolving from an atlas

This commit is contained in:
Salman Ahmed 2024-07-17 14:47:15 +03:00
parent ad2db3f853
commit c4141fff07
1 changed files with 3 additions and 2 deletions

View File

@ -100,14 +100,15 @@ private void load(Storyboard storyboard)
skinSourceChanged();
}
else
Texture = textureStore.Get(Sprite.Path);
Texture = textureStore.Get(Sprite.Path, WrapMode.ClampToEdge, WrapMode.ClampToEdge);
Sprite.ApplyTransforms(this);
}
private void skinSourceChanged()
{
Texture = skin.GetTexture(Sprite.Path) ?? textureStore.Get(Sprite.Path);
Texture = skin.GetTexture(Sprite.Path, WrapMode.ClampToEdge, WrapMode.ClampToEdge) ??
textureStore.Get(Sprite.Path, WrapMode.ClampToEdge, WrapMode.ClampToEdge);
// Setting texture will only update the size if it's zero.
// So let's force an explicit update.