Пример #1
0
        public static void DrawBorder(SKCanvas canvas, RectangleF dirtyRect, SkiaControl control, View view)
        {
            var shape = control.GetBorder();

            if (shape == null)
            {
                return;
            }
            control?.DrawBorder(canvas, shape, dirtyRect);
        }
Пример #2
0
        public static void ClipCanvas(SKCanvas canvas, RectangleF dirtyRect, SkiaControl control, View view)
        {
            var border    = control?.GetBorder();
            var clipShape = control?.GetClipShape() ?? border;

            if (clipShape != null)
            {
                canvas.ClipPath(clipShape.PathForBounds(dirtyRect).ToSKPath());
            }
        }