public void FromPathWithoutClipDoesNotCreateEmptyRegion() { var path = new SKPath(); path.AddRect(SKRect.Create(10, 20, 30, 40)); var region = new SKRegion(path); Assert.NotEqual(SKRectI.Empty, region.Bounds); Assert.Equal(SKRectI.Truncate(path.Bounds), region.Bounds); }
public void SetPathWithoutClipDoesNotCreateEmptyRegion() { using var path = new SKPath(); path.AddRect(SKRect.Create(10, 20, 30, 40)); using var region = new SKRegion(); var isNonEmpty = region.SetPath(path); Assert.True(isNonEmpty); Assert.Equal(SKRectI.Truncate(path.Bounds), region.Bounds); }