project spring clean and style👮

This commit is contained in:
Scott Williams 2018-05-24 21:50:54 +01:00
Родитель b36f00be55
Коммит 19fcdd259b
53 изменённых файлов: 234 добавлений и 10703 удалений

Просмотреть файл

@ -0,0 +1,6 @@
<SolutionConfiguration>
<Settings>
<AllowParallelTestExecution>True</AllowParallelTestExecution>
<SolutionConfigured>True</SolutionConfigured>
</Settings>
</SolutionConfiguration>

Просмотреть файл

@ -2,19 +2,17 @@ version: 0.0.{build}
image: Visual Studio 2017
install:
- choco install gitversion.portable -pre -y
before_build:
- cmd: dotnet --version
- ps: c:\ProgramData\chocolatey\lib\gitversion.portable\tools\gitversion.exe /l console /output buildserver
build_script:
- cmd: build.cmd
- cmd: tests\CodeCoverage\CodeCoverage.cmd
after_build:
- cmd: appveyor PushArtifact "artifacts\SixLabors.Shapes.%GitVersion_NuGetVersion%.nupkg"
- cmd: appveyor PushArtifact "artifacts\SixLabors.Shapes.Text.%GitVersion_NuGetVersion%.nupkg"
- cmd: appveyor PushArtifact "artifacts\SixLabors.Shapes.%APPVEYOR_BUILD_VERSION%.nupkg"
- cmd: appveyor PushArtifact "artifacts\SixLabors.Shapes.Text.%APPVEYOR_BUILD_VERSION%.nupkg"
deploy:
- provider: NuGet

Просмотреть файл

@ -1,36 +1,6 @@
@echo Off
if not "%GitVersion_NuGetVersion%" == "" (
dotnet restore /p:packageversion=%GitVersion_NuGetVersion%
)ELSE (
dotnet restore
)
ECHO Building nuget packages
if not "%GitVersion_NuGetVersion%" == "" (
dotnet build -c Release /p:packageversion=%GitVersion_NuGetVersion%
)ELSE (
dotnet build -c Release
)
if not "%errorlevel%"=="0" goto failure
dotnet test ./tests/SixLabors.Shapes.Tests/SixLabors.Shapes.Tests.csproj
if not "%GitVersion_NuGetVersion%" == "" (
dotnet pack ./src/SixLabors.Shapes/ -c Release --output ../../artifacts --no-build /p:packageversion=%GitVersion_NuGetVersion%
)ELSE (
dotnet pack ./src/SixLabors.Shapes/ -c Release --output ../../artifacts --no-build
)
if not "%GitVersion_NuGetVersion%" == "" (
dotnet pack ./src/SixLabors.Shapes.Text/ -c Release --output ../../artifacts --no-build /p:packageversion=%GitVersion_NuGetVersion%
)ELSE (
dotnet pack ./src/SixLabors.Shapes.Text/ -c Release --output ../../artifacts --no-build
)
if not "%errorlevel%"=="0" goto failure
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '.\build.ps1'"
if not "%errorlevel%"=="0" goto failure

113
build.ps1 Normal file
Просмотреть файл

@ -0,0 +1,113 @@
# lets calulat the correct version here
$fallbackVersion = "1.0.0";
$version = ''
$tagRegex = '^v?(\d+\.\d+\.\d+)(-([a-zA-Z]+)\.?(\d*))?$'
# we are running on the build server
$isVersionTag = $env:APPVEYOR_REPO_TAG_NAME -match $tagRegex
if($isVersionTag){
Write-Debug "Building commit tagged with a compatable version number"
$version = $matches[1]
$postTag = $matches[3]
$count = $matches[4]
Write-Debug "version number: ${version} post tag: ${postTag} count: ${count}"
if("$postTag" -ne ""){
$version = "${version}-${postTag}"
}
if("$count" -ne ""){
# for consistancy with previous releases we pad the counter to only 4 places
$padded = $count.Trim().Trim('0').PadLeft(4,"0");
Write-Debug "count '$count', padded '${padded}'"
$version = "${version}${padded}"
}
}else {
Write-Debug "Untagged"
$lastTag = (git tag --list --sort=-taggerdate) | Out-String
$list = $lastTag.Split("`n")
foreach ($tag in $list) {
Write-Debug "testing ${tag}"
$tag = $tag.Trim();
if($tag -match $tagRegex){
Write-Debug "matched ${tag}"
$version = $matches[1];
break;
}
}
if("$version" -eq ""){
$version = $fallbackVersion
Write-Debug "Failed to discover base version Fallback to '${version}'"
}else{
Write-Debug "Discovered base version from tags '${version}'"
}
$buildNumber = $env:APPVEYOR_BUILD_NUMBER
# build number replacement is padded to 6 places
$buildNumber = "$buildNumber".Trim().Trim('0').PadLeft(6,"0");
if("$env:APPVEYOR_PULL_REQUEST_NUMBER" -ne ""){
Write-Debug "building a PR"
$prNumber = "$env:APPVEYOR_PULL_REQUEST_NUMBER".Trim().Trim('0').PadLeft(5,"0");
# this is a PR
$version = "${version}-PullRequest${prNumber}${buildNumber}";
}else{
Write-Debug "building a branch commit"
# this is a general branch commit
$branch = $env:APPVEYOR_REPO_BRANCH
if("$branch" -eq ""){
$branch = ((git rev-parse --abbrev-ref HEAD) | Out-String).Trim()
if("$branch" -eq ""){
$branch = "unknown"
}
}
$branch = $branch.Replace("/","-").ToLower()
if($branch.ToLower() -eq "master"){
$branch = "dev"
}
$version = "${version}-${branch}${buildNumber}";
}
}
if("$env:APPVEYOR_API_URL" -ne ""){
# update appveyor build number for this build
Invoke-RestMethod -Method "PUT" `
-Uri "${env:APPVEYOR_API_URL}api/build" `
-Body "{version:'${version}'}" `
-ContentType "application/json"
}
Write-Host "Building version '${version}'"
dotnet restore /p:packageversion=$version
Write-Host "Building projects"
dotnet build -c Release /p:packageversion=$version
if ($LASTEXITCODE ){ Exit $LASTEXITCODE }
if ( $env:CI -ne "True") {
dotnet test ./tests/SixLabors.Shapes.Tests/SixLabors.Shapes.Tests.csproj --no-build -c Release
}
if ($LASTEXITCODE ){ Exit $LASTEXITCODE }
Write-Host "Packaging projects"
dotnet pack ./src/SixLabors.Shapes/SixLabors.Shapes.csproj -c Release --output ../../artifacts --no-build /p:packageversion=$version
if ($LASTEXITCODE ){ Exit $LASTEXITCODE }
dotnet pack ./src/SixLabors.Shapes.Text/SixLabors.Shapes.Text.csproj -c Release --output ../../artifacts --no-build /p:packageversion=$version
if ($LASTEXITCODE ){ Exit $LASTEXITCODE }

4
docs/.gitignore поставляемый
Просмотреть файл

@ -1,4 +0,0 @@
# Jekyll site files
_site
.DS_Store

Просмотреть файл

@ -1 +0,0 @@
shapes.sixlabors.com

Просмотреть файл

@ -1,2 +0,0 @@
highlighter: rouge
permalink: /:title

Просмотреть файл

@ -1,88 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{% if page.title %}{{page.title}} - {% endif %}Six Labors Shapes</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
<link href="/assets/css/bootstrap.css" rel="stylesheet">
<style>
body { padding-top: 60px; /* 60px to make the container go all the way
to the bottom of the topbar */ }
</style>
<link href="/assets/css/bootstrap-responsive.css" rel="stylesheet">
<link href="/assets/css/docs.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js">
</script>
<![endif]-->
<!-- Le fav and touch icons -->
<link rel="apple-touch-icon" sizes="180x180" href="/assets/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" href="/assets/favicon/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/assets/favicon/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/assets/favicon/manifest.json">
<link rel="mask-icon" href="/assets/favicon/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="/assets/favicon/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Six Labors - Shapes">
<meta name="application-name" content="Six Labors - Shapes">
<meta name="msapplication-config" content="/assets/favicon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<style>
</style>
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a href="/" class="brand"><img src="/assets/img/icon.svg" width="40px"> SixLabors.Shapes</a>
<ul class="nav pull-right">
<li><a href="http://sixlabors.com/blog" target="_blank">Six Labors Blog</a></li>
<li><a href="https://github.com/SixLabors/Shapes" target="_blank">View on GitHub</a></li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="span3">
<ul id="menu" class="nav nav-list" data-spy="affix">
<li class="nav-header">The docs</li>
<li data-section=""><a href="/">Home</a></li>
<li data-section="docs/installation"><a href="/docs/installation.html">Installation</a></li>
<li data-section="docs/installation"><a href="/other-projects.html">Projects using Shapes</a></li>
</ul>
</div>
<div class="span9">
{{content}}
</div>
</div>
</div>
<style>
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js">
</script>
<script src="/assets/js/bootstrap.js">
</script>
<script>
$('#menu [data-section="{{page.section}}"]').addClass('active');
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-92691012-2', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>

1109
docs/assets/css/bootstrap-responsive.css поставляемый

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

6158
docs/assets/css/bootstrap.css поставляемый

Разница между файлами не показана из-за своего большого размера Загрузить разницу

9
docs/assets/css/bootstrap.min.css поставляемый

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1,144 +0,0 @@
/* @license
* MyFonts Webfont Build ID 2341569, 2012-08-09T16:00:31-0400
*
* The fonts listed in this notice are subject to the End User License
* Agreement(s) entered into by the website owner. All other parties are
* explicitly restricted from using the Licensed Webfonts(s).
*
* You may obtain a valid license at the URLs below.
*
* Webfont: Proxima Nova Regular by Mark Simonson
* URL: http://www.myfonts.com/fonts/marksimonson/proxima-nova/regular/
*
* Webfont: Proxima Nova Bold by Mark Simonson
* URL: http://www.myfonts.com/fonts/marksimonson/proxima-nova/bold/
*
* Webfont: Proxima Nova Thin by Mark Simonson
* URL: http://www.myfonts.com/fonts/marksimonson/proxima-nova/thin/
*
* Webfont: Proxima Nova Light by Mark Simonson
* URL: http://www.myfonts.com/fonts/marksimonson/proxima-nova/light/
*
* © 2012 Bitstream Inc
*/
/* TODO: Switch the names of these files over to ProximaNova_Bold */
@font-face {font-family: 'ProximaNova-Bold';src: url('http://jetstrap-site.s3.amazonaws.com/webfonts/23BAC1_2_0.eot');src: url('http://jetstrap-site.s3.amazonaws.com/webfonts/23BAC1_2_0.eot?#iefix') format('embedded-opentype'),url('http://jetstrap-site.s3.amazonaws.com/webfonts/23BAC1_2_0.woff') format('woff'),url('http://jetstrap-site.s3.amazonaws.com/webfonts/23BAC1_2_0.ttf') format('truetype');}
@font-face {font-family: 'ProximaNova-Light';src: url('http://jetstrap-site.s3.amazonaws.com/webfonts/ProximaNova_Light.eot');src: url('http://jetstrap-site.s3.amazonaws.com/webfonts/ProximaNova_Light.eot?#iefix') format('embedded-opentype'),url('http://jetstrap-site.s3.amazonaws.com/webfonts/ProximaNova_Light.woff') format('woff'),url('http://jetstrap-site.s3.amazonaws.com/webfonts/ProximaNova_Light.ttf') format('truetype');}
@font-face {font-family: 'ProximaNova-Regular';src: url('http://jetstrap-site.s3.amazonaws.com/webfonts/ProximaNova_Regular.eot');src: url('http://jetstrap-site.s3.amazonaws.com/webfonts/ProximaNova_Regular.eot?#iefix') format('embedded-opentype'),url('http://jetstrap-site.s3.amazonaws.com/webfonts/ProximaNova_Regular.woff') format('woff'),url('http://jetstrap-site.s3.amazonaws.com/webfonts/ProximaNova_Regular.ttf') format('truetype');}
@font-face {font-family: 'ProximaNova-Thin';src: url('http://jetstrap-site.s3.amazonaws.com/webfonts/ProximaNova_Thin.eot');src: url('http://jetstrap-site.s3.amazonaws.com/webfonts/ProximaNova_Thin.eot?#iefix') format('embedded-opentype'),url('http://jetstrap-site.s3.amazonaws.com/webfonts/ProximaNova_Thin.woff') format('woff'),url('http://jetstrap-site.s3.amazonaws.com/webfonts/ProximaNova_Thin.ttf') format('truetype');}
body {
padding-top: 100px;
font-family: 'ProximaNova-Regular', Helvetica, sans-serif;
}
.navbar-inner {
padding: 5px 0px;
background-image: none;
background-color: rgba(0, 0, 0, 0.7);
box-shadow: none !important;
-webkit-box-shadow: none !important;
-moz-box-shadow: none !important;
}
.navbar .nav.pull-right li {
line-height: 42px
}
.navbar .nav.pull-right a {
margin-right: 40px;
text-decoration: none;
color: #ccc;
font-size: 13px;
font-family: 'ProximaNova-Bold';
font-weight: normal;
text-shadow: none;
}
.navbar .nav.pull-right li:last-child a {
margin-right: 0px;
}
.navbar .nav.pull-right a:hover {
color: #fff;
}
.navbar .nav.pull-right a.orange-button {
display: inline-block;
}
.navbar .brand{
display: block;
float: left;
padding: 10px 20px 10px;
margin-left: -20px;
font-size: 35px;
font-weight: normal;
color: #eee;
text-shadow: none;
}
#menu {
min-height: 800px;
border-right: 1px solid #eee;
width: 180px;
}
@media (min-width: 1200px) {
width: 200px;
}
@media (max-width: 979px) and (min-width: 768px) {
#menu {
width: 140px;
}
}
@media (max-width: 768px) {
#menu {
min-height: 0px;
border: none;
position: static;
width: auto;
margin-bottom: 20px;
border-bottom: 1px solid #eee;
}
}
#menu li.nav-header {
color: #111;
font-family: 'ProximaNova-Bold';
font-weight: normal;
letter-spacing: 2px;
}
#menu li a {
padding-top: 8px;
padding-bottom: 8px;
}
#menu li a {
color: #999;
text-shadow: none;
}
#menu li.active a {
background-color: #33a5c8;
color: #fff;
}
.orange-button {
display: inline-block;
line-height: 20px;
border-radius: 20px;
vertical-align: middle;
color: #ffffff !important;
background-image: linear-gradient(90deg, #dc534b 0%, #d96f5f 100%);
background-image: -moz-linear-gradient(90deg, #dc534b 0%, #d96f5f 100%);
background-image: -webkit-linear-gradient(90deg, #dc534b 0%, #d96f5f 100%);
box-shadow: 0 1px 3px rgba(0, 0, 0, .2)
padding: 0px 10px;
}
.orange-button {
}
@media (max-width: 979px) {
body {
padding-top: 0px;
}
}

Двоичные данные
docs/assets/favicon/android-chrome-192x192.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 17 KiB

Двоичные данные
docs/assets/favicon/android-chrome-512x512.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 51 KiB

Двоичные данные
docs/assets/favicon/apple-touch-icon.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 10 KiB

Просмотреть файл

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="assets/favicon/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>

Двоичные данные
docs/assets/favicon/favicon-16x16.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.0 KiB

Двоичные данные
docs/assets/favicon/favicon-32x32.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 2.0 KiB

Двоичные данные
docs/assets/favicon/favicon.ico

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 15 KiB

Просмотреть файл

@ -1,18 +0,0 @@
{
"name": "Six Labors - Shapes",
"icons": [
{
"src": "assets/favicon/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "assets/favicon/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

Двоичные данные
docs/assets/favicon/mstile-144x144.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 12 KiB

Двоичные данные
docs/assets/favicon/mstile-150x150.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 12 KiB

Двоичные данные
docs/assets/favicon/mstile-310x150.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 12 KiB

Двоичные данные
docs/assets/favicon/mstile-310x310.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 28 KiB

Двоичные данные
docs/assets/favicon/mstile-70x70.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 7.6 KiB

Просмотреть файл

@ -1,328 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="16.000000pt" height="16.000000pt" viewBox="0 0 16.000000 16.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.11, written by Peter Selinger 2001-2013
</metadata>
<g transform="translate(0.000000,16.000000) scale(0.002286,-0.002286)"
fill="#000000" stroke="none">
<path d="M142 6974 c-57 -28 -96 -69 -123 -129 -18 -38 -19 -168 -19 -3345 0
-3177 1 -3307 19 -3345 27 -60 66 -101 123 -129 l52 -26 3306 0 3306 0 52 26
c57 28 96 69 123 129 18 38 19 168 19 3346 l0 3305 -26 52 c-28 57 -69 96
-129 123 -38 18 -168 19 -3346 19 l-3305 0 -52 -26z m6682 -6 c54 -16 128 -90
144 -144 18 -60 18 -6588 0 -6648 -16 -54 -90 -128 -144 -144 -31 -9 -243 -12
-855 -12 l-813 0 39 40 c21 22 45 40 52 40 8 0 16 8 20 18 3 9 15 27 26 39
l20 23 371 0 371 0 17 -40 c13 -33 22 -40 45 -41 43 -2 67 2 77 12 6 5 15 4
22 -2 7 -6 32 -9 56 -7 35 2 43 7 43 23 0 16 -8 21 -41 23 -36 3 -41 6 -37 23
9 33 -18 80 -54 95 -28 12 -38 12 -67 0 -19 -8 -39 -24 -46 -35 -11 -21 -16
-21 -353 -20 l-342 0 105 28 c413 107 729 336 970 702 130 198 218 409 271
654 l17 80 1 -257 1 -256 -35 -20 c-53 -32 -60 -98 -13 -142 21 -20 62 -25
103 -14 28 7 49 57 40 97 -3 18 -9 56 -12 86 -4 41 -9 54 -24 58 -25 7 -24 23
1 23 17 0 20 7 20 51 0 42 -3 52 -20 56 -26 7 -26 23 0 23 18 0 20 7 20 55 0
48 -2 55 -20 55 -11 0 -20 5 -20 10 0 6 9 10 20 10 18 0 20 7 20 55 0 48 -2
55 -20 55 -11 0 -20 4 -20 9 0 5 9 11 20 14 17 4 20 14 20 56 0 44 -3 51 -20
51 -11 0 -20 7 -20 15 0 8 9 15 20 15 17 0 20 7 20 50 0 43 -3 50 -20 50 -11
0 -20 7 -20 15 0 8 9 15 20 15 15 0 20 7 20 28 0 20 13 41 45 72 25 24 45 49
45 55 0 6 -20 31 -45 55 -43 42 -45 47 -45 102 0 51 -2 58 -20 58 -11 0 -20 5
-20 10 0 6 9 10 20 10 18 0 20 7 20 55 0 48 -2 55 -20 55 -26 0 -26 16 0 23
17 4 20 14 20 56 0 44 -3 51 -20 51 -26 0 -26 16 0 23 17 4 20 14 20 56 0 44
-3 51 -20 51 -11 0 -20 7 -20 15 0 8 9 15 20 15 17 0 20 7 20 50 0 43 -3 50
-20 50 -11 0 -20 7 -20 15 0 8 9 15 20 15 17 0 20 7 20 50 0 43 -3 50 -20 50
-11 0 -20 7 -20 15 0 8 9 15 20 15 17 0 20 7 20 49 0 27 4 60 9 73 5 14 4 42
-3 71 l-11 47 -53 0 c-43 0 -58 -5 -77 -25 -46 -45 -31 -122 26 -146 l29 -11
-1 -262 -1 -261 -17 80 c-80 365 -224 647 -472 925 -187 209 -463 377 -738
451 l-66 17 313 1 c296 1 312 0 312 -17 0 -10 11 -29 25 -42 59 -55 151 -11
148 70 -2 38 0 40 28 40 22 0 29 5 29 19 0 17 -9 20 -72 23 -40 2 -95 2 -122
0 -48 -3 -48 -4 -42 -33 l5 -29 -389 0 c-248 0 -391 4 -395 10 -4 6 13 10 44
10 44 0 51 3 51 20 0 18 -7 20 -55 20 -44 0 -55 -3 -55 -16 0 -11 -21 4 -57
39 l-58 56 -40 -39 c-30 -30 -49 -40 -73 -40 -25 0 -32 -4 -32 -19 0 -11 6
-22 13 -24 6 -3 -276 -5 -628 -5 -352 0 -630 3 -617 5 14 3 22 12 22 24 0 16
-7 19 -43 19 -36 0 -49 6 -77 35 l-34 35 -36 -35 c-27 -26 -39 -32 -47 -24
-20 20 -43 2 -43 -33 0 -19 -9 -41 -22 -55 l-21 -23 21 -23 c15 -16 22 -36 22
-65 0 -38 2 -42 25 -42 16 0 25 6 25 16 0 8 5 12 10 9 6 -3 10 -33 10 -65 0
-37 5 -60 13 -64 10 -5 10 -7 0 -12 -16 -7 -18 -114 -3 -114 6 0 10 -7 10 -15
0 -8 -4 -15 -10 -15 -5 0 -10 -22 -10 -50 0 -27 5 -50 10 -50 6 0 10 -7 10
-15 0 -8 -4 -15 -10 -15 -5 0 -10 -22 -10 -50 0 -27 5 -50 10 -50 6 0 10 -7
10 -15 0 -8 -4 -15 -10 -15 -15 0 -13 -107 3 -114 10 -5 10 -7 0 -12 -7 -3
-13 -20 -13 -37 0 -24 -3 -28 -12 -19 -7 7 -11 36 -9 73 2 58 2 60 -21 57 -17
-2 -24 -10 -26 -33 -2 -22 -24 -51 -80 -107 l-77 -78 -931 0 c-797 0 -933 2
-943 14 -15 18 -33 5 244 166 373 218 822 505 1008 647 32 24 55 38 50 30 -4
-8 -84 -95 -178 -195 -104 -111 -174 -177 -179 -171 -18 17 -74 9 -101 -14
-36 -30 -38 -86 -6 -121 28 -30 60 -37 99 -20 38 16 55 47 50 90 -4 32 9 47
254 309 l258 274 93 3 92 3 3 96 3 97 71 78 c39 44 116 126 169 182 l98 104 3
-49 c3 -41 6 -48 26 -51 21 -3 22 0 22 52 0 51 -2 56 -22 56 -23 1 -23 1 -3
18 11 9 42 43 70 76 l50 59 7 -39 c4 -22 10 -49 13 -61 4 -16 1 -23 -9 -23
-23 0 -46 -41 -46 -81 0 -29 7 -43 31 -63 39 -33 69 -33 108 0 24 20 31 34 31
63 0 44 -21 76 -53 85 -20 5 -25 15 -36 76 -15 84 -8 100 49 100 30 0 44 6 64
31 30 35 32 58 11 98 -29 58 -120 59 -149 2 -18 -33 -15 -43 -70 222 l-45 218
50 79 c28 44 48 84 45 89 -3 5 -26 22 -51 38 -40 25 -45 32 -45 66 0 33 -3 37
-24 37 -17 0 -26 -6 -28 -21 -2 -12 -39 156 -84 372 -80 388 -81 394 -62 418
33 43 21 103 -27 129 -11 6 -14 12 -7 12 6 0 12 9 12 20 0 17 -7 20 -48 20
-39 0 -53 5 -72 25 -33 35 -91 35 -127 -1 l-26 -26 -380 0 -380 0 -66 66 -66
66 -66 -66 -67 -66 -303 0 c-167 0 -328 1 -357 1 l-53 1 31 38 c30 37 33 39
80 34 43 -4 51 -1 74 23 55 59 16 144 -66 145 -51 0 -93 -48 -84 -99 5 -30 0
-41 -40 -88 -50 -58 -78 -67 -106 -33 -25 29 -65 35 -104 17 -19 -9 -34 -21
-34 -27 0 -5 -7 -10 -15 -10 -8 0 -15 -9 -15 -20 0 -11 5 -20 10 -20 6 0 10
-8 10 -17 1 -26 23 -51 57 -65 l31 -13 -143 -161 -143 -162 -98 -7 -97 -7 6
-97 7 -96 -123 -138 c-109 -124 -122 -136 -125 -113 -3 20 -9 26 -28 26 -23 0
-24 -3 -24 -56 l0 -56 -113 -129 c-99 -113 -116 -128 -144 -129 -47 0 -93 -43
-93 -87 0 -40 45 -93 80 -93 66 0 111 65 86 124 l-14 33 99 112 98 111 3 -37
c2 -30 7 -38 23 -38 17 0 20 8 23 53 2 34 -1 52 -8 52 -13 0 36 61 124 155
l57 60 -45 -90 c-43 -89 -115 -284 -117 -321 -1 -10 -5 -1 -8 21 -5 32 -11 41
-28 43 -22 3 -23 0 -23 -52 0 -51 2 -56 22 -56 17 0 8 -14 -50 -72 l-72 -73
50 -50 c28 -28 50 -56 50 -63 0 -7 8 -15 17 -19 10 -3 26 -13 36 -21 16 -15
22 -11 80 46 l62 61 125 -31 c69 -17 128 -34 133 -38 4 -3 -22 -40 -58 -80
-57 -66 -69 -74 -102 -76 -75 -2 -111 -94 -57 -148 68 -67 182 15 138 99 -14
27 -12 30 33 82 27 30 59 68 73 85 25 29 27 29 73 18 26 -7 44 -17 41 -22 -7
-11 144 -168 161 -168 6 0 46 36 90 80 l79 80 -58 59 c-56 57 -58 61 -52 98
12 65 57 205 82 255 l24 48 85 0 c46 0 86 3 88 8 2 4 0 52 -4 107 l-6 100 31
28 c49 43 178 104 263 124 104 24 321 24 413 0 112 -29 226 -93 305 -172 65
-64 145 -177 145 -204 0 -6 -20 -52 -45 -101 -25 -49 -45 -91 -45 -93 0 -2 37
-21 81 -42 l81 -40 -5 -75 c-8 -90 -27 -169 -67 -270 -54 -135 -108 -211 -283
-398 l-167 -179 -61 -7 c-34 -3 -86 -6 -115 -6 l-54 0 0 -89 0 -90 -135 -96
c-74 -52 -395 -268 -714 -479 l-579 -384 -40 42 c-22 22 -42 52 -44 66 -2 17
-9 25 -23 25 -17 0 -21 -8 -23 -45 -3 -40 -10 -52 -65 -107 l-61 -63 62 -63
c37 -37 62 -71 62 -84 0 -12 6 -23 13 -26 10 -4 10 -7 0 -18 -15 -15 -17 -109
-3 -109 6 0 10 -7 10 -15 0 -8 -4 -15 -10 -15 -5 0 -10 -25 -10 -55 0 -30 5
-55 10 -55 6 0 10 -7 10 -15 0 -8 -5 -15 -11 -15 -6 0 -9 -23 -8 -60 l3 -61
-64 -64 -64 -65 79 -80 c44 -44 84 -80 90 -80 6 0 33 23 60 50 45 46 53 50 97
50 36 0 48 4 48 15 0 8 5 15 10 15 6 0 10 -7 10 -15 0 -12 13 -15 55 -15 42 0
55 3 55 15 0 8 7 15 15 15 8 0 15 -7 15 -15 0 -12 13 -15 55 -15 42 0 55 3 55
15 0 8 7 15 15 15 8 0 15 -7 15 -15 0 -12 13 -15 55 -15 42 0 55 3 55 15 0 8
5 15 10 15 6 0 10 -7 10 -15 0 -12 13 -15 55 -15 42 0 55 3 55 15 0 8 7 15 15
15 8 0 15 -7 15 -15 0 -12 13 -15 55 -15 42 0 55 3 55 15 0 8 7 15 15 15 8 0
15 -7 15 -15 0 -12 13 -15 55 -15 42 0 55 3 55 15 0 8 5 15 10 15 6 0 10 -7
10 -15 0 -12 13 -15 55 -15 42 0 55 3 55 15 0 8 7 15 15 15 8 0 15 -7 15 -15
0 -12 13 -15 55 -15 42 0 55 3 55 15 0 8 5 15 10 15 6 0 10 -7 10 -15 0 -12
13 -15 60 -15 47 0 60 3 60 15 0 8 5 15 10 15 6 0 10 -7 10 -15 0 -12 13 -15
55 -15 42 0 55 3 55 15 0 8 7 15 15 15 8 0 15 -7 15 -15 0 -12 13 -15 55 -15
42 0 55 3 55 15 0 8 5 15 10 15 6 0 10 -7 10 -15 0 -12 13 -15 55 -15 42 0 55
3 55 15 0 8 7 15 15 15 8 0 15 -7 15 -15 0 -12 13 -15 55 -15 42 0 55 3 55 15
0 8 7 15 15 15 8 0 15 -7 15 -15 0 -12 13 -15 55 -15 42 0 55 3 55 15 0 8 5
15 10 15 6 0 10 -7 10 -15 0 -12 13 -15 55 -15 42 0 55 3 55 15 0 8 7 15 15
15 8 0 15 -7 15 -15 0 -12 13 -15 55 -15 42 0 55 3 55 15 0 8 7 15 15 15 8 0
15 -7 15 -15 0 -12 13 -15 55 -15 42 0 55 3 55 15 0 8 5 15 10 15 6 0 10 -7
10 -15 0 -12 13 -15 55 -15 42 0 55 3 55 15 0 8 7 15 15 15 8 0 15 -7 15 -15
0 -12 13 -15 55 -15 42 0 55 3 55 15 0 8 7 15 15 15 8 0 15 -7 15 -15 0 -11
13 -15 54 -15 30 0 56 5 58 10 2 6 34 -21 73 -60 l69 -70 43 42 c24 23 43 37
43 30 0 -7 -4 -12 -10 -12 -15 0 -13 -107 3 -114 10 -5 10 -7 0 -12 -8 -3 -13
-26 -13 -59 0 -33 5 -56 13 -59 10 -5 9 -7 -1 -12 -15 -7 -17 -114 -2 -114 6
0 10 -7 10 -15 0 -8 -4 -15 -10 -15 -5 0 -10 -22 -10 -50 0 -27 5 -50 10 -50
6 0 10 -7 10 -15 0 -8 -4 -15 -10 -15 -5 0 -10 -22 -10 -50 0 -27 5 -50 10
-50 6 0 10 -7 10 -15 0 -8 -4 -15 -10 -15 -15 0 -13 -107 3 -114 10 -5 9 -7
-1 -12 -16 -8 -16 -110 1 -118 10 -5 10 -7 0 -12 -17 -8 -17 -110 0 -118 10
-5 9 -7 -1 -12 -16 -8 -16 -111 1 -117 10 -4 10 -7 0 -18 -15 -15 -17 -109 -3
-109 6 0 10 -7 10 -15 0 -8 -4 -15 -10 -15 -5 0 -10 -22 -10 -50 0 -27 5 -50
10 -50 6 0 10 -7 10 -15 0 -8 -4 -15 -10 -15 -14 0 -12 -94 3 -109 10 -11 10
-14 0 -18 -8 -3 -13 -24 -13 -58 0 -33 5 -56 13 -59 10 -5 10 -7 0 -12 -8 -3
-13 -26 -13 -59 0 -33 5 -56 13 -59 10 -5 9 -7 -1 -12 -7 -3 -12 -24 -12 -47
0 -38 -6 -48 -70 -112 l-70 -70 85 -85 85 -84 40 39 c37 36 45 39 98 40 51 0
57 2 60 23 3 19 -1 22 -35 24 -21 1 243 5 587 8 400 3 630 2 639 -4 7 -6 17
-20 22 -33 5 -13 14 -23 22 -23 7 0 31 -18 52 -40 l39 -40 -2463 0 c-1912 0
-2473 3 -2505 12 -54 16 -128 90 -144 144 -18 60 -18 6588 0 6648 15 50 89
127 138 143 53 17 6597 18 6654 1z m-5109 -364 c-230 -36 -452 -120 -610 -233
-60 -42 -54 -34 88 127 l109 122 251 -1 252 -1 -90 -14z m1365 2 c0 -7 11 -25
25 -41 22 -23 32 -26 70 -23 43 3 45 2 45 -24 0 -30 50 -78 81 -78 10 0 19 -2
19 -4 0 -2 29 -145 65 -318 36 -172 67 -324 69 -338 3 -14 -10 8 -29 48 -185
390 -571 679 -1017 762 -37 7 -65 16 -62 21 3 5 168 9 370 9 299 0 364 -2 364
-14z m535 -1601 l40 -195 -43 -42 c-31 -32 -42 -38 -42 -25 0 13 -6 17 -22 15
-19 -2 -24 -11 -28 -49 -4 -40 -14 -55 -79 -125 l-73 -79 35 71 c39 77 100
247 111 307 6 31 11 37 31 37 24 0 25 3 25 55 0 42 -3 55 -15 55 -8 0 -15 7
-15 15 0 8 7 15 15 15 11 0 15 13 15 54 0 33 -5 56 -12 58 -12 4 -3 28 11 28
4 0 25 -88 46 -195z m80 -145 c3 -5 1 -10 -4 -10 -6 0 -11 5 -11 10 0 6 2 10
4 10 3 0 8 -4 11 -10z m1335 -1505 l74 -75 62 61 62 61 38 -12 c282 -92 517
-357 639 -722 37 -112 72 -293 76 -396 l3 -63 -74 -74 -74 -75 72 -73 73 -73
-11 -90 c-15 -127 -57 -294 -99 -400 -51 -125 -121 -234 -215 -332 -137 -143
-261 -223 -424 -277 l-84 -28 -69 69 -69 69 -83 -83 -82 -82 -185 0 -184 0
-63 62 -63 62 0 1205 0 1205 67 68 67 68 236 0 236 0 74 -75z m-1420 -425 c0
-5 -4 -10 -10 -10 -5 0 -10 -25 -10 -55 0 -30 5 -55 10 -55 6 0 10 -7 10 -15
0 -8 -4 -15 -10 -15 -5 0 -10 -22 -10 -50 0 -27 5 -50 10 -50 6 0 10 -7 10
-15 0 -8 -4 -15 -10 -15 -5 0 -10 -22 -10 -50 0 -27 5 -50 10 -50 6 0 10 -7
10 -15 0 -8 -4 -15 -10 -15 -5 0 -10 -9 -10 -21 0 -11 -4 -17 -10 -14 -5 3
-10 24 -10 46 0 26 -5 42 -15 45 -8 4 -15 10 -15 15 0 5 7 9 15 9 12 0 15 13
15 55 0 42 -3 55 -15 55 -8 0 -15 7 -15 15 0 8 7 15 15 15 12 0 15 13 15 55 0
42 -3 55 -15 55 -8 0 -15 4 -15 9 0 5 7 11 15 15 8 3 15 14 15 24 0 18 18 42
32 42 4 0 8 -4 8 -10z"/>
<path d="M413 6645 c-20 -22 -16 -25 32 -25 38 0 45 3 45 20 0 16 -7 20 -32
20 -18 -1 -39 -7 -45 -15z"/>
<path d="M510 6640 c0 -18 7 -20 55 -20 48 0 55 2 55 20 0 18 -7 20 -55 20
-48 0 -55 -2 -55 -20z"/>
<path d="M650 6640 c0 -18 7 -20 55 -20 48 0 55 2 55 20 0 18 -7 20 -55 20
-48 0 -55 -2 -55 -20z"/>
<path d="M790 6640 c0 -18 7 -20 55 -20 48 0 55 2 55 20 0 18 -7 20 -55 20
-48 0 -55 -2 -55 -20z"/>
<path d="M920 6640 c0 -18 7 -20 55 -20 48 0 55 2 55 20 0 18 -7 20 -55 20
-48 0 -55 -2 -55 -20z"/>
<path d="M3380 6640 c0 -18 7 -20 55 -20 48 0 55 2 55 20 0 18 -7 20 -55 20
-48 0 -55 -2 -55 -20z"/>
<path d="M3520 6610 c0 -47 2 -50 25 -50 23 0 25 3 25 50 0 47 -2 50 -25 50
-23 0 -25 -3 -25 -50z"/>
<path d="M400 6536 c0 -53 1 -56 26 -56 24 0 25 2 22 53 -3 45 -6 52 -25 55
-22 3 -23 0 -23 -52z"/>
<path d="M3522 6478 c3 -46 6 -53 26 -56 21 -3 22 0 22 52 0 53 -1 56 -26 56
-24 0 -25 -2 -22 -52z"/>
<path d="M400 6394 c0 -52 1 -55 23 -52 19 3 22 10 25 56 3 50 2 52 -22 52
-25 0 -26 -3 -26 -56z"/>
<path d="M3527 6394 c-4 -4 -7 -29 -7 -56 0 -45 2 -48 26 -48 24 0 25 2 22 52
-2 38 -7 54 -18 56 -9 1 -19 0 -23 -4z"/>
<path d="M407 6314 c-4 -4 -7 -29 -7 -56 0 -45 2 -48 26 -48 24 0 25 2 22 52
-2 38 -7 54 -18 56 -9 1 -19 0 -23 -4z"/>
<path d="M3527 6253 c-4 -3 -7 -28 -7 -55 0 -45 2 -48 25 -48 24 0 25 3 25 55
0 47 -3 55 -18 55 -10 0 -22 -3 -25 -7z"/>
<path d="M400 6125 c0 -53 1 -56 23 -53 19 3 22 9 22 53 0 44 -3 50 -22 53
-22 3 -23 0 -23 -53z"/>
<path d="M3522 6068 c3 -46 6 -53 26 -56 21 -3 22 0 22 52 0 53 -1 56 -26 56
-24 0 -25 -2 -22 -52z"/>
<path d="M402 5988 c3 -45 6 -53 23 -53 17 0 20 8 23 53 3 50 2 52 -23 52 -25
0 -26 -2 -23 -52z"/>
<path d="M3527 5984 c-4 -4 -7 -29 -7 -56 0 -45 2 -48 26 -48 24 0 25 2 22 52
-2 38 -7 54 -18 56 -9 1 -19 0 -23 -4z"/>
<path d="M400 5856 c0 -53 1 -56 26 -56 24 0 25 2 22 53 -3 45 -6 52 -25 55
-22 3 -23 0 -23 -52z"/>
<path d="M3520 5795 c0 -52 1 -55 25 -55 24 0 25 3 25 55 0 52 -1 55 -25 55
-24 0 -25 -3 -25 -55z"/>
<path d="M400 5036 c0 -53 1 -56 26 -56 24 0 25 2 22 53 -3 45 -6 52 -25 55
-22 3 -23 0 -23 -52z"/>
<path d="M400 4894 c0 -52 1 -55 23 -52 19 3 22 10 25 56 3 50 2 52 -22 52
-25 0 -26 -3 -26 -56z"/>
<path d="M407 4814 c-4 -4 -7 -29 -7 -56 0 -45 2 -48 26 -48 24 0 25 2 22 52
-2 38 -7 54 -18 56 -9 1 -19 0 -23 -4z"/>
<path d="M400 4626 c0 -53 1 -56 26 -56 24 0 25 2 22 53 -3 45 -6 52 -25 55
-22 3 -23 0 -23 -52z"/>
<path d="M400 4484 c0 -52 1 -55 23 -52 19 3 22 10 25 56 3 50 2 52 -22 52
-25 0 -26 -3 -26 -56z"/>
<path d="M3527 4484 c-4 -4 -7 -29 -7 -56 0 -45 2 -48 26 -48 24 0 25 2 22 52
-2 38 -7 54 -18 56 -9 1 -19 0 -23 -4z"/>
<path d="M407 4404 c-4 -4 -7 -29 -7 -56 0 -45 2 -48 26 -48 24 0 25 2 22 52
-2 38 -7 54 -18 56 -9 1 -19 0 -23 -4z"/>
<path d="M3527 4343 c-4 -3 -7 -28 -7 -55 0 -45 2 -48 25 -48 24 0 25 3 25 55
0 47 -3 55 -18 55 -10 0 -22 -3 -25 -7z"/>
<path d="M400 4215 c0 -53 1 -56 23 -53 19 3 22 9 22 53 0 44 -3 50 -22 53
-22 3 -23 0 -23 -53z"/>
<path d="M3522 4158 c3 -46 6 -53 26 -56 21 -3 22 0 22 52 0 53 -1 56 -26 56
-24 0 -25 -2 -22 -52z"/>
<path d="M402 4078 c3 -45 6 -53 23 -53 17 0 20 8 23 53 3 50 2 52 -23 52 -25
0 -26 -2 -23 -52z"/>
<path d="M3830 4040 c0 -17 7 -20 50 -20 43 0 50 3 50 20 0 17 -7 20 -50 20
-43 0 -50 -3 -50 -20z"/>
<path d="M3960 4040 c0 -17 7 -20 50 -20 43 0 50 3 50 20 0 17 -7 20 -50 20
-43 0 -50 -3 -50 -20z"/>
<path d="M4090 4039 c0 -18 5 -20 52 -17 41 2 54 7 56 21 3 14 -5 17 -52 17
-50 0 -56 -2 -56 -21z"/>
<path d="M4220 4040 c0 -18 7 -20 55 -20 48 0 55 2 55 20 0 18 -7 20 -55 20
-48 0 -55 -2 -55 -20z"/>
<path d="M4350 4040 c0 -18 7 -20 55 -20 48 0 55 2 55 20 0 18 -7 20 -55 20
-48 0 -55 -2 -55 -20z"/>
<path d="M4480 4040 c0 -18 7 -20 55 -20 48 0 55 2 55 20 0 18 -7 20 -55 20
-48 0 -55 -2 -55 -20z"/>
<path d="M4615 4050 c-12 -20 7 -30 56 -30 42 0 49 3 49 20 0 17 -7 20 -49 20
-28 0 -53 -4 -56 -10z"/>
<path d="M4750 4040 c0 -17 7 -20 50 -20 43 0 50 3 50 20 0 17 -7 20 -50 20
-43 0 -50 -3 -50 -20z"/>
<path d="M4880 4040 c0 -17 7 -20 50 -20 43 0 50 3 50 20 0 17 -7 20 -50 20
-43 0 -50 -3 -50 -20z"/>
<path d="M5400 4040 c0 -18 7 -20 55 -20 48 0 55 2 55 20 0 18 -7 20 -55 20
-48 0 -55 -2 -55 -20z"/>
<path d="M5540 4040 c0 -17 7 -20 50 -20 43 0 50 3 50 20 0 17 -7 20 -50 20
-43 0 -50 -3 -50 -20z"/>
<path d="M5670 4040 c0 -17 7 -20 50 -20 43 0 50 3 50 20 0 17 -7 20 -50 20
-43 0 -50 -3 -50 -20z"/>
<path d="M5800 4039 c0 -18 5 -20 52 -17 41 2 54 7 56 21 3 14 -5 17 -52 17
-50 0 -56 -2 -56 -21z"/>
<path d="M5930 4040 c0 -18 7 -20 55 -20 48 0 55 2 55 20 0 18 -7 20 -55 20
-48 0 -55 -2 -55 -20z"/>
<path d="M6322 4043 c2 -14 15 -19 56 -21 47 -3 52 -1 52 17 0 19 -6 21 -56
21 -47 0 -55 -3 -52 -17z"/>
<path d="M6460 4040 c0 -17 7 -20 50 -20 43 0 50 3 50 20 0 17 -7 20 -50 20
-43 0 -50 -3 -50 -20z"/>
<path d="M6590 4040 c0 -17 7 -20 50 -20 43 0 50 3 50 20 0 17 -7 20 -50 20
-43 0 -50 -3 -50 -20z"/>
<path d="M6720 4040 c0 -13 7 -20 19 -20 10 0 33 -3 50 -6 28 -6 31 -4 31 20
0 25 -3 26 -50 26 -43 0 -50 -3 -50 -20z"/>
<path d="M400 3946 c0 -53 1 -56 26 -56 24 0 25 2 22 53 -3 45 -6 52 -25 55
-22 3 -23 0 -23 -52z"/>
<path d="M6780 3935 c0 -48 2 -55 20 -55 18 0 20 7 20 55 0 48 -2 55 -20 55
-18 0 -20 -7 -20 -55z"/>
<path d="M400 3804 c0 -52 1 -55 23 -52 19 3 22 10 25 56 3 50 2 52 -22 52
-25 0 -26 -3 -26 -56z"/>
<path d="M6780 3806 c0 -50 2 -56 21 -56 18 0 20 5 17 52 -2 41 -7 54 -20 56
-15 3 -18 -5 -18 -52z"/>
<path d="M3522 3748 c3 -45 6 -53 23 -53 17 0 20 8 23 53 3 50 2 52 -23 52
-25 0 -26 -2 -23 -52z"/>
<path d="M402 3668 c3 -45 6 -53 23 -53 17 0 20 8 23 53 3 50 2 52 -23 52 -25
0 -26 -2 -23 -52z"/>
<path d="M6780 3670 c0 -43 3 -50 20 -50 17 0 20 7 20 50 0 43 -3 50 -20 50
-17 0 -20 -7 -20 -50z"/>
<path d="M3527 3664 c-4 -4 -7 -29 -7 -56 0 -45 2 -48 26 -48 24 0 25 2 22 52
-2 38 -7 54 -18 56 -9 1 -19 0 -23 -4z"/>
<path d="M400 3536 c0 -53 1 -56 26 -56 24 0 25 2 22 53 -3 45 -6 52 -25 55
-22 3 -23 0 -23 -52z"/>
<path d="M6780 3540 c0 -43 3 -50 20 -50 17 0 20 7 20 50 0 43 -3 50 -20 50
-17 0 -20 -7 -20 -50z"/>
<path d="M3520 3475 c0 -52 1 -55 25 -55 24 0 25 3 25 55 0 52 -1 55 -25 55
-24 0 -25 -3 -25 -55z"/>
<path d="M6780 3404 c0 -47 3 -55 18 -52 13 2 18 15 20 56 3 47 1 52 -17 52
-19 0 -21 -6 -21 -56z"/>
<path d="M400 3394 c0 -52 1 -55 23 -52 19 3 22 10 25 56 3 50 2 52 -22 52
-25 0 -26 -3 -26 -56z"/>
<path d="M3522 3338 c3 -45 6 -53 23 -53 17 0 20 8 23 53 3 50 2 52 -23 52
-25 0 -26 -2 -23 -52z"/>
<path d="M6780 3275 c0 -48 2 -55 20 -55 18 0 20 7 20 55 0 48 -2 55 -20 55
-18 0 -20 -7 -20 -55z"/>
<path d="M6780 904 c0 -47 3 -55 18 -52 13 2 18 15 20 56 3 47 1 52 -17 52
-19 0 -21 -6 -21 -56z"/>
<path d="M6780 774 c0 -47 3 -55 18 -52 13 2 18 15 20 56 3 47 1 52 -17 52
-19 0 -21 -6 -21 -56z"/>
<path d="M6780 645 c0 -48 2 -55 20 -55 18 0 20 7 20 55 0 48 -2 55 -20 55
-18 0 -20 -7 -20 -55z"/>
<path d="M6780 515 c0 -48 2 -55 20 -55 18 0 20 7 20 55 0 48 -2 55 -20 55
-18 0 -20 -7 -20 -55z"/>
<path d="M6780 386 c0 -50 2 -56 21 -56 18 0 20 5 17 52 -2 41 -7 54 -20 56
-15 3 -18 -5 -18 -52z"/>
<path d="M6780 250 c0 -43 3 -50 20 -50 17 0 20 7 20 50 0 43 -3 50 -20 50
-17 0 -20 -7 -20 -50z"/>
<path d="M6780 160 c0 -5 -9 -10 -21 -10 -15 0 -20 -5 -17 -22 2 -19 9 -23 38
-23 32 0 35 3 38 33 3 27 0 32 -17 32 -12 0 -21 -4 -21 -10z"/>
<path d="M3843 134 c-9 -24 11 -36 58 -32 37 2 45 7 47 26 3 20 0 22 -48 22
-37 0 -52 -4 -57 -16z"/>
<path d="M3973 134 c-9 -24 11 -36 58 -32 37 2 45 7 47 26 3 20 0 22 -48 22
-37 0 -52 -4 -57 -16z"/>
<path d="M4110 125 c0 -23 3 -25 50 -25 47 0 50 2 50 25 0 23 -3 25 -50 25
-47 0 -50 -2 -50 -25z"/>
<path d="M4242 128 c3 -21 8 -23 53 -23 43 0 50 3 50 20 0 17 -8 20 -53 23
-51 3 -53 2 -50 -20z"/>
<path d="M4372 128 c3 -21 8 -23 53 -23 43 0 50 3 50 20 0 17 -8 20 -53 23
-51 3 -53 2 -50 -20z"/>
<path d="M4502 128 c3 -21 8 -23 53 -23 43 0 50 3 50 20 0 17 -8 20 -53 23
-51 3 -53 2 -50 -20z"/>
<path d="M4633 134 c-9 -24 11 -36 58 -32 37 2 45 7 47 26 3 20 0 22 -48 22
-37 0 -52 -4 -57 -16z"/>
<path d="M4763 134 c-9 -24 11 -36 58 -32 37 2 45 7 47 26 3 20 0 22 -48 22
-37 0 -52 -4 -57 -16z"/>
<path d="M4900 124 c0 -24 2 -25 48 -22 40 3 47 6 50 26 3 20 0 22 -47 22 -48
0 -51 -2 -51 -26z"/>
<path d="M5292 128 c3 -21 8 -23 53 -23 43 0 50 3 50 20 0 17 -8 20 -53 23
-51 3 -53 2 -50 -20z"/>
<path d="M5424 135 c-10 -25 9 -37 57 -33 36 2 44 7 44 23 0 17 -8 20 -48 23
-36 2 -49 -1 -53 -13z"/>
<path d="M5553 134 c-9 -24 11 -36 58 -32 37 2 45 7 47 26 3 20 0 22 -48 22
-37 0 -52 -4 -57 -16z"/>
<path d="M5683 134 c-9 -24 11 -36 58 -32 37 2 45 7 47 26 3 20 0 22 -48 22
-37 0 -52 -4 -57 -16z"/>
<path d="M5820 124 c0 -24 2 -25 48 -22 40 3 47 6 50 26 3 20 0 22 -47 22 -48
0 -51 -2 -51 -26z"/>
<path d="M5952 128 c3 -20 10 -23 51 -26 45 -3 47 -2 47 22 0 24 -3 26 -51 26
-47 0 -50 -2 -47 -22z"/>
<path d="M6343 134 c-9 -24 11 -36 58 -32 37 2 45 7 47 26 3 20 0 22 -48 22
-37 0 -52 -4 -57 -16z"/>
<path d="M6473 134 c-9 -24 11 -36 58 -32 37 2 45 7 47 26 3 20 0 22 -48 22
-37 0 -52 -4 -57 -16z"/>
<path d="M6610 124 c0 -24 2 -25 48 -22 40 3 47 6 50 26 3 20 0 22 -47 22 -48
0 -51 -2 -51 -26z"/>
<path d="M3524 4887 c-3 -8 -4 -34 -2 -58 2 -36 7 -44 23 -44 18 0 20 7 20 55
0 44 -3 55 -18 58 -9 2 -20 -3 -23 -11z"/>
</g>
</svg>

До

Ширина:  |  Высота:  |  Размер: 19 KiB

Двоичные данные
docs/assets/img/glyphicons-halflings-white.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 8.6 KiB

Двоичные данные
docs/assets/img/glyphicons-halflings.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 12 KiB

Просмотреть файл

@ -1,317 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="224.1651mm"
height="224.1651mm"
viewBox="0 0 794.28579 794.28578"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="icon.svg"
inkscape:export-filename="C:\Source\SixLabors.Fonts\icons\icon.png"
inkscape:export-xdpi="14.503596"
inkscape:export-ydpi="14.503596">
<title
id="title4355">logo.svg</title>
<defs
id="defs4">
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Drop Shadow"
id="filter6525">
<feFlood
flood-opacity="0.498039"
flood-color="rgb(0,0,0)"
result="flood"
id="feFlood6527" />
<feComposite
in="flood"
in2="SourceGraphic"
operator="in"
result="composite1"
id="feComposite6529" />
<feGaussianBlur
in="composite1"
stdDeviation="5"
result="blur"
id="feGaussianBlur6531" />
<feOffset
dx="0"
dy="0"
result="offset"
id="feOffset6533" />
<feComposite
in="SourceGraphic"
in2="offset"
operator="over"
result="composite2"
id="feComposite6535" />
</filter>
<filter
inkscape:label="Inset"
inkscape:menu="Shadows and Glows"
inkscape:menu-tooltip="Shadowy outer bevel"
style="color-interpolation-filters:sRGB"
id="filter4317">
<feMorphology
result="result1"
in="SourceAlpha"
operator="dilate"
radius="3.6"
id="feMorphology4319" />
<feGaussianBlur
stdDeviation="3.6"
in="result1"
result="result0"
id="feGaussianBlur4321" />
<feDiffuseLighting
surfaceScale="-5"
id="feDiffuseLighting4323">
<feDistantLight
elevation="45"
azimuth="225"
id="feDistantLight4325" />
</feDiffuseLighting>
<feComposite
in2="result0"
operator="in"
result="result91"
id="feComposite4327" />
<feComposite
in="SourceGraphic"
in2="result91"
id="feComposite4329" />
</filter>
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Drop Shadow"
id="filter4331">
<feFlood
flood-opacity="0.498039"
flood-color="rgb(0,0,0)"
result="flood"
id="feFlood4333" />
<feComposite
in="flood"
in2="SourceGraphic"
operator="in"
result="composite1"
id="feComposite4335" />
<feGaussianBlur
in="composite1"
stdDeviation="5"
result="blur"
id="feGaussianBlur4337" />
<feOffset
dx="0"
dy="0"
result="offset"
id="feOffset4339" />
<feComposite
in="SourceGraphic"
in2="offset"
operator="over"
result="composite2"
id="feComposite4341" />
</filter>
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Drop Shadow"
id="filter4331-9">
<feFlood
flood-opacity="0.498039"
flood-color="rgb(0,0,0)"
result="flood"
id="feFlood4333-7" />
<feComposite
in="flood"
in2="SourceGraphic"
operator="in"
result="composite1"
id="feComposite4335-9" />
<feGaussianBlur
in="composite1"
stdDeviation="5"
result="blur"
id="feGaussianBlur4337-6" />
<feOffset
dx="0"
dy="0"
result="offset"
id="feOffset4339-9" />
<feComposite
in="SourceGraphic"
in2="offset"
operator="over"
result="composite2"
id="feComposite4341-9" />
</filter>
<filter
inkscape:label="Inset"
inkscape:menu="Shadows and Glows"
inkscape:menu-tooltip="Shadowy outer bevel"
style="color-interpolation-filters:sRGB"
id="filter4317-0">
<feMorphology
result="result1"
in="SourceAlpha"
operator="dilate"
radius="3.6"
id="feMorphology4319-1" />
<feGaussianBlur
stdDeviation="3.6"
in="result1"
result="result0"
id="feGaussianBlur4321-9" />
<feDiffuseLighting
surfaceScale="-5"
id="feDiffuseLighting4323-0">
<feDistantLight
elevation="45"
azimuth="225"
id="feDistantLight4325-1" />
</feDiffuseLighting>
<feComposite
in2="result0"
operator="in"
result="result91"
id="feComposite4327-1" />
<feComposite
in="SourceGraphic"
in2="result91"
id="feComposite4329-4" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35"
inkscape:cx="-74.351985"
inkscape:cy="872.05831"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-center="true"
inkscape:snap-object-midpoints="true" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>logo.svg</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(25.095642,-129.03821)">
<path
style="opacity:1;fill:#ffd42a;fill-opacity:1;stroke-width:12.48351002;stroke-miterlimit:4;stroke-dasharray:none"
d="M 228.7026,163.94011 478.42063,308.11495 353.56157,380.20231 228.7026,452.28969 Z"
id="path4138-4-42-3-7-2-4-1-1-0-1"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="opacity:1;fill:#800080;fill-opacity:1;stroke-width:12.48351002;stroke-miterlimit:4;stroke-dasharray:none"
d="M 515.44487,900.62588 265.72694,756.45114 515.44495,612.2764 Z"
id="path4138-4-4-04-1-5-5-4-8-4-0-2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
style="opacity:1;fill:#d40000;fill-opacity:1;stroke-width:12.48351002;stroke-miterlimit:4;stroke-dasharray:none"
d="m 764.3404,594.60454 -249.71787,144.17474 -5e-5,-144.17464 0,-144.17476 z"
id="path4138-4-0-6-1-5-9-2-8"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="opacity:1;fill:#ff6600;fill-opacity:1;stroke-width:12.48351002;stroke-miterlimit:4;stroke-dasharray:none"
d="m 621.54012,223.63736 0,288.34938 -124.85894,-72.08726 -124.85904,-72.08735 z"
id="path4138-4-42-7-1-8-5-8-8-4"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="opacity:1;fill:#88aa00;fill-opacity:1;stroke-width:12.48351002;stroke-miterlimit:4;stroke-dasharray:none"
d="M -19.874234,468.81935 229.84379,324.6446 l 0,144.17475 0,144.17474 z"
id="path4138-4-4-4-1-4-9-0-2-6"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="opacity:1;fill:#000080;fill-opacity:1;stroke-width:12.48351002;stroke-miterlimit:4;stroke-dasharray:none"
d="m 122.22973,839.69293 0,-288.3496 124.8589,72.08748 124.85897,72.08736 -124.8589,72.08737 z"
id="path4138-4-4-04-6-7-6-0-8-1-5"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc" />
<g
id="g4314"
transform="matrix(-0.21879989,0.37897254,-0.37897254,-0.21879989,-244.80122,1390.7319)">
<path
sodipodi:nodetypes="cccccc"
inkscape:connector-curvature="0"
id="path4138-4-42-3-7-2-4-1-1-0-1-3-5"
d="m -2405.4054,-614.67631 324.4085,187.29744 -162.2042,93.64865 -162.2043,93.64866 -131.2183,-225.02695 z"
style="opacity:1;fill:#ffd42a;fill-opacity:1;stroke-width:12.48351002;stroke-miterlimit:4;stroke-dasharray:none" />
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path4138-4-4-04-1-5-5-4-8-4-0-2-8-3"
d="m -2404.7567,135.61002 -324.4084,-187.297333 324.4085,-187.297317 z"
style="opacity:1;fill:#800080;fill-opacity:1;stroke-width:12.48351002;stroke-miterlimit:4;stroke-dasharray:none" />
<path
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="path4138-4-0-6-1-5-9-2-8-4-7"
d="m -2080.3771,-51.711273 -324.4083,187.297293 -10e-5,-187.297163 0,-187.297307 z"
style="opacity:1;fill:#d40000;fill-opacity:1;stroke-width:12.48351002;stroke-miterlimit:4;stroke-dasharray:none" />
<path
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="path4138-4-42-7-1-8-5-8-8-4-3-0"
d="m -2080.9937,-427.37825 0,374.594487 -162.2041,-93.648527 -162.2043,-93.64865 z"
style="opacity:1;fill:#ff6600;fill-opacity:1;stroke-width:12.48351002;stroke-miterlimit:4;stroke-dasharray:none" />
<path
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="path4138-4-4-4-1-4-9-0-2-6-5-4"
d="m -2729.8142,-427.37689 324.4085,-187.29731 0,187.29731 0,187.29731 z"
style="opacity:1;fill:#88aa00;fill-opacity:1;stroke-width:12.48351002;stroke-miterlimit:4;stroke-dasharray:none" />
<path
sodipodi:nodetypes="cccccc"
inkscape:connector-curvature="0"
id="path4138-4-4-04-6-7-6-0-8-1-5-3-6"
d="m -2729.1928,-51.708663 0,-374.594747 162.2041,93.64878 162.2043,93.64866 -162.2041,93.64865 z"
style="opacity:1;fill:#000080;fill-opacity:1;stroke-width:12.48351002;stroke-miterlimit:4;stroke-dasharray:none" />
</g>
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:45.68399811;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter4317);color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 365.01001,321.96934 -157.91942,91.17637 0.25346,39.43928 0.24237,143.22475 158.14844,91.13413 157.93055,-91.18304 -0.0401,-12.58909 -0.40244,-121.75971 0.25568,-0.14898 -0.0399,-12.58908 -0.32685,-20.71574 -0.049,-14.52569 -0.18232,-0.10667 -0.005,-0.22235 -157.86607,-91.13413 z m 0.18678,50.49421 112.60138,65.00654 -112.27231,64.81977 -112.70145,-64.94652 112.37238,-64.87979 z m -114.34901,113.8843 114.70031,66.09826 114.30676,-65.99599 0.28016,84.27485 -114.42238,66.06267 -114.72255,-66.10938 -0.1423,-84.33041 z"
id="path4138-4-42-3-7-2-4-1-1-0-1-3-5-8"
inkscape:connector-curvature="0"
transform="matrix(1.1867576,0,0,1.1867576,-63.06402,-69.61051)" />
</g>
</svg>

До

Ширина:  |  Высота:  |  Размер: 12 KiB

2268
docs/assets/js/bootstrap.js поставляемый

Разница между файлами не показана из-за своего большого размера Загрузить разницу

6
docs/assets/js/bootstrap.min.js поставляемый

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1,27 +0,0 @@
---
layout: default
title: Installing SixLabors.Shapes
section: docs/gettingstarted
---
## Installing the library
We have 3 deplyoment tracks you can use when wanting to install SixLabors.Shapes.
### 1. Nightly builds (Bleeding edge)
You can install builds directly from master from our [MyGet package repository](https://www.myget.org/feed/sixlabors/package/nuget/SixLabors.Shapes).
Here you will be able to access our development build with out latest changes, we don't promise these follow SemVer therefore they coul dhave breaking changes or bugs.
### 2. Pre release
If you want something a little less raw they oyu could follow our prereleases on [nuget.org](https://www.nuget.org/packages/SixLabors.Shapes/).
These release go though more manual validation before being release so should be more stable and we try to avoid breaking SemVer with these ones.
### 2. Full release
If you want something more fully baked the [nuget.org](https://www.nuget.org/packages/SixLabors.Shapes/) is the place to go for binaries.
These release go though more manual validation before being released and also go through a prerelease cycle so should be stable and we try to stick to SemVer when it comes to breaking changes.

Просмотреть файл

@ -1,39 +0,0 @@
---
layout: default
title: Welcome
---
<div class="page-header">
<h1>Six Labors - Shapes</h1>
</div>
<p>SixLabors.Shapes is a new cross-platform 2D polygon manipulation library.</p>
<p>Some of the libraries features include;
<ul>
<li>Point in Polygon</li>
<li>Line Intersections</li>
<li>Complex Polygons</li>
<li>Simple polygon clipping</li>
<li>Regular Polygons (triangles, squares, pentagons etc, any number of sides)</li>
<li>Ellipses (and therfore circles)</li>
<li>Shape Builder api - for creating shapes declaratively</li>
<li>Polygons
<ul>
<li>With Linear line segments</li>
<li>With Beziear curve line segments</li>
<li>Mixture of both Linear &amp; beziear segments</li>
</ul>
</li>
<li>Paths
<ul>
<li>With Linear line segments</li>
<li>With Beziear curve line segments</li>
<li>Mixture of both Linear &amp; beziear segments</li>
</ul>
</li>
</ul>
</p>
<h3>Other projects using SixLabors.Shapes</h3>
Check out our <a href='/other-projects.html'>list of projects</a> using SixLabors.Shapes.

Просмотреть файл

@ -1,23 +0,0 @@
---
layout: default
title: Other projects using SixLabors.Shapes
---
## Other projects using SixLabors.Shapes
Here are some other projects making use of the SixLabors.Shapes.
### [ImageSharp](https://github.com/JimBobSquarePants/ImageSharp/)
ImageSharp is a cross platform, fully manged, image manipultion and drawing library.
#### How
ImageSharp uses SixLabors.Shapes for its vector drawing subsystem. Used for drawing lines and shapes onto in memory image canvases.
### [SixLabors.Fonts](https://github.com/SixLabors/Fonts/)
Fonts is an true type/woff compatible font loading library written in c# and targets .netstandard 1.1 making it entirely crossplatform and will run on everything from android phone, to windows desktops, to linxus servers and everything in between.
#### How
SixLabors.Fonts uses SixLabors.Shapes in its sample app to render the glyphs for visual previewing.

Просмотреть файл

@ -1,12 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
<DebugType>portable</DebugType>
<AssemblyName>DrawShapesWithImageSharp</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>DrawShapesWithImageSharp</PackageId>
<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>
@ -15,7 +12,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta0001" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta0003" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0-rc1" />
<PackageReference Include="System.Runtime.Numerics" Version="4.3.0" />
</ItemGroup>

Просмотреть файл

@ -2,6 +2,9 @@
using System.Collections.Generic;
using System.Numerics;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.ImageSharp.Processing.Drawing;
namespace SixLabors.Shapes.DrawShapesWithImageSharp
{
@ -13,11 +16,11 @@ namespace SixLabors.Shapes.DrawShapesWithImageSharp
float scalingFactor = size / 1206;
var center = new Vector2(603);
Vector2 center = new Vector2(603);
// segment whoes cetner of rotation should be
var segmentOffset = new Vector2(301.16968f, 301.16974f);
var segment = new Polygon(new LinearLineSegment(new Vector2(230.54f, 361.0261f), new System.Numerics.Vector2(5.8641942f, 361.46031f)),
Vector2 segmentOffset = new Vector2(301.16968f, 301.16974f);
IPath segment = new Polygon(new LinearLineSegment(new Vector2(230.54f, 361.0261f), new System.Numerics.Vector2(5.8641942f, 361.46031f)),
new CubicBezierLineSegment(new Vector2(5.8641942f, 361.46031f),
new Vector2(-11.715693f, 259.54052f),
new Vector2(24.441609f, 158.17478f),
@ -26,10 +29,10 @@ namespace SixLabors.Shapes.DrawShapesWithImageSharp
//we need to create 6 of theses all rotated about the center point
List<IPath> segments = new List<IPath>();
for (var i = 0; i < 6; i++)
for (int i = 0; i < 6; i++)
{
float angle = i * ((float)Math.PI / 3);
var s = segment.Transform(Matrix3x2.CreateRotation(angle, center));
IPath s = segment.Transform(Matrix3x2.CreateRotation(angle, center));
segments.Add(s);
}
@ -44,21 +47,21 @@ namespace SixLabors.Shapes.DrawShapesWithImageSharp
Matrix3x2 scaler = Matrix3x2.CreateScale(scalingFactor, Vector2.Zero);
var dimensions = (int)Math.Ceiling(size);
using (var img = new Image<Rgba32>(dimensions, dimensions))
int dimensions = (int)Math.Ceiling(size);
using (Image<Rgba32> img = new Image<Rgba32>(dimensions, dimensions))
{
img.Mutate(i => i.Fill(Rgba32.Black));
img.Mutate(i => i.Fill(Rgba32.FromHex("e1e1e1ff"), new EllipsePolygon(center, 600f).Transform(scaler)));
img.Mutate(i => i.Fill(Rgba32.White, new EllipsePolygon(center, 600f - 60).Transform(scaler)));
for (var s = 0; s < 6; s++)
for (int s = 0; s < 6; s++)
{
img.Mutate(i => i.Fill(colors[s], segments[s].Transform(scaler)));
}
img.Mutate(i => i.Fill(new Rgba32(0, 0, 0, 170), new ComplexPolygon(new EllipsePolygon(center, 161f), new EllipsePolygon(center, 61f)).Transform(scaler)));
var fullPath = System.IO.Path.GetFullPath(System.IO.Path.Combine("Output", path));
string fullPath = System.IO.Path.GetFullPath(System.IO.Path.Combine("Output", path));
img.Save(fullPath);
}

Просмотреть файл

@ -1,13 +1,15 @@
using SixLabors.ImageSharp;
using System;
using System.IO;
namespace SixLabors.Shapes.DrawShapesWithImageSharp
{
using SixLabors.Fonts;
using System.Linq;
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.ImageSharp.Processing.Drawing;
namespace SixLabors.Shapes.DrawShapesWithImageSharp
{
public static class Program
{
public static void Main(string[] args)
@ -48,32 +50,32 @@ namespace SixLabors.Shapes.DrawShapesWithImageSharp
private static void DrawText(string text)
{
var fam = SixLabors.Fonts.SystemFonts.Find("Arial");
var font = new Font(fam, 30);
var style = new RendererOptions(font, 72);
var glyphs = SixLabors.Shapes.TextBuilder.GenerateGlyphs(text, style);
FontFamily fam = SixLabors.Fonts.SystemFonts.Find("Arial");
Font font = new Font(fam, 30);
RendererOptions style = new RendererOptions(font, 72);
IPathCollection glyphs = SixLabors.Shapes.TextBuilder.GenerateGlyphs(text, style);
glyphs.SaveImage("Text", text + ".png");
}
private static void DrawText(string text, IPath path)
{
var fam = SixLabors.Fonts.SystemFonts.Find("Arial");
var font = new Font(fam, 30);
var style = new RendererOptions(font, 72)
FontFamily fam = SixLabors.Fonts.SystemFonts.Find("Arial");
Font font = new Font(fam, 30);
RendererOptions style = new RendererOptions(font, 72)
{
WrappingWidth = path.Length,
VerticalAlignment = VerticalAlignment.Top,
HorizontalAlignment = HorizontalAlignment.Center
};
var glyphs = SixLabors.Shapes.TextBuilder.GenerateGlyphs(text, path, style);
IPathCollection glyphs = SixLabors.Shapes.TextBuilder.GenerateGlyphs(text, path, style);
glyphs.SaveImage("Text-Path", text + ".png");
}
private static void DrawFatL()
{
var shape = new Polygon(new LinearLineSegment(new Vector2(8, 8),
Polygon shape = new Polygon(new LinearLineSegment(new Vector2(8, 8),
new Vector2(64, 8),
new Vector2(64, 64),
new Vector2(120, 64),
@ -84,14 +86,14 @@ namespace SixLabors.Shapes.DrawShapesWithImageSharp
private static void DrawSerializedOPenSansLetterShape_a()
{
var path = @"36.57813x49.16406 35.41797x43.67969 35.41797x43.67969 35.13672x43.67969 35.13672x43.67969 34.41629x44.54843 33.69641x45.34412 32.97708x46.06674 32.2583x46.71631 31.54007x47.29282 30.82239x47.79626 30.10526x48.22665 29.38867x48.58398 29.38867x48.58398 28.65012x48.88474 27.86707x49.14539 27.03952x49.36594 26.16748x49.54639 25.25095x49.68674 24.28992x49.78699 23.28439x49.84714 22.23438x49.86719 22.23438x49.86719 21.52775x49.85564 20.84048x49.82104 20.17258x49.76337 19.52405x49.68262 18.28506x49.4519 17.12354x49.12891 16.03946x48.71362 15.03284x48.20605 14.10367x47.6062 13.25195x46.91406 13.25195x46.91406 12.48978x46.13678 11.82922x45.28149 11.27029x44.34821 10.81299x43.33691 10.45731x42.24762 10.20325x41.08032 10.05081x39.83502 10.0127x39.18312 10x38.51172 10x38.51172 10.01823x37.79307 10.07292x37.09613 10.16407x36.42088 10.29169x35.76733 10.6563x34.52533 11.16675x33.37012 11.82304x32.3017 12.62518x31.32007 13.57317x30.42523 14.10185x30.01036 14.66699x29.61719 15.2686x29.24571 15.90666x28.89594 16.58119x28.56786 17.29218x28.26147 18.03962x27.97679 18.82353x27.71381 19.6439x27.47252 20.50073x27.25293 22.32378x26.87885 24.29266x26.59155 26.40739x26.39105 28.66797x26.27734 28.66797x26.27734 35.20703x26.06641 35.20703x26.06641 35.20703x23.67578 35.20703x23.67578 35.17654x22.57907 35.08508x21.55652 34.93265x20.60812 34.71924x19.73389 34.44485x18.93381 34.1095x18.20789 33.71317x17.55612 33.25586x16.97852 33.25586x16.97852 32.73154x16.47177 32.13416x16.03259 31.46371x15.66098 30.72021x15.35693 29.90366x15.12045 29.01404x14.95154 28.05136x14.85019 27.01563x14.81641 27.01563x14.81641 25.79175x14.86255 24.52832x15.00098 23.88177x15.1048 23.22534x15.23169 21.88281x15.55469 20.50073x15.96997 19.0791x16.47754 17.61792x17.07739 16.11719x17.76953 16.11719x17.76953 14.32422x13.30469 14.32422x13.30469 15.04465x12.92841 15.7821x12.573 17.30811x11.9248 18.90222x11.36011 20.56445x10.87891 20.56445x10.87891 22.26184x10.49438 23.96143x10.21973 24.81204x10.1236 25.66321x10.05493 26.51492x10.01373 27.36719x10 27.36719x10 29.03409x10.04779 29.82572x10.10753 30.58948x10.19116 31.32536x10.29869 32.03336x10.43011 32.71348x10.58543 33.36572x10.76465 34.58658x11.19476 35.69592x11.72046 36.69376x12.34174 37.58008x13.05859 37.58008x13.05859 38.35873x13.88092 39.03357x14.8186 39.60458x15.87164 40.07178x17.04004 40.26644x17.6675 40.43515x18.32379 40.5779x19.00893 40.6947x19.7229 40.78555x20.46571 40.85043x21.23737 40.88937x22.03786 40.90234x22.86719 40.90234x22.86719 40.90234x49.16406
string path = @"36.57813x49.16406 35.41797x43.67969 35.41797x43.67969 35.13672x43.67969 35.13672x43.67969 34.41629x44.54843 33.69641x45.34412 32.97708x46.06674 32.2583x46.71631 31.54007x47.29282 30.82239x47.79626 30.10526x48.22665 29.38867x48.58398 29.38867x48.58398 28.65012x48.88474 27.86707x49.14539 27.03952x49.36594 26.16748x49.54639 25.25095x49.68674 24.28992x49.78699 23.28439x49.84714 22.23438x49.86719 22.23438x49.86719 21.52775x49.85564 20.84048x49.82104 20.17258x49.76337 19.52405x49.68262 18.28506x49.4519 17.12354x49.12891 16.03946x48.71362 15.03284x48.20605 14.10367x47.6062 13.25195x46.91406 13.25195x46.91406 12.48978x46.13678 11.82922x45.28149 11.27029x44.34821 10.81299x43.33691 10.45731x42.24762 10.20325x41.08032 10.05081x39.83502 10.0127x39.18312 10x38.51172 10x38.51172 10.01823x37.79307 10.07292x37.09613 10.16407x36.42088 10.29169x35.76733 10.6563x34.52533 11.16675x33.37012 11.82304x32.3017 12.62518x31.32007 13.57317x30.42523 14.10185x30.01036 14.66699x29.61719 15.2686x29.24571 15.90666x28.89594 16.58119x28.56786 17.29218x28.26147 18.03962x27.97679 18.82353x27.71381 19.6439x27.47252 20.50073x27.25293 22.32378x26.87885 24.29266x26.59155 26.40739x26.39105 28.66797x26.27734 28.66797x26.27734 35.20703x26.06641 35.20703x26.06641 35.20703x23.67578 35.20703x23.67578 35.17654x22.57907 35.08508x21.55652 34.93265x20.60812 34.71924x19.73389 34.44485x18.93381 34.1095x18.20789 33.71317x17.55612 33.25586x16.97852 33.25586x16.97852 32.73154x16.47177 32.13416x16.03259 31.46371x15.66098 30.72021x15.35693 29.90366x15.12045 29.01404x14.95154 28.05136x14.85019 27.01563x14.81641 27.01563x14.81641 25.79175x14.86255 24.52832x15.00098 23.88177x15.1048 23.22534x15.23169 21.88281x15.55469 20.50073x15.96997 19.0791x16.47754 17.61792x17.07739 16.11719x17.76953 16.11719x17.76953 14.32422x13.30469 14.32422x13.30469 15.04465x12.92841 15.7821x12.573 17.30811x11.9248 18.90222x11.36011 20.56445x10.87891 20.56445x10.87891 22.26184x10.49438 23.96143x10.21973 24.81204x10.1236 25.66321x10.05493 26.51492x10.01373 27.36719x10 27.36719x10 29.03409x10.04779 29.82572x10.10753 30.58948x10.19116 31.32536x10.29869 32.03336x10.43011 32.71348x10.58543 33.36572x10.76465 34.58658x11.19476 35.69592x11.72046 36.69376x12.34174 37.58008x13.05859 37.58008x13.05859 38.35873x13.88092 39.03357x14.8186 39.60458x15.87164 40.07178x17.04004 40.26644x17.6675 40.43515x18.32379 40.5779x19.00893 40.6947x19.7229 40.78555x20.46571 40.85043x21.23737 40.88937x22.03786 40.90234x22.86719 40.90234x22.86719 40.90234x49.16406
23.39453x45.05078 24.06655x45.03911 24.72031x45.00409 25.97302x44.86401 27.15268x44.63055 28.25928x44.30371 29.29282x43.88348 30.2533x43.36987 31.14072x42.76288 31.95508x42.0625 31.95508x42.0625 32.6843x41.27808 33.31628x40.41895 33.85104x39.48511 34.28857x38.47656 34.62888x37.39331 34.87195x36.23535 35.01779x35.00269 35.06641x33.69531 35.06641x33.69531 35.06641x30.21484 35.06641x30.21484 29.23047x30.46094 29.23047x30.46094 27.55093x30.54855 25.9928x30.68835 24.55606x30.88034 23.24072x31.12451 22.04678x31.42087 20.97424x31.76941 20.0231x32.17014 19.19336x32.62305 19.19336x32.62305 18.47238x33.13528 17.84753x33.71399 17.31882x34.35916 16.88623x35.0708 16.54977x35.84891 16.30945x36.69348 16.16525x37.60452 16.11719x38.58203 16.11719x38.58203 16.14713x39.34943 16.23694x40.06958 16.38663x40.74249 16.59619x41.36816 17.19495x42.47778 18.0332x43.39844 18.0332x43.39844 19.08679x44.12134 19.68527x44.40533 20.33154x44.6377 21.0256x44.81842 21.76746x44.94751 22.5571x45.02496 23.39453x45.05078";
var paths = path.Split(new[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
var polys = paths.Select(line =>
string[] paths = path.Split(new[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
Polygon[] polys = paths.Select(line =>
{
var pl = line.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
string[] pl = line.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
var points = pl.Select(p => p.Split('x'))
Primitives.PointF[] points = pl.Select(p => p.Split('x'))
.Select(p =>
{
return new SixLabors.Primitives.PointF(float.Parse(p[0]), float.Parse(p[1]));
@ -99,19 +101,19 @@ namespace SixLabors.Shapes.DrawShapesWithImageSharp
.ToArray();
return new Polygon(new LinearLineSegment(points));
}).ToArray();
var complex = new ComplexPolygon(polys);
ComplexPolygon complex = new ComplexPolygon(polys);
complex.SaveImage("letter", "a.png");
}
private static void DrawSerializedOPenSansLetterShape_o()
{
var path = @"45.40234x29.93359 45.3838x31.09519 45.32819x32.22452 45.23549x33.32157 45.10571x34.38635 44.93886x35.41886 44.73492x36.4191 44.49391x37.38706 44.21582x38.32275 43.90065x39.22617 43.5484x40.09732 43.15907x40.9362 42.73267x41.7428 42.26918x42.51713 41.76862x43.25919 41.23097x43.96897 40.65625x44.64648 40.65625x44.64648 40.04884x45.28719 39.41315x45.88657 38.74916x46.4446 38.05688x46.9613 37.33632x47.43667 36.58746x47.8707 35.81032x48.26339 35.00488x48.61475 34.17116x48.92477 33.30914x49.19345 32.41884x49.4208 31.50024x49.60681 30.55336x49.75149 29.57819x49.85483 28.57472x49.91683 27.54297x49.9375 27.54297x49.9375 26.2691x49.8996 25.03149x49.78589 23.83014x49.59637 22.66504x49.33105 21.53619x48.98993 20.4436x48.573 19.38727x48.08026 18.36719x47.51172 18.36719x47.51172 17.3938x46.87231 16.47754x46.16699 15.61841x45.39575 14.81641x44.55859 14.07153x43.65552 13.38379x42.68652 12.75317x41.65161 12.17969x40.55078 12.17969x40.55078 11.66882x39.39282 11.22607x38.18652 10.85144x36.93188 10.54492x35.62891 10.30652x34.27759 10.13623x32.87793 10.03406x31.42993 10x29.93359 10x29.93359 10.0184x28.77213 10.07361x27.64322 10.16562x26.54685 10.29443x25.48303 10.46005x24.45176 10.66248x23.45303 10.9017x22.48685 11.17773x21.55322 11.49057x20.65214 11.84021x19.7836 12.22665x18.94761 12.6499x18.14417 13.10995x17.37327 13.60681x16.63492 14.14047x15.92912 14.71094x15.25586 14.71094x15.25586 15.31409x14.61941 15.9458x14.02402 16.60608x13.46969 17.29492x12.95642 18.01233x12.48421 18.7583x12.05307 19.53284x11.66299 20.33594x11.31396 21.1676x11.006 22.02783x10.73911 22.91663x10.51327 23.83398x10.32849 24.77991x10.18478 25.75439x10.08212 26.75745x10.02053 27.78906x10 27.78906x10 28.78683x10.02101 29.75864x10.08405 30.70449x10.1891 31.62439x10.33618 32.51833x10.52528 33.38632x10.75641 34.22836x11.02956 35.04443x11.34473 35.83456x11.70192 36.59872x12.10114 37.33694x12.54237 38.04919x13.02563 38.7355x13.55092 39.39584x14.11823 40.03024x14.72755 40.63867x15.37891 40.63867x15.37891 41.21552x16.0661 41.75516x16.78296 42.25757x17.52948 42.72278x18.30566 43.15077x19.11151 43.54153x19.94702 43.89509x20.81219 44.21143x21.70703 44.49055x22.63153 44.73245x23.58569 44.93714x24.56952 45.10461x25.58301 45.23487x26.62616 45.32791x27.69897 45.38374x28.80145 45.40234x29.93359
string path = @"45.40234x29.93359 45.3838x31.09519 45.32819x32.22452 45.23549x33.32157 45.10571x34.38635 44.93886x35.41886 44.73492x36.4191 44.49391x37.38706 44.21582x38.32275 43.90065x39.22617 43.5484x40.09732 43.15907x40.9362 42.73267x41.7428 42.26918x42.51713 41.76862x43.25919 41.23097x43.96897 40.65625x44.64648 40.65625x44.64648 40.04884x45.28719 39.41315x45.88657 38.74916x46.4446 38.05688x46.9613 37.33632x47.43667 36.58746x47.8707 35.81032x48.26339 35.00488x48.61475 34.17116x48.92477 33.30914x49.19345 32.41884x49.4208 31.50024x49.60681 30.55336x49.75149 29.57819x49.85483 28.57472x49.91683 27.54297x49.9375 27.54297x49.9375 26.2691x49.8996 25.03149x49.78589 23.83014x49.59637 22.66504x49.33105 21.53619x48.98993 20.4436x48.573 19.38727x48.08026 18.36719x47.51172 18.36719x47.51172 17.3938x46.87231 16.47754x46.16699 15.61841x45.39575 14.81641x44.55859 14.07153x43.65552 13.38379x42.68652 12.75317x41.65161 12.17969x40.55078 12.17969x40.55078 11.66882x39.39282 11.22607x38.18652 10.85144x36.93188 10.54492x35.62891 10.30652x34.27759 10.13623x32.87793 10.03406x31.42993 10x29.93359 10x29.93359 10.0184x28.77213 10.07361x27.64322 10.16562x26.54685 10.29443x25.48303 10.46005x24.45176 10.66248x23.45303 10.9017x22.48685 11.17773x21.55322 11.49057x20.65214 11.84021x19.7836 12.22665x18.94761 12.6499x18.14417 13.10995x17.37327 13.60681x16.63492 14.14047x15.92912 14.71094x15.25586 14.71094x15.25586 15.31409x14.61941 15.9458x14.02402 16.60608x13.46969 17.29492x12.95642 18.01233x12.48421 18.7583x12.05307 19.53284x11.66299 20.33594x11.31396 21.1676x11.006 22.02783x10.73911 22.91663x10.51327 23.83398x10.32849 24.77991x10.18478 25.75439x10.08212 26.75745x10.02053 27.78906x10 27.78906x10 28.78683x10.02101 29.75864x10.08405 30.70449x10.1891 31.62439x10.33618 32.51833x10.52528 33.38632x10.75641 34.22836x11.02956 35.04443x11.34473 35.83456x11.70192 36.59872x12.10114 37.33694x12.54237 38.04919x13.02563 38.7355x13.55092 39.39584x14.11823 40.03024x14.72755 40.63867x15.37891 40.63867x15.37891 41.21552x16.0661 41.75516x16.78296 42.25757x17.52948 42.72278x18.30566 43.15077x19.11151 43.54153x19.94702 43.89509x20.81219 44.21143x21.70703 44.49055x22.63153 44.73245x23.58569 44.93714x24.56952 45.10461x25.58301 45.23487x26.62616 45.32791x27.69897 45.38374x28.80145 45.40234x29.93359
16.04688x29.93359 16.09302x31.72437 16.23145x33.40527 16.33527x34.20453 16.46216x34.97632 16.61212x35.72064 16.78516x36.4375 16.98126x37.12689 17.20044x37.78882 17.44269x38.42328 17.70801x39.03027 18.30786x40.16187 19x41.18359 19x41.18359 19.78168x42.08997 20.65015x42.87549 21.60541x43.54016 22.64746x44.08398 23.77631x44.50696 24.99194x44.80908 26.29437x44.99036 26.97813x45.03568 27.68359x45.05078 27.68359x45.05078 28.38912x45.03575 29.07309x44.99063 30.37634x44.81018 31.59335x44.50943 32.72412x44.08838 33.76865x43.54703 34.72693x42.88538 35.59897x42.10342 36.38477x41.20117 36.38477x41.20117 37.08102x40.18301 37.68445x39.05334 37.95135x38.44669 38.19504x37.81216 38.41552x37.14976 38.61279x36.45947 38.78686x35.74131 38.93771x34.99527 39.06536x34.22135 39.1698x33.41956 39.30905x31.73233 39.35547x29.93359 39.35547x29.93359 39.30905x28.15189 39.1698x26.48059 39.06536x25.68635 38.93771x24.91971 38.78686x24.18067 38.61279x23.46924 38.41552x22.78541 38.19504x22.12918 37.95135x21.50056 37.68445x20.89954 37.08102x19.7803 36.38477x18.77148 36.38477x18.77148 35.59787x17.87747 34.72253x17.10266 33.75876x16.44705 32.70654x15.91064 31.56589x15.49344 30.33679x15.19543 29.68908x15.09113 29.01926x15.01663 28.32732x14.97193 27.61328x14.95703 27.61328x14.95703 26.90796x14.97173 26.22461x15.01581 24.92383x15.19214 23.71094x15.48602 22.58594x15.89746 21.54883x16.42645 20.59961x17.073 19.73828x17.8371 18.96484x18.71875 18.96484x18.71875 18.28094x19.71686 17.68823x20.83032 17.42607x21.43031 17.18671x22.05914 16.97014x22.71681 16.77637x23.40332 16.60539x24.11867 16.45721x24.86285 16.33183x25.63588 16.22925x26.43774 16.09247x28.12799 16.04688x29.93359 ";
var paths = path.Split(new[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
var polys = paths.Select(line =>
string[] paths = path.Split(new[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
Polygon[] polys = paths.Select(line =>
{
var pl = line.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
string[] pl = line.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
var points = pl.Select(p => p.Split('x'))
Primitives.PointF[] points = pl.Select(p => p.Split('x'))
.Select(p =>
{
return new SixLabors.Primitives.PointF(float.Parse(p[0]), float.Parse(p[1]));
@ -119,7 +121,7 @@ namespace SixLabors.Shapes.DrawShapesWithImageSharp
.ToArray();
return new Polygon(new LinearLineSegment(points));
}).ToArray();
var complex = new ComplexPolygon(polys);
ComplexPolygon complex = new ComplexPolygon(polys);
complex.SaveImage("letter", "o.png");
}
@ -141,7 +143,7 @@ namespace SixLabors.Shapes.DrawShapesWithImageSharp
private static void OutputDrawnShape()
{
// center the shape outerRadii + 10 px away from edges
var sb = new PathBuilder();
PathBuilder sb = new PathBuilder();
// draw a 'V'
sb.AddLines(new Vector2(10, 10), new Vector2(20, 20), new Vector2(30, 10));
@ -158,7 +160,7 @@ namespace SixLabors.Shapes.DrawShapesWithImageSharp
private static void OutputDrawnShapeHourGlass()
{
// center the shape outerRadii + 10 px away from edges
var sb = new PathBuilder();
PathBuilder sb = new PathBuilder();
// draw a 'V'
sb.AddLines(new Vector2(10, 10), new Vector2(20, 20), new Vector2(30, 10));
@ -175,17 +177,17 @@ namespace SixLabors.Shapes.DrawShapesWithImageSharp
private static void OutputStar(int points, float inner = 10, float outer = 20)
{
// center the shape outerRadii + 10 px away from edges
var offset = outer + 10;
float offset = outer + 10;
var star = new Star(offset, offset, points, inner, outer);
Star star = new Star(offset, offset, points, inner, outer);
star.SaveImage("Stars", $"Star_{points}.png");
}
private static void OutputClippedRectangle()
{
var rect1 = new RectangularPolygon(10, 10, 40, 40);
var rect2 = new RectangularPolygon(20, 0, 20, 20);
var paths = rect1.Clip(rect2);
RectangularPolygon rect1 = new RectangularPolygon(10, 10, 40, 40);
RectangularPolygon rect2 = new RectangularPolygon(20, 0, 20, 20);
IPath paths = rect1.Clip(rect2);
paths.SaveImage("Clipping", "RectangleWithTopClipped.png");
}
@ -199,19 +201,19 @@ namespace SixLabors.Shapes.DrawShapesWithImageSharp
shape = shape.Translate(-shape.Bounds.Location) // touch top left
.Translate(new Vector2(10)); // move in from top left
var fullPath = System.IO.Path.GetFullPath(System.IO.Path.Combine("Output", System.IO.Path.Combine(path)));
string fullPath = System.IO.Path.GetFullPath(System.IO.Path.Combine("Output", System.IO.Path.Combine(path)));
// pad even amount around shape
int width = (int)(shape.Bounds.Left + shape.Bounds.Right);
int height = (int)(shape.Bounds.Top + shape.Bounds.Bottom);
using (var img = new Image<Rgba32>(width, height))
using (Image<Rgba32> img = new Image<Rgba32>(width, height))
{
img.Mutate(i => i.Fill(Rgba32.DarkBlue));
foreach (var s in shape)
foreach (IPath s in shape)
{
// In ImageSharp.Drawing.Paths there is an extension method that takes in an IShape directly.
img.Mutate(i => i.Fill(Rgba32.HotPink, s, new GraphicsOptions(true)));
img.Mutate(i => i.Fill(new GraphicsOptions(true), Rgba32.HotPink, s));
}
// img.Draw(Color.LawnGreen, 1, new ShapePath(shape));
@ -228,17 +230,17 @@ namespace SixLabors.Shapes.DrawShapesWithImageSharp
}
public static void SaveImage(this IPathCollection shape, int width, int height, params string[] path)
{
var fullPath = System.IO.Path.GetFullPath(System.IO.Path.Combine("Output", System.IO.Path.Combine(path)));
string fullPath = System.IO.Path.GetFullPath(System.IO.Path.Combine("Output", System.IO.Path.Combine(path)));
using (var img = new Image<Rgba32>(width, height))
using (Image<Rgba32> img = new Image<Rgba32>(width, height))
{
img.Mutate(i => i.Fill(Rgba32.DarkBlue));
// In ImageSharp.Drawing.Paths there is an extension method that takes in an IShape directly.
foreach (var s in shape)
foreach (IPath s in shape)
{
// In ImageSharp.Drawing.Paths there is an extension method that takes in an IShape directly.
img.Mutate(i => i.Fill(Rgba32.HotPink, s, new GraphicsOptions(true)));
img.Mutate(i => i.Fill(new GraphicsOptions(true), Rgba32.HotPink, s));
}
// img.Draw(Color.LawnGreen, 1, new ShapePath(shape));

Просмотреть файл

@ -36,13 +36,13 @@ namespace SixLabors.Shapes.Text
/// <inheritdoc/>
protected override void BeginGlyph(RectangleF rect)
{
var point = this.path.PointAlongPath(rect.Left);
SegmentInfo point = this.path.PointAlongPath(rect.Left);
PointF targetPoint = point.Point + new PointF(0, rect.Top - this.yOffset);
// due to how matrix combining works you have to combine thins in the revers order of operation
// this one rotates the glype then moves it.
var matrix = Matrix3x2.CreateTranslation(targetPoint - rect.Location) * Matrix3x2.CreateRotation(point.Angle - Pi, point.Point);
Matrix3x2 matrix = Matrix3x2.CreateTranslation(targetPoint - rect.Location) * Matrix3x2.CreateRotation(point.Angle - Pi, point.Point);
this.builder.SetTransform(matrix);
}
}

Просмотреть файл

@ -21,7 +21,7 @@ namespace SixLabors.Shapes
/// <returns>The <see cref="IPathCollection"/></returns>
public static IPathCollection GenerateGlyphs(string text, PointF location, RendererOptions style)
{
var glyphBuilder = new GlyphBuilder(location);
GlyphBuilder glyphBuilder = new GlyphBuilder(location);
TextRenderer renderer = new TextRenderer(glyphBuilder);
@ -50,7 +50,7 @@ namespace SixLabors.Shapes
/// <returns>The <see cref="IPathCollection"/></returns>
public static IPathCollection GenerateGlyphs(string text, IPath path, RendererOptions style)
{
var glyphBuilder = new PathGlyphBuilder(path);
PathGlyphBuilder glyphBuilder = new PathGlyphBuilder(path);
TextRenderer renderer = new TextRenderer(glyphBuilder);

Просмотреть файл

@ -476,7 +476,7 @@ namespace SixLabors.Shapes
return false;
}
var otherRectangle = (RectangularPolygon)obj;
RectangularPolygon otherRectangle = (RectangularPolygon)obj;
return this.X == otherRectangle.X &&
this.Y == otherRectangle.Y &&
@ -490,7 +490,7 @@ namespace SixLabors.Shapes
/// <returns>A hash code for the current object.</returns>
public override int GetHashCode()
{
var hashCode = -1073544145;
int hashCode = -1073544145;
hashCode = (hashCode * -1521134295) + this.X.GetHashCode();
hashCode = (hashCode * -1521134295) + this.Y.GetHashCode();
hashCode = (hashCode * -1521134295) + this.Width.GetHashCode();

Просмотреть файл

@ -15,7 +15,7 @@ namespace SixLabors.Shapes.Tests
public void SingleSegmentConstructor()
{
CubicBezierLineSegment segment = new CubicBezierLineSegment(new Vector2(0, 0), new Vector2(10, 0), new Vector2(10, 0), new Vector2(20, 0));
var points = segment.Flatten();
IReadOnlyList<PointF> points = segment.Flatten();
Assert.Contains(new Vector2(0, 0), points);
Assert.Contains(new Vector2(10, 0), points);
Assert.Contains(new Vector2(20, 0), points);

Просмотреть файл

@ -149,7 +149,7 @@ namespace SixLabors.Shapes.Tests
public void PointOnPath(float distance, float expectedX, float expectedY, float expectedAngle)
{
InternalPath shape = Create(new PointF(50, 50), new Size(200, 60));
var point = shape.PointAlongPath(distance);
SegmentInfo point = shape.PointAlongPath(distance);
Assert.Equal(expectedX, point.Point.X, 4);
Assert.Equal(expectedY, point.Point.Y, 4);
Assert.Equal(expectedAngle, point.Angle, 4);

Просмотреть файл

@ -17,12 +17,12 @@ namespace SixLabors.Shapes.Tests
[Fact]
public void LoosingPartOfLineIfSelfIntersects()
{
var line1 = new PointF[] { new Vector2(117f, 199f), new Vector2(31f, 210f), new Vector2(35f, 191f), new Vector2(117f, 199f), new Vector2(2f, 9f) };
var path = new Path(new LinearLineSegment(line1));
PointF[] line1 = new PointF[] { new Vector2(117f, 199f), new Vector2(31f, 210f), new Vector2(35f, 191f), new Vector2(117f, 199f), new Vector2(2f, 9f) };
Path path = new Path(new LinearLineSegment(line1));
var outline = path.GenerateOutline(5f);
IPath outline = path.GenerateOutline(5f);
// all points must not be in the outline;
foreach (var v in line1)
foreach (PointF v in line1)
{
Assert.True(outline.Contains(v), $"Outline does not contain {v}");
}
@ -31,12 +31,12 @@ namespace SixLabors.Shapes.Tests
[Fact]
public void PAthLoosingSelfIntersectingPoint()
{
var line1 = new PointF[] { new Vector2(117f, 199f), new Vector2(31f, 210f), new Vector2(35f, 191f), new Vector2(117f, 199f), new Vector2(2f, 9f) };
var path = new Path(new LinearLineSegment(line1));
var pathPoints = path.Flatten().First().Points;
PointF[] line1 = new PointF[] { new Vector2(117f, 199f), new Vector2(31f, 210f), new Vector2(35f, 191f), new Vector2(117f, 199f), new Vector2(2f, 9f) };
Path path = new Path(new LinearLineSegment(line1));
IReadOnlyList<PointF> pathPoints = path.Flatten().First().Points;
// all points must not be in the outline;
foreach (var v in line1)
foreach (PointF v in line1)
{
Assert.Contains(v, pathPoints);
}
@ -45,12 +45,12 @@ namespace SixLabors.Shapes.Tests
[Fact]
public void InternalPathLoosingSelfIntersectingPoint()
{
var line1 = new PointF[] { new Vector2(117f, 199f), new Vector2(31f, 210f), new Vector2(35f, 191f), new Vector2(117f, 199f), new Vector2(2f, 9f) };
var path = new InternalPath(new LinearLineSegment(line1), false);
var pathPoints = path.Points();
PointF[] line1 = new PointF[] { new Vector2(117f, 199f), new Vector2(31f, 210f), new Vector2(35f, 191f), new Vector2(117f, 199f), new Vector2(2f, 9f) };
InternalPath path = new InternalPath(new LinearLineSegment(line1), false);
IReadOnlyList<PointF> pathPoints = path.Points();
// all points must not be in the outline;
foreach (var v in line1)
foreach (PointF v in line1)
{
Assert.Contains(v, pathPoints);
}

Просмотреть файл

@ -22,8 +22,8 @@ namespace SixLabors.Shapes.Tests.Issues
new PointF(93, 85),
new PointF(65, 137)));
var clippedPath = simplePath.Clip(hole1);
var outline = clippedPath.GenerateOutline(5, new[] { 1f });
IPath clippedPath = simplePath.Clip(hole1);
IPath outline = clippedPath.GenerateOutline(5, new[] { 1f });
Assert.False(outline.Contains(new PointF(74, 97)));
}
@ -41,15 +41,15 @@ namespace SixLabors.Shapes.Tests.Issues
new PointF(93, 85),
new PointF(65, 137)));
var clippedPath = simplePath.Clip(hole1);
var outline = clippedPath.GenerateOutline(5, new[] { 1f });
var buffer = new PointF[20];
IPath clippedPath = simplePath.Clip(hole1);
IPath outline = clippedPath.GenerateOutline(5, new[] { 1f });
PointF[] buffer = new PointF[20];
var start = new PointF(outline.Bounds.Left - 1, 102);
var end = new PointF(outline.Bounds.Right + 1, 102);
PointF start = new PointF(outline.Bounds.Left - 1, 102);
PointF end = new PointF(outline.Bounds.Right + 1, 102);
var matches = outline.FindIntersections(start, end, buffer, 0);
var maxIndex = buffer.Select((x, i) => new { x, i }).Where(x => x.x.X > 0).Select(x=>x.i).Last();
int matches = outline.FindIntersections(start, end, buffer, 0);
int maxIndex = buffer.Select((x, i) => new { x, i }).Where(x => x.x.X > 0).Select(x=>x.i).Last();
Assert.Equal(matches-1, maxIndex);
}
}

Просмотреть файл

@ -15,7 +15,7 @@ namespace SixLabors.Shapes.Tests
public void SingleSegmentConstructor()
{
LinearLineSegment segment = new LinearLineSegment(new Vector2(0, 0), new Vector2(10, 10));
var flatPath = segment.Flatten();
IReadOnlyList<PointF> flatPath = segment.Flatten();
Assert.Equal(2, flatPath.Count);
Assert.Equal(new PointF(0, 0), flatPath[0]);
Assert.Equal(new PointF(10, 10), flatPath[1]);

Просмотреть файл

@ -66,7 +66,7 @@ namespace SixLabors.Shapes.Tests
public void SimplePath()
{
Path path = new Path(new LinearLineSegment(new PointF(0, 0), new PointF(10, 0), new PointF(10, 10), new PointF(0, 10)));
var points = path.Flatten().Single().Points;
System.Collections.Generic.IReadOnlyList<PointF> points = path.Flatten().Single().Points;
Assert.Equal(4, points.Count);
Assert.Equal(new PointF(0, 0), points[0]);

Просмотреть файл

@ -53,18 +53,18 @@ namespace SixLabors.Shapes.Tests.PolygonClipper
[Fact]
public void OverlappingTriangleCutRightSide()
{
var triangle = new Polygon(new LinearLineSegment(
Polygon triangle = new Polygon(new LinearLineSegment(
new Vector2(0, 50),
new Vector2(70, 0),
new Vector2(50, 100)));
var cutout = new Polygon(new LinearLineSegment(
Polygon cutout = new Polygon(new LinearLineSegment(
new Vector2(20, 0),
new Vector2(70, 0),
new Vector2(70, 100),
new Vector2(20, 100)));
var shapes = this.Clip(triangle, cutout);
IEnumerable<IPath> shapes = this.Clip(triangle, cutout);
Assert.Equal(1, shapes.Count());
Assert.DoesNotContain(triangle, shapes);
}
@ -72,9 +72,9 @@ namespace SixLabors.Shapes.Tests.PolygonClipper
[Fact]
public void OverlappingTriangles()
{
var shapes = this.Clip(this.BigTriangle, this.LittleTriangle);
IEnumerable<IPath> shapes = this.Clip(this.BigTriangle, this.LittleTriangle);
Assert.Equal(1, shapes.Count());
var path = shapes.Single().Flatten().First().Points;
IReadOnlyList<PointF> path = shapes.Single().Flatten().First().Points;
Assert.Equal(7, path.Count);
foreach (Vector2 p in this.BigTriangle.Flatten().First().Points)
{
@ -85,7 +85,7 @@ namespace SixLabors.Shapes.Tests.PolygonClipper
[Fact]
public void NonOverlapping()
{
var shapes = this.Clip(this.TopLeft, this.TopRight)
IEnumerable<RectangularPolygon> shapes = this.Clip(this.TopLeft, this.TopRight)
.OfType<Polygon>().Select(x => (RectangularPolygon)x);
Assert.Equal(1, shapes.Count());
@ -97,7 +97,7 @@ namespace SixLabors.Shapes.Tests.PolygonClipper
[Fact]
public void OverLappingReturns1NewShape()
{
var shapes = this.Clip(this.BigSquare, this.TopLeft);
IEnumerable<IPath> shapes = this.Clip(this.BigSquare, this.TopLeft);
Assert.Equal(1, shapes.Count());
Assert.DoesNotContain(this.BigSquare, shapes);
@ -107,7 +107,7 @@ namespace SixLabors.Shapes.Tests.PolygonClipper
[Fact]
public void OverlappingButNotCrossingRetuensOrigionalShapes()
{
var shapes = this.Clip(this.BigSquare, this.Hole)
IEnumerable<RectangularPolygon> shapes = this.Clip(this.BigSquare, this.Hole)
.OfType<Polygon>().Select(x => (RectangularPolygon)x);
Assert.Equal(2, shapes.Count());
@ -118,7 +118,7 @@ namespace SixLabors.Shapes.Tests.PolygonClipper
[Fact]
public void TouchingButNotOverlapping()
{
var shapes = this.Clip(this.TopMiddle, this.TopLeft);
IEnumerable<IPath> shapes = this.Clip(this.TopMiddle, this.TopLeft);
Assert.Equal(1, shapes.Count());
Assert.DoesNotContain(this.TopMiddle, shapes);
Assert.DoesNotContain(this.TopLeft, shapes);
@ -129,7 +129,7 @@ namespace SixLabors.Shapes.Tests.PolygonClipper
{
IEnumerable<ISimplePath> paths = new RectangularPolygon(10, 10, 40, 40).Clip(new RectangularPolygon(20, 0, 20, 20)).Flatten();
Assert.Equal(1, paths.Count());
var points = paths.First().Points;
IReadOnlyList<PointF> points = paths.First().Points;
Assert.Equal(8, points.Count);
}

Просмотреть файл

@ -113,7 +113,7 @@ namespace SixLabors.Shapes.Tests
public void AsSimpleLinearPath()
{
Polygon poly = new Polygon(new LinearLineSegment(new PointF(0, 0), new PointF(0, 10), new PointF(5, 5)));
var paths = poly.Flatten().First().Points;
IReadOnlyList<PointF> paths = poly.Flatten().First().Points;
Assert.Equal(3, paths.Count);
Assert.Equal(new PointF(0, 0), paths[0]);
Assert.Equal(new PointF(0, 10), paths[1]);
@ -147,7 +147,7 @@ namespace SixLabors.Shapes.Tests
public void ReturnsWrapperOfSelfASOwnPath_SingleSegment()
{
Polygon poly = new Polygon(new LinearLineSegment(new PointF(0, 0), new PointF(0, 10), new PointF(5, 5)));
var paths = poly.Flatten().ToArray();
ISimplePath[] paths = poly.Flatten().ToArray();
Assert.Equal(1, paths.Length);
Assert.Equal(poly, paths[0]);
}
@ -156,7 +156,7 @@ namespace SixLabors.Shapes.Tests
public void ReturnsWrapperOfSelfASOwnPath_MultiSegment()
{
Polygon poly = new Polygon(new LinearLineSegment(new PointF(0, 0), new PointF(0, 10)), new LinearLineSegment(new PointF(2, 5), new PointF(5, 5)));
var paths = poly.Flatten().ToArray();
ISimplePath[] paths = poly.Flatten().ToArray();
Assert.Equal(1, paths.Length);
Assert.Equal(poly, paths[0]);
}

Просмотреть файл

@ -177,7 +177,7 @@ namespace SixLabors.Shapes.Tests
public void LienearSegements()
{
IPath shape = new RectangularPolygon(10, 11, 12, 13).AsPath();
var segemnts = shape.Flatten().ToArray()[0].Points;
IReadOnlyList<PointF> segemnts = shape.Flatten().ToArray()[0].Points;
Assert.Equal(new PointF(10, 11), segemnts[0]);
Assert.Equal(new PointF(22, 11), segemnts[1]);
Assert.Equal(new PointF(22, 24), segemnts[2]);
@ -281,7 +281,7 @@ namespace SixLabors.Shapes.Tests
public void PointOnPath(float distance, float expectedX, float expectedY, float expectedAngle)
{
IPath shape = new RectangularPolygon(50, 50, 200, 60);
var point = shape.PointAlongPath(distance);
SegmentInfo point = shape.PointAlongPath(distance);
Assert.Equal(expectedX, point.Point.X);
Assert.Equal(expectedY, point.Point.Y);
Assert.Equal(expectedAngle, point.Angle);

Просмотреть файл

@ -61,7 +61,7 @@ namespace SixLabors.Shapes.Tests
RegularPolygon poly = new RegularPolygon(Vector2.Zero, pointsCount, radius, 0);
var points = poly.Flatten().ToArray()[0].Points;
IReadOnlyList<PointF> points = poly.Flatten().ToArray()[0].Points;
// calcualte baselineDistance
float baseline = Vector2.Distance(points[0], points[1]);
@ -89,7 +89,7 @@ namespace SixLabors.Shapes.Tests
double anAngle = new Random().NextDouble() * TwoPI;
RegularPolygon poly = new RegularPolygon(Vector2.Zero, 3, radius, (float)anAngle);
var points = poly.Flatten().ToArray()[0].Points;
IReadOnlyList<PointF> points = poly.Flatten().ToArray()[0].Points;
IEnumerable<double> allAngles = points.Select(b => Math.Atan2(b.Y, b.X))
.Select(x => x < 0 ? x + TwoPI : x); // normalise it from +/- PI to 0 to TwoPI

Просмотреть файл

@ -57,7 +57,7 @@ namespace SixLabors.Shapes.Tests
builder.AddLine(10, 90, 50, 50);
ComplexPolygon shape = Assert.IsType<ComplexPolygon>(builder.Build());
var p = shape.Paths.ToArray();
IPath[] p = shape.Paths.ToArray();
Assert.Equal(2, p.Length);
Assert.IsType<Path>(p[0]);
Assert.IsType<Path>(p[1]);
@ -74,7 +74,7 @@ namespace SixLabors.Shapes.Tests
builder.AddLine(10, 90, 50, 50);
builder.CloseFigure();
ComplexPolygon shape = Assert.IsType<ComplexPolygon>(builder.Build());
var p = shape.Paths.ToArray();
IPath[] p = shape.Paths.ToArray();
Assert.Equal(2, p.Length);
Assert.IsType<Path>(p[0]);
@ -93,7 +93,7 @@ namespace SixLabors.Shapes.Tests
builder.AddLine(10, 90, 50, 50);
ComplexPolygon shape = Assert.IsType<ComplexPolygon>(builder.Build());
var p = shape.Paths.ToArray();
IPath[] p = shape.Paths.ToArray();
Assert.Equal(2, p.Length);
Assert.IsType<Polygon>(p[0]);
Assert.IsType<Path>(p[1]);
@ -111,7 +111,7 @@ namespace SixLabors.Shapes.Tests
builder.AddLine(10, 90, 50, 50);
ComplexPolygon shape = Assert.IsType<ComplexPolygon>(builder.Build());
var p = shape.Paths.ToArray();
IPath[] p = shape.Paths.ToArray();
Assert.Equal(2, p.Length);
Assert.IsType<Path>(p[0]);
Assert.IsType<Path>(p[1]);
@ -184,7 +184,7 @@ namespace SixLabors.Shapes.Tests
builder.ResetOrigin();
builder.AddLines(point1, point2, point3);
var shape = Assert.IsType<ComplexPolygon>(builder.Build()).Paths.ToArray();
IPath[] shape = Assert.IsType<ComplexPolygon>(builder.Build()).Paths.ToArray();
Assert.Equal(10, shape[0].Bounds.Left);
Assert.Equal(110, shape[1].Bounds.Left);
Assert.Equal(10, shape[0].Bounds.Left);
@ -204,7 +204,7 @@ namespace SixLabors.Shapes.Tests
builder.SetOrigin(origin); //new origin is scaled by default transform
builder.StartFigure();
builder.AddLines(point1, point2, point3);
var shape = Assert.IsType<ComplexPolygon>(builder.Build()).Paths.ToArray();
IPath[] shape = Assert.IsType<ComplexPolygon>(builder.Build()).Paths.ToArray();
Assert.Equal(100, shape[0].Bounds.Left);
Assert.Equal(-400, shape[1].Bounds.Left);
}

Просмотреть файл

@ -64,7 +64,7 @@ namespace SixLabors.Shapes.Tests
Star poly = new Star(Vector2.Zero, pointsCount, radius, radius2, 0);
var points = poly.Flatten().ToArray()[0].Points.ToArray();
PointF[] points = poly.Flatten().ToArray()[0].Points.ToArray();
// calcualte baselineDistance
float baseline = Vector2.Distance(points[0], points[1]);