Beispiel #1
0
 private void drawShapes(SKCanvas canvas, SSLayer layer)
 {
     if (layer.shapes != null && layer.shapes.Length > 0)
     {
         SSShapeGenerator shapeGenerator = new SSShapeGenerator(layer.shapes, model.canvasSize);
         shapeGenerator.drawShapes(canvas);
     }
 }
        private void drawGradientBackground(SKCanvas canvas)
        {
            SSShape gradientBg = new SSShape {
                size      = canvasSize,
                fillX     = true,
                fillY     = true,
                type      = ShapeType.Rectangle,
                fillStyle = FillStyle.Gradient,
                gradient  = background.gradient
            };

            gradientBg.setSize(canvasSize);
            SSShapeGenerator shapeGenerator = new SSShapeGenerator(new SSShape[] { gradientBg }, canvasSize);

            shapeGenerator.drawShapes(canvas);
        }