Browse Source
* Added failing cross test. For polyline segment with `IsStroked = false`. * Fixed some issues with non-stroked segments * Fix CombinedGeometryImpl with empty paths. If an empty (but non-null) stroke was passed to `CombinedGeometryImpl` then its empty bounds would be used and the fill bounds ignored. Added a test and fixed that. --------- Co-authored-by: Nikita Tsukanov <keks9n@gmail.com>pull/16028/head
committed by
GitHub
10 changed files with 97 additions and 30 deletions
@ -0,0 +1,23 @@ |
|||
using SkiaSharp; |
|||
using Xunit; |
|||
|
|||
namespace Avalonia.Skia.UnitTests; |
|||
|
|||
public class CombinedGeometryImplTests |
|||
{ |
|||
[Fact] |
|||
public void Combining_Fill_With_Empty_Stroke_Returns_Fill_Bounds() |
|||
{ |
|||
var fill = new SKPath(); |
|||
fill.LineTo(100, 0); |
|||
fill.LineTo(100, 100); |
|||
fill.LineTo(0, 100); |
|||
fill.Close(); |
|||
|
|||
var stroke = new SKPath(); |
|||
|
|||
var result = new CombinedGeometryImpl(stroke, fill); |
|||
|
|||
Assert.Equal(new Rect(0, 0, 100, 100), result.Bounds); |
|||
} |
|||
} |
|||
|
After Width: | Height: | Size: 362 B |
Loading…
Reference in new issue