Skip to content
This repository was archived by the owner on Jan 18, 2020. It is now read-only.

Commit 26d7abf

Browse files
committed
upgrade font and core versions
1 parent 27f4867 commit 26d7abf

File tree

4 files changed

+32
-5
lines changed

4 files changed

+32
-5
lines changed

samples/DrawShapesWithImageSharp/DrawShapesWithImageSharp.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.0</TargetFramework>
4+
<TargetFramework>netcoreapp1.1</TargetFramework>
55
<DebugType>portable</DebugType>
66
<AssemblyName>DrawShapesWithImageSharp</AssemblyName>
77
<OutputType>Exe</OutputType>
@@ -15,8 +15,9 @@
1515
</ItemGroup>
1616

1717
<ItemGroup>
18-
<PackageReference Include="ImageSharp.Drawing" Version="1.0.0-alpha9-00134" />
19-
<PackageReference Include="ImageSharp" Version="1.0.0-alpha9-00139" />
18+
<PackageReference Include="ImageSharp.Drawing" Version="1.0.0-alpha9-00189" />
19+
<PackageReference Include="ImageSharp" Version="1.0.0-alpha9-00194" />
20+
<PackageReference Include="System.Runtime.Numerics" Version="4.3.0" />
2021
</ItemGroup>
2122

2223
</Project>

src/SixLabors.Shapes.Text/SixLabors.Shapes.Text.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</ItemGroup>
3535

3636
<ItemGroup>
37-
<PackageReference Include="SixLabors.Fonts" Version="0.1.0-alpha0016" />
37+
<PackageReference Include="SixLabors.Fonts" Version="1.0.0-beta0001" />
3838
</ItemGroup>
3939

4040
<ItemGroup>

src/SixLabors.Shapes/SixLabors.Shapes.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Its a fully manged netstandard library so should work everywhere.</Description>
3535
<Compile Include="..\Shared\*.cs" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
3636
</ItemGroup>
3737
<ItemGroup>
38-
<PackageReference Include="SixLabors.Core" Version="0.1.0-alpha0002" />
38+
<PackageReference Include="SixLabors.Core" Version="1.0.0-beta0002" />
3939
<PackageReference Include="System.Buffers" Version="4.4.0" />
4040
</ItemGroup>
4141

tests/SixLabors.Shapes.Tests/Issues/Issue_ClippedPaths.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using SixLabors.Primitives;
22
using System;
33
using System.Collections.Generic;
4+
using System.Linq;
45
using System.Text;
56
using Xunit;
67

@@ -26,5 +27,30 @@ public void ClippedTriangle()
2627

2728
Assert.False(outline.Contains(new PointF(74, 97)));
2829
}
30+
31+
[Fact]
32+
public void ClippedTriangleGapInIntersections()
33+
{
34+
Polygon simplePath = new Polygon(new LinearLineSegment(
35+
new PointF(10, 10),
36+
new PointF(200, 150),
37+
new PointF(50, 300)));
38+
39+
Polygon hole1 = new Polygon(new LinearLineSegment(
40+
new PointF(37, 85),
41+
new PointF(93, 85),
42+
new PointF(65, 137)));
43+
44+
var clippedPath = simplePath.Clip(hole1);
45+
var outline = clippedPath.GenerateOutline(5, new[] { 1f });
46+
var buffer = new PointF[20];
47+
48+
var start = new PointF(outline.Bounds.Left - 1, 102);
49+
var end = new PointF(outline.Bounds.Right + 1, 102);
50+
51+
var matches = outline.FindIntersections(start, end, buffer, 0);
52+
var maxIndex = buffer.Select((x, i) => new { x, i }).Where(x => x.x.X > 0).Select(x=>x.i).Last();
53+
Assert.Equal(matches-1, maxIndex);
54+
}
2955
}
3056
}

0 commit comments

Comments
 (0)