WIP - Added a BitmapBrush to replace the GraphicsDecorator

This commit is contained in:
SpoinkyNL committed 2019-12-11 00:04:23 +01:00
1 parent fe21bc83da
commit a2871541b9
15 files changed
+399 -116

No files matched your search

@@ -40,16 +40,16 @@ namespace Artemis.UI.Screens.Settings.Debug
{
Execute.PostToUIThread(() =>
{
if (e.GraphicsDecorator.Bitmap == null)
if (e.BitmapBrush.Bitmap == null)
return;
if (!(CurrentFrame is WriteableBitmap writeableBitmap))
{
CurrentFrame = e.GraphicsDecorator.Bitmap.ToWriteableBitmap();
CurrentFrame = e.BitmapBrush.Bitmap.ToWriteableBitmap();
return;
}
using (var skiaImage = SKImage.FromPixels(e.GraphicsDecorator.Bitmap.PeekPixels()))
using (var skiaImage = SKImage.FromPixels(e.BitmapBrush.Bitmap.PeekPixels()))
{
var info = new SKImageInfo(skiaImage.Width, skiaImage.Height);
writeableBitmap.Lock();