MVVM rebuild complete
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user