Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style: Improve SKRegion.cs style consistency and add style configuration file for OmniSharp #795

Open
wants to merge 2 commits into
base: master
from
Open
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Prev

♻️ Standardize styling across SKRegion file

  • Loading branch information...
vexx32 committed Feb 10, 2019
commit 40006e0fcf0e699ba76da2b9860c696bf0d48e0c
@@ -5,13 +5,13 @@ namespace SkiaSharp
public class SKRegion : SKObject
{
[Preserve]
internal SKRegion(IntPtr handle, bool owns)
: base (handle, owns)
internal SKRegion(IntPtr handle, bool owns)
: base(handle, owns)
{
}

public SKRegion()
: this (SkiaApi.sk_region_new(), true)
: this(SkiaApi.sk_region_new(), true)
{
}

@@ -22,16 +22,16 @@ public SKRegion(SKRegion region)

public SKRectI Bounds {
get {
SkiaApi.sk_region_get_bounds (Handle, out var rect);
SkiaApi.sk_region_get_bounds(Handle, out var rect);
return rect;
}
}

public bool Contains(SKRegion src)
{
if (src == null)
throw new ArgumentNullException (nameof (src));
return SkiaApi.sk_region_contains(Handle, src.Handle);
throw new ArgumentNullException(nameof(src));
return SkiaApi.sk_region_contains(Handle, src.Handle);
}

public bool Contains(SKPointI xy)
@@ -47,7 +47,7 @@ public bool Contains(int x, int y)
public bool Intersects(SKRegion region)
{
if (region == null)
throw new ArgumentNullException (nameof (region));
throw new ArgumentNullException(nameof(region));
return SkiaApi.sk_region_intersects(Handle, region.Handle);
}

@@ -59,22 +59,22 @@ public bool Intersects(SKRectI rect)
public bool SetRegion(SKRegion region)
{
if (region == null)
throw new ArgumentNullException (nameof (region));
throw new ArgumentNullException(nameof(region));
return SkiaApi.sk_region_set_region(Handle, region.Handle);
}

public bool SetRect(SKRectI rect)
{
return SkiaApi.sk_region_set_rect(Handle, ref rect);
return SkiaApi.sk_region_set_rect(Handle, ref rect);
}

public bool SetPath(SKPath path, SKRegion clip)
{
if (path == null)
throw new ArgumentNullException (nameof (path));
throw new ArgumentNullException(nameof(path));
if (clip == null)
throw new ArgumentNullException (nameof (clip));
return SkiaApi.sk_region_set_path(Handle, path.Handle, clip.Handle);
throw new ArgumentNullException(nameof(clip));
return SkiaApi.sk_region_set_path(Handle, path.Handle, clip.Handle);
}

public bool SetPath(SKPath path)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.