private void AddRectangle() { var rectangle = new SkiaSharp.Elements.Rectangle(SKRect.Create(20, 20, 100, 100)) { FillColor = SKColors.SpringGreen }; canvas.Elements.Add(rectangle); }
private void AddRectangle() { _startLocation = new SKPoint(70, 70); _rectangle = new SkiaSharp.Elements.Rectangle(SKRect.Create(_startLocation, new SKSize(200, 200))) { FillColor = SKColors.SpringGreen }; canvas.Elements.Add(_rectangle); }
private void AddRectangle() { var rectangle = new SkiaSharp.Elements.Rectangle(SKRect.Create(70, 70, 200, 200)) { FillColor = new SKColor(SKColors.SpringGreen.Red, SKColors.SpringGreen.Green, SKColors.SpringGreen.Blue, 200), }; canvas.Elements.Add(rectangle); }
private void AddRectangle2() { var rectangle = new SkiaSharp.Elements.Rectangle(SKRect.Create(120, 150, 100, 100)) { FillColor = new SKColor(SKColors.SkyBlue.Red, SKColors.SkyBlue.Green, SKColors.SkyBlue.Blue, 200), Transformation = SKMatrix.MakeRotationDegrees(45) }; canvas.Elements.Add(rectangle); }
private void AddRectangles() { for (var y = 60; y < 460; y += 40) { var rnd = new Random(y); for (var x = 60; x < 460; x += 40) { var rect = new SkiaSharp.Elements.Rectangle(SKRect.Create(x, y, 40, 40)) { FillColor = new SKColor((byte)rnd.Next(255), (byte)rnd.Next(255), (byte)rnd.Next(255)) }; canvas.Elements.Add(rect); } } }