MVVM rebuild complete

This commit is contained in:
Nitload
2024-07-30 09:37:25 +08:00
parent da75200347
commit d082071f2d
68 changed files with 2690 additions and 762 deletions
@@ -33,6 +33,23 @@ namespace StgSharp.Graphics
get => ref _texCoord[index];
}
public void UpdateFromImage(Image i)
{
if (i == _tex)
{
return;
}
if (i.Size == _tex.Size)
{
_tex = i;
}
else
{
throw new ArgumentException($"Size of {nameof(i)} does not equals to current image.");
}
}
public void ReadImage(IImageProvider provider)
{
_tex = provider.ProvideImage();