예제 #1
0
        public void DrawHeatZone(CGContext canvas, SKRect zone, float halo, float groove, SKColor color, Swipe swipe)
        {
            var radialGradient = SKShader.CreateRadialGradient(swipe % new SKPoint(zone.MidX, zone.MidY), swipe % groove, new SKColor[2] {
                color, KDeviceHandler.deviceBackColor
            }, null, SKShaderTileMode.Mirror);                                                                                                                                                                      //, scaleMatrix);

            using (var gradientPaint = new SKPaint {
                Style = SKPaintStyle.Fill, Shader = radialGradient
            })
            {
                var path = new CGPath();
                path.AddRoundedRect(CG.Rect(swipe % InflateRect(zone, halo)), swipe % halo, swipe % halo);
                canvas.AddPath(path);
                canvas.SetFillColor(CG.Color(color));
                canvas.FillPath();
            }
        }
예제 #2
0
 public /*interface Painter*/ void DrawRect(SKRect rect, SKPaint paint)
 {
     CG.DrawRect(canvas, CG.Rect(rect), paint);
 }