public bool SetPath(SKPath path) { if (path == null) { throw new ArgumentNullException(nameof(path)); } return(SkiaApi.sk_region_set_path(Handle, path.Handle, Handle)); }
public bool SetPath(SKPath path) { if (path == null) { throw new ArgumentNullException(nameof(path)); } using (var clip = new SKRegion()) { var rect = SKRectI.Ceiling(path.Bounds); if (!rect.IsEmpty) { clip.SetRect(rect); } return(SkiaApi.sk_region_set_path(Handle, path.Handle, clip.Handle)); } }
public bool SetPath(SKPath path) { if (path == null) { throw new ArgumentNullException(nameof(path)); } using (var clip = new SKRegion()) { SKRect rect; if (path.GetBounds(out rect)) { var recti = new SKRectI( (int)rect.Left, (int)rect.Top, (int)Math.Ceiling(rect.Right), (int)Math.Ceiling(rect.Bottom)); clip.SetRect(recti); } return(SkiaApi.sk_region_set_path(Handle, path.Handle, clip.Handle)); } }
public bool SetPath(SKPath path) { return(SkiaApi.sk_region_set_path(Handle, path.Handle)); }