You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something along the lines should work but we need to find a way to wrap it up nicely for use:
[Test]publicvoidSceneShouldRenderAsExpected(){varscenery=newScenery();varcanvas=newSkiaCanvas();varbitmap=newSKBitmap(newSKImageInfo(1000,1000));canvas.Canvas=newSKCanvas(bitmap);// Test our Render implementationscenery.Render(canvas,newMicrosoft.Maui.Graphics.RectF(0,0,1000,1000));usingvarstream=File.Create("snapshot.png");bitmap.Encode(stream,SKEncodedImageFormat.Png,100);}publicclassScenery:GameScene{publicoverridevoidRender(Canvascanvas,RectFdimensions){base.Render(canvas,dimensions);canvas.FillColor=Colors.PaleGoldenrod;canvas.FillRectangle(newRect(0,0,100,100));}}
This currently just involves a GameScene implementation that simply draws a rectangle on screen.
The text was updated successfully, but these errors were encountered:
Something along the lines should work but we need to find a way to wrap it up nicely for use:
This currently just involves a
GameScene
implementation that simply draws a rectangle on screen.The text was updated successfully, but these errors were encountered: