Skip to content

Commit 4f10bcd

Browse files
Merge branch 'main' into js/text-path
2 parents 85daead + 6b6c60f commit 4f10bcd

51 files changed

Lines changed: 551 additions & 288 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
#### **Running tests and Debugging**
3030

31-
* Expected test output is pulled in as a submodule from the [ImageSharp.Tests.Images repository](https://github.com/SixLabors/Imagesharp.Tests.Images/tree/master/ReferenceOutput). To succesfully run tests, make sure that you have updated the submodules!
31+
* Expected test output is pulled in as a submodule from the [ImageSharp.Tests.Images repository](https://github.com/SixLabors/Imagesharp.Tests.Images/tree/main/ReferenceOutput). To succesfully run tests, make sure that you have updated the submodules!
3232
* Debugging (running tests in Debug mode) is only supported on .NET Core 2.1, because of JIT Code Generation bugs like [dotnet/coreclr#16443](https://github.com/dotnet/coreclr/issues/16443) or [dotnet/coreclr#20657](https://github.com/dotnet/coreclr/issues/20657)
3333

3434
#### **Do you have questions about consuming the library or the source code?**
Lines changed: 154 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -1,149 +1,158 @@
11
name: Build
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
tags:
8-
- "v*"
9-
pull_request:
10-
branches:
11-
- master
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- "v*"
9+
pull_request:
10+
branches:
11+
- main
1212
jobs:
13-
Build:
14-
strategy:
15-
matrix:
16-
options:
17-
- os: ubuntu-latest
18-
framework: netcoreapp3.1
19-
runtime: -x64
20-
codecov: false
21-
- os: macos-latest
22-
framework: netcoreapp3.1
23-
runtime: -x64
24-
codecov: false
25-
- os: windows-latest
26-
framework: netcoreapp3.1
27-
runtime: -x64
28-
codecov: true
29-
- os: windows-latest
30-
framework: netcoreapp2.1
31-
runtime: -x64
32-
codecov: false
33-
- os: windows-latest
34-
framework: net472
35-
runtime: -x64
36-
codecov: false
37-
- os: windows-latest
38-
framework: net472
39-
runtime: -x86
40-
codecov: false
41-
42-
runs-on: ${{matrix.options.os}}
43-
if: "!contains(github.event.head_commit.message, '[skip ci]')"
44-
45-
steps:
46-
- name: Git Config
47-
shell: bash
48-
run: |
49-
git config --global core.autocrlf false
50-
git config --global core.longpaths true
51-
52-
- name: Git Checkout
53-
uses: actions/checkout@v2
54-
with:
55-
fetch-depth: 0
56-
submodules: recursive
57-
58-
# See https://github.com/actions/checkout/issues/165#issuecomment-657673315
59-
- name: Git Create LFS FileList
60-
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
61-
62-
- name: Git Setup LFS Cache
63-
uses: actions/cache@v2
64-
id: lfs-cache
65-
with:
66-
path: .git/lfs
67-
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
68-
69-
- name: Git Pull LFS
70-
run: git lfs pull
71-
72-
- name: NuGet Install
73-
uses: NuGet/setup-nuget@v1
74-
75-
- name: NuGet Setup Cache
76-
uses: actions/cache@v2
77-
id: nuget-cache
78-
with:
79-
path: ~/.nuget
80-
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets') }}
81-
restore-keys: ${{ runner.os }}-nuget-
82-
83-
- name: DotNet Build
84-
shell: pwsh
85-
run: ./ci-build.ps1
86-
env:
87-
SIXLABORS_TESTING: True
88-
89-
- name: DotNet Test
90-
shell: pwsh
91-
run: ./ci-test.ps1 "${{matrix.options.os}}" "${{matrix.options.framework}}" "${{matrix.options.runtime}}" "${{matrix.options.codecov}}"
92-
env:
93-
SIXLABORS_TESTING: True
94-
XUNIT_PATH: .\tests\ImageSharp.Drawing.Tests # Required for xunit
95-
96-
- name: Export Failed Output
97-
uses: actions/upload-artifact@v2
98-
if: failure()
99-
with:
100-
name: actual_output_${{ runner.os }}_${{ matrix.options.framework }}${{ matrix.options.runtime }}.zip
101-
path: tests/Images/ActualOutput/
102-
103-
- name: Codecov Update
104-
uses: codecov/codecov-action@v1
105-
if: matrix.options.codecov == true && startsWith(github.repository, 'SixLabors')
106-
with:
107-
flags: unittests
108-
109-
Publish:
110-
needs: [Build]
111-
112-
runs-on: ubuntu-latest
113-
114-
if: (github.event_name == 'push')
115-
116-
steps:
117-
- name: Git Config
118-
shell: bash
119-
run: |
120-
git config --global core.autocrlf false
121-
git config --global core.longpaths true
122-
123-
- name: Git Checkout
124-
uses: actions/checkout@v2
125-
with:
126-
fetch-depth: 0
127-
submodules: recursive
128-
129-
- name: NuGet Install
130-
uses: NuGet/setup-nuget@v1
131-
132-
- name: NuGet Setup Cache
133-
uses: actions/cache@v2
134-
id: nuget-cache
135-
with:
136-
path: ~/.nuget
137-
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets') }}
138-
restore-keys: ${{ runner.os }}-nuget-
139-
140-
- name: DotNet Pack
141-
shell: pwsh
142-
run: ./ci-pack.ps1
143-
144-
- name: MyGet Publish
145-
shell: pwsh
146-
run: |
147-
dotnet nuget push .\artifacts\*.nupkg -k ${{secrets.MYGET_TOKEN}} -s https://www.myget.org/F/sixlabors/api/v2/package
148-
dotnet nuget push .\artifacts\*.snupkg -k ${{secrets.MYGET_TOKEN}} -s https://www.myget.org/F/sixlabors/api/v3/index.json
149-
# TODO: If github.ref starts with 'refs/tags' then it was tag push and we can optionally push out package to nuget.org
13+
Build:
14+
strategy:
15+
matrix:
16+
options:
17+
- os: ubuntu-latest
18+
framework: netcoreapp3.1
19+
runtime: -x64
20+
codecov: false
21+
- os: macos-latest
22+
framework: netcoreapp3.1
23+
runtime: -x64
24+
codecov: false
25+
- os: windows-latest
26+
framework: netcoreapp3.1
27+
runtime: -x64
28+
codecov: true
29+
- os: windows-latest
30+
framework: netcoreapp2.1
31+
runtime: -x64
32+
codecov: false
33+
- os: windows-latest
34+
framework: net472
35+
runtime: -x64
36+
codecov: false
37+
- os: windows-latest
38+
framework: net472
39+
runtime: -x86
40+
codecov: false
41+
42+
runs-on: ${{matrix.options.os}}
43+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
44+
45+
steps:
46+
- name: Git Config
47+
shell: bash
48+
run: |
49+
git config --global core.autocrlf false
50+
git config --global core.longpaths true
51+
52+
- name: Git Checkout
53+
uses: actions/checkout@v2
54+
with:
55+
fetch-depth: 0
56+
submodules: recursive
57+
58+
# See https://github.com/actions/checkout/issues/165#issuecomment-657673315
59+
- name: Git Create LFS FileList
60+
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
61+
62+
- name: Git Setup LFS Cache
63+
uses: actions/cache@v2
64+
id: lfs-cache
65+
with:
66+
path: .git/lfs
67+
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
68+
69+
- name: Git Pull LFS
70+
run: git lfs pull
71+
72+
- name: NuGet Install
73+
uses: NuGet/setup-nuget@v1
74+
75+
- name: NuGet Setup Cache
76+
uses: actions/cache@v2
77+
id: nuget-cache
78+
with:
79+
path: ~/.nuget
80+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets') }}
81+
restore-keys: ${{ runner.os }}-nuget-
82+
83+
- name: DotNet Setup
84+
uses: actions/setup-dotnet@v1
85+
with:
86+
dotnet-version: |
87+
6.0.x
88+
5.0.x
89+
3.1.x
90+
2.1.x
91+
92+
- name: DotNet Build
93+
shell: pwsh
94+
run: ./ci-build.ps1
95+
env:
96+
SIXLABORS_TESTING: True
97+
98+
- name: DotNet Test
99+
shell: pwsh
100+
run: ./ci-test.ps1 "${{matrix.options.os}}" "${{matrix.options.framework}}" "${{matrix.options.runtime}}" "${{matrix.options.codecov}}"
101+
env:
102+
SIXLABORS_TESTING: True
103+
XUNIT_PATH: .\tests\ImageSharp.Drawing.Tests # Required for xunit
104+
105+
- name: Export Failed Output
106+
uses: actions/upload-artifact@v2
107+
if: failure()
108+
with:
109+
name: actual_output_${{ runner.os }}_${{ matrix.options.framework }}${{ matrix.options.runtime }}.zip
110+
path: tests/Images/ActualOutput/
111+
112+
- name: Codecov Update
113+
uses: codecov/codecov-action@v1
114+
if: matrix.options.codecov == true && startsWith(github.repository, 'SixLabors')
115+
with:
116+
flags: unittests
117+
118+
Publish:
119+
needs: [Build]
120+
121+
runs-on: ubuntu-latest
122+
123+
if: (github.event_name == 'push')
124+
125+
steps:
126+
- name: Git Config
127+
shell: bash
128+
run: |
129+
git config --global core.autocrlf false
130+
git config --global core.longpaths true
131+
132+
- name: Git Checkout
133+
uses: actions/checkout@v2
134+
with:
135+
fetch-depth: 0
136+
submodules: recursive
137+
138+
- name: NuGet Install
139+
uses: NuGet/setup-nuget@v1
140+
141+
- name: NuGet Setup Cache
142+
uses: actions/cache@v2
143+
id: nuget-cache
144+
with:
145+
path: ~/.nuget
146+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets') }}
147+
restore-keys: ${{ runner.os }}-nuget-
148+
149+
- name: DotNet Pack
150+
shell: pwsh
151+
run: ./ci-pack.ps1
152+
153+
- name: MyGet Publish
154+
shell: pwsh
155+
run: |
156+
dotnet nuget push .\artifacts\*.nupkg -k ${{secrets.MYGET_TOKEN}} -s https://www.myget.org/F/sixlabors/api/v2/package
157+
dotnet nuget push .\artifacts\*.snupkg -k ${{secrets.MYGET_TOKEN}} -s https://www.myget.org/F/sixlabors/api/v3/index.json
158+
# TODO: If github.ref starts with 'refs/tags' then it was tag push and we can optionally push out package to nuget.org

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<h1 align="center">
22

3-
<img src="https://raw.githubusercontent.com/SixLabors/Branding/master/icons/imagesharp.drawing/sixlabors.imagesharp.drawing.512.png" alt="SixLabors.ImageSharp.Drawing" width="256"/>
3+
<img src="https://raw.githubusercontent.com/SixLabors/Branding/main/icons/imagesharp.drawing/sixlabors.imagesharp.drawing.512.png" alt="SixLabors.ImageSharp.Drawing" width="256"/>
44
<br/>
55
SixLabors.ImageSharp.Drawing
66
</h1>
77

88

99
<div align="center">
1010

11-
[![Build Status](https://img.shields.io/github/workflow/status/SixLabors/ImageSharp.Drawing/Build/master)](https://github.com/SixLabors/ImageSharp.Drawing/actions)
11+
[![Build Status](https://img.shields.io/github/workflow/status/SixLabors/ImageSharp.Drawing/Build/main)](https://github.com/SixLabors/ImageSharp.Drawing/actions)
1212
[![License: Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
13-
[![Code coverage](https://codecov.io/gh/SixLabors/ImageSharp.Drawing/branch/master/graph/badge.svg)](https://codecov.io/gh/SixLabors/ImageSharp.Drawing)
13+
[![Code coverage](https://codecov.io/gh/SixLabors/ImageSharp.Drawing/branch/main/graph/badge.svg)](https://codecov.io/gh/SixLabors/ImageSharp.Drawing)
1414
[![Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=flat&logo=twitter)](https://twitter.com/intent/tweet?hashtags=imagesharp,dotnet,oss&text=ImageSharp.+A+new+cross-platform+2D+graphics+API+in+C%23&url=https%3a%2f%2fgithub.com%2fSixLabors%2fImageSharp&via=sixlabors)
1515

1616
</div>
@@ -37,12 +37,12 @@ Support the efforts of the development of the Six Labors projects.
3737
## Documentation
3838

3939
- [Detailed documentation](https://sixlabors.github.io/docs/) for the ImageSharp.Drawing API is available. This includes additional conceptual documentation to help you get started.
40-
- Our [Samples Repository](https://github.com/SixLabors/Samples/tree/master/ImageSharp) is also available containing buildable code samples demonstrating common activities.
40+
- Our [Samples Repository](https://github.com/SixLabors/Samples/tree/main/ImageSharp) is also available containing buildable code samples demonstrating common activities.
4141

4242
## Questions?
4343

4444
- Do you have questions? We are happy to help! Please [join our Discussions Forum](https://github.com/SixLabors/ImageSharp.Drawing/discussions/category_choices), or ask them on [stackoverflow](https://stackoverflow.com) using the `ImageSharp` tag. **Do not** open issues for questions!
45-
- Please read our [Contribution Guide](https://github.com/SixLabors/ImageSharp.Drawing/blob/master/.github/CONTRIBUTING.md) before opening issues or pull requests!
45+
- Please read our [Contribution Guide](https://github.com/SixLabors/ImageSharp.Drawing/blob/main/.github/CONTRIBUTING.md) before opening issues or pull requests!
4646

4747
## Code of Conduct
4848
This project has adopted the code of conduct defined by the [Contributor Covenant](https://contributor-covenant.org/) to clarify expected behavior in our community.
@@ -94,12 +94,12 @@ git submodule update --init --recursive
9494

9595
## How can you help?
9696

97-
Please... Spread the word, contribute algorithms, submit performance improvements, unit tests, no input is too little. Make sure to read our [Contribution Guide](https://github.com/SixLabors/ImageSharp.Drawing/blob/master/.github/CONTRIBUTING.md) before opening a PR.
97+
Please... Spread the word, contribute algorithms, submit performance improvements, unit tests, no input is too little. Make sure to read our [Contribution Guide](https://github.com/SixLabors/ImageSharp.Drawing/blob/main/.github/CONTRIBUTING.md) before opening a PR.
9898

9999
## The ImageSharp Team
100100

101101
- [Scott Williams](https://github.com/tocsoft)
102102
- [James Jackson-South](https://github.com/jimbobsquarepants)
103103
- [Dirk Lemstra](https://github.com/dlemstra)
104104
- [Anton Firsov](https://github.com/antonfirsov)
105-
- [Brian Popow](https://github.com/brianpopow)
105+
- [Brian Popow](https://github.com/brianpopow)

samples/DrawShapesWithImageSharp/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ private static void OutputStarOutline(int points, float inner = 10, float outer
189189
float offset = outer + 10;
190190

191191
var star = new Star(offset, offset, points, inner, outer);
192-
IPath outline = star.GenerateOutline(width, jointStyle);
192+
IPath outline = star.GenerateOutline(width, jointStyle, EndCapStyle.Butt);
193193
outline.SaveImage("Stars", $"StarOutline_{points}_{jointStyle}.png");
194194
}
195195

@@ -199,7 +199,7 @@ private static void OutputStarOutlineDashed(int points, float inner = 10, float
199199
float offset = outer + 10;
200200

201201
var star = new Star(offset, offset, points, inner, outer);
202-
IPath outline = star.GenerateOutline(width, new float[] { 3, 3 }, false, jointStyle, cap);
202+
IPath outline = star.GenerateOutline(width, new float[] { 3, 3 }, jointStyle, cap);
203203
outline.SaveImage("Stars", $"StarOutlineDashed_{points}_{jointStyle}_{cap}.png");
204204
}
205205

src/ImageSharp.Drawing/ImageSharp.Drawing.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
</ItemGroup>
2121

2222
<ItemGroup>
23-
<PackageReference Include="SixLabors.Fonts" Version="1.0.0-beta15.24" />
24-
<PackageReference Include="SixLabors.ImageSharp" Version="2.0.0-alpha.0.156" />
23+
<PackageReference Include="SixLabors.Fonts" Version="1.0.0-beta16" />
24+
<PackageReference Include="SixLabors.ImageSharp" Version="2.0.0" />
2525
</ItemGroup>
2626

2727
<Import Project="..\..\shared-infrastructure\src\SharedInfrastructure\SharedInfrastructure.projitems" Label="Shared" />

0 commit comments

Comments
 (0)