diff --git a/samples/Blazorex.Samples.SimpleCanvas/Pages/Home.razor b/samples/Blazorex.Samples.SimpleCanvas/Pages/Home.razor index 6ca0373..d8b849c 100644 --- a/samples/Blazorex.Samples.SimpleCanvas/Pages/Home.razor +++ b/samples/Blazorex.Samples.SimpleCanvas/Pages/Home.razor @@ -79,12 +79,19 @@ } private void Render() - { - _context.ClearRect(0, 0, _width, _height); - + { + _context.ClearRect(0, 0, _width, _height); + + // fills the background with a dark blue color + _context.FillStyle = "rgb(0, 0, 100)"; + _context.FillRect(0, 0, _width, _height); + + // draws a yellow border around the sprite _context.StrokeStyle = "rgb(255, 255,0)"; _context.LineWidth = 3; _context.StrokeRect(_x, _y, _spriteWidth, _spriteHeight); + + // draws the sprite _context.DrawImage(_spritesheet, _x, _y, _spriteWidth, _spriteHeight); } } \ No newline at end of file