Implemented most of the rendering pipeline in SkiaSharp

This commit is contained in:
SpoinkyNL committed 2019-12-03 00:09:32 +01:00
1 parent 0e3afef6ca
commit 07b2ad87c4
35 files changed
+234 -274

No files matched your search

+3 -6
View File
@@ -1,8 +1,8 @@
using System.Drawing;
using System.Threading.Tasks;
using System.Threading.Tasks;
using Artemis.Core.Events;
using Artemis.Core.Models.Surface;
using Artemis.Core.Services.Interfaces;
using SkiaSharp;
namespace Artemis.Core.Services
{
@@ -25,10 +25,7 @@ namespace Artemis.Core.Services
// Draw a white overlay over the device
void DrawOverlay(object sender, FrameRenderingEventArgs args)
{
using (var g = Graphics.FromImage(args.Bitmap))
{
g.FillPath(new SolidBrush(Color.White), device.RenderPath);
}
args.Canvas.DrawPath(device.RenderPath, new SKPaint {Color = new SKColor(255, 255, 255)});
}
_coreService.FrameRendering += DrawOverlay;