Skip to content

Commit

Permalink
Updating the submodules (#985)
Browse files Browse the repository at this point in the history
* Updated FreeType for Linux
* Add fixes and tests for SkRegion.Contains return
  • Loading branch information
mattleibow authored Oct 18, 2019
1 parent 4d3883b commit af74a6c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion externals/skia
34 changes: 34 additions & 0 deletions tests/Tests/SKRegionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,39 @@ public void RegionIntersectsWithRectI()

Assert.True(region.Intersects(rect));
}

[SkippableFact]
public void ContainsReturnsFalseIfItDoesNotContain()
{
var region = new SKRegion(new SKRectI(30, 30, 40, 40));
var region2 = new SKRegion(new SKRectI(25, 25, 50, 50));

Assert.False(region.Contains(region2));
}

[SkippableFact]
public void ContainsReturnsTrueIfItDoesContain()
{
var region = new SKRegion(new SKRectI(25, 25, 50, 50));
var region2 = new SKRegion(new SKRectI(30, 30, 40, 40));

Assert.True(region.Contains(region2));
}

[SkippableFact]
public void ContainsReturnsFalseIfItDoesNotContainPoint()
{
var region = new SKRegion(new SKRectI(30, 30, 40, 40));

Assert.False(region.Contains(60, 60));
}

[SkippableFact]
public void ContainsReturnsTrueIfItDoesContainPoint()
{
var region = new SKRegion(new SKRectI(25, 25, 50, 50));

Assert.True(region.Contains(40, 40));
}
}
}

0 comments on commit af74a6c

Please sign in to comment.