Example #1
0
 public void AddRoundRect(SKRoundRect rect, SKPathDirection direction, uint startIndex)
 {
     if (rect == null)
     {
         throw new ArgumentNullException(nameof(rect));
     }
     SkiaApi.sk_path_add_rrect_start(Handle, rect.Handle, direction, startIndex);
 }
Example #2
0
 public void AddRoundRect(SKRoundRect rect, SKPathDirection direction = SKPathDirection.Clockwise)
 {
     if (rect == null)
     {
         throw new ArgumentNullException(nameof(rect));
     }
     SkiaApi.sk_path_add_rrect(Handle, rect.Handle, direction);
 }
Example #3
0
        public void ClipRoundRect(SKRoundRect rect, SKClipOperation operation = SKClipOperation.Intersect, bool antialias = false)
        {
            if (rect == null)
            {
                throw new ArgumentNullException(nameof(rect));
            }

            SkiaApi.sk_canvas_clip_rrect_with_operation(Handle, rect.Handle, operation, antialias);
        }
Example #4
0
 public void DrawRoundRect(SKRoundRect rect, SKPaint paint)
 {
     if (rect == null)
     {
         throw new ArgumentNullException(nameof(rect));
     }
     if (paint == null)
     {
         throw new ArgumentNullException(nameof(paint));
     }
     SkiaApi.sk_canvas_draw_rrect(Handle, rect.Handle, paint.Handle);
 }
Example #5
0
 public void DrawRoundRectDifference(SKRoundRect outer, SKRoundRect inner, SKPaint paint)
 {
     if (outer == null)
     {
         throw new ArgumentNullException(nameof(outer));
     }
     if (inner == null)
     {
         throw new ArgumentNullException(nameof(inner));
     }
     if (paint == null)
         throw new ArgumentNullException(nameof(paint)); }
Example #6
0
        public bool TryTransform(SKMatrix matrix, out SKRoundRect transformed)
        {
            var destHandle = SkiaApi.sk_rrect_new();

            if (SkiaApi.sk_rrect_transform(Handle, &matrix, destHandle))
            {
                transformed = new SKRoundRect(destHandle, true);
                return(true);
            }
            transformed = null;
            return(false);
        }
Example #7
0
        public SKRoundRect GetRoundRect()
        {
            var rrect  = new SKRoundRect();
            var result = SkiaApi.sk_path_is_rrect(Handle, rrect.Handle);

            if (result)
            {
                return(rrect);
            }
            else
            {
                rrect.Dispose();
                return(null);
            }
        }
Example #8
0
        // DrawRoundRectDifference

        public void DrawRoundRectDifference(SKRoundRect outer, SKRoundRect inner, SKPaint paint)
        {
            if (outer == null)
            {
                throw new ArgumentNullException(nameof(outer));
            }
            if (inner == null)
            {
                throw new ArgumentNullException(nameof(inner));
            }
            if (paint == null)
            {
                throw new ArgumentNullException(nameof(paint));
            }

            SkiaApi.sk_canvas_draw_drrect(Handle, outer.Handle, inner.Handle, paint.Handle);
        }
Example #9
0
 public SKRoundRect(SKRoundRect rrect)
     : this(SkiaApi.sk_rrect_new_copy(rrect.Handle), true)
 {
 }