private void OnPaint(UIElement element, SKCanvas canvas) { Background.Draw(HipsterEngine.Surface.Canvas); LayoutTop.Draw(); HipsterEngine.Surface.Canvas.Camera.Update(); HipsterEngine.Surface.Canvas.Save(); HipsterEngine.Surface.Canvas.Translate(HipsterEngine.Surface.Canvas.Camera.X, HipsterEngine.Surface.Canvas.Camera.Y); HipsterEngine.Surface.Canvas.RotateRadians(HipsterEngine.Surface.Canvas.Camera.Angle, HipsterEngine.Surface.Canvas.Camera.CenterRotation.X, HipsterEngine.Surface.Canvas.Camera.CenterRotation.Y); LayoutRecords.Draw(); PlanetStart.Draw(); Map.Draw(); HipsterEngine.Surface.Canvas.Restore(); HipsterEngine.Particles.Draw(HipsterEngine.Surface.Canvas.GetSkiaCanvas()); HipsterEngine.Surface.Canvas.DrawRect(0, 0, Width, Height, new SKPaint { Style = SKPaintStyle.Fill, Color = new SKColor(0, 0, 0, Convert.ToByte(AnimationEndGame.CurrentValue)) }); }
private void OnPaint(UIElement element, SKCanvas canvas) { canvas.Clear(BackgroundColor); LayoutRecords.Draw(); Planet.Draw(); Triangle.Draw(HipsterEngine.Surface.Canvas); HipsterEngine.Surface.Canvas.Save(); HipsterEngine.Surface.Canvas.Translate(Width / 2, Height / 2); // HipsterEngine.Surface.Canvas.RotateRadians(_time); // HipsterEngine.Surface.Canvas.Scale(0.5f, 0.5f); // if (bitmap != null) // HipsterEngine.Surface.Canvas.DrawBitmap(bitmap, -bitmap.Width / 2,-bitmap.Height / 2, paint); //HipsterEngine.Surface.Canvas.DrawBitmap(bitmap, SKRect.Create(0, 0, 100, 100), paint); HipsterEngine.Surface.Canvas.Restore(); LabelTouchMe.Draw(); PaintAnimation = new SKPaint { Style = SKPaintStyle.Fill, Color = new SKColor(0, 0, 0, Convert.ToByte(AnimationEndGame.CurrentValue)) }; HipsterEngine.Surface.Canvas.DrawRect(0, 0, Width, Height, PaintAnimation); }