We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Something along the lines should work but we need to find a way to wrap it up nicely for use:
[Test] public void SceneShouldRenderAsExpected() { var scenery = new Scenery(); var canvas = new SkiaCanvas(); var bitmap = new SKBitmap(new SKImageInfo(1000, 1000)); canvas.Canvas = new SKCanvas(bitmap); // Test our Render implementation scenery.Render(canvas, new Microsoft.Maui.Graphics.RectF(0, 0, 1000, 1000)); using var stream = File.Create("snapshot.png"); bitmap.Encode(stream, SKEncodedImageFormat.Png, 100); } public class Scenery : GameScene { public override void Render(Canvas canvas, RectF dimensions) { base.Render(canvas, dimensions); canvas.FillColor = Colors.PaleGoldenrod; canvas.FillRectangle(new Rect(0, 0, 100, 100)); } }
This currently just involves a GameScene implementation that simply draws a rectangle on screen.
GameScene
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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: