Ejemplo n.º 1
0
        protected override void OnPaintSurface(SKPaintSurfaceEventArgs e)
        {
            var info = e.Info;

            var canvas = e.Surface.Canvas;

            var radius = (info.Width / 2.0f);

            var freeRadius = radius.Scale(0.15f);

            _position = _position.Clamp(-freeRadius, freeRadius);


            canvas.Clear();

            canvas.Save();

            canvas.Translate(radius, radius);

            canvas.Scale(1, -1);

            DrawBase(canvas, radius);

            DrawSocket(canvas, radius);

            DrawIcon(canvas, radius);

            canvas.Restore();
        }