Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions ImageSharp.Drawing.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 18
VisualStudioVersion = 18.0.11123.170 d18.0
# Visual Studio Version 17
VisualStudioVersion = 17.14.36623.8 d17.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_root", "_root", "{C317F1B1-D75E-4C6D-83EB-80367343E0D7}"
ProjectSection(SolutionItems) = preProject
Expand Down Expand Up @@ -359,14 +359,6 @@ Global
{5493F024-0A3F-420C-AC2D-05B77A36025B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5493F024-0A3F-420C-AC2D-05B77A36025B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5493F024-0A3F-420C-AC2D-05B77A36025B}.Release|Any CPU.Build.0 = Release|Any CPU
{FCEDD229-22BC-4B82-87DE-786BBFC52EDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FCEDD229-22BC-4B82-87DE-786BBFC52EDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FCEDD229-22BC-4B82-87DE-786BBFC52EDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FCEDD229-22BC-4B82-87DE-786BBFC52EDE}.Release|Any CPU.Build.0 = Release|Any CPU
{5490DFAF-0891-535F-08B4-2BF03C2BB778}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5490DFAF-0891-535F-08B4-2BF03C2BB778}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5490DFAF-0891-535F-08B4-2BF03C2BB778}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5490DFAF-0891-535F-08B4-2BF03C2BB778}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
5 changes: 3 additions & 2 deletions samples/DrawShapesWithImageSharp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.Drawing.Processing;
using SixLabors.ImageSharp.Drawing.Text;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using IODirectory = System.IO.Directory;
Expand Down Expand Up @@ -61,7 +62,7 @@
FontFamily fam = SystemFonts.Get("Arial");
Font font = new(fam, 30);
TextOptions textOptions = new(font);
IPathCollection glyphs = TextBuilder.GenerateGlyphs(text, textOptions);
IPathCollection glyphs = TextBuilder.GeneratePaths(text, textOptions);

glyphs.SaveImage("Text", text + ".png");
}
Expand All @@ -80,7 +81,7 @@
// LayoutMode = LayoutMode.VerticalLeftRight
};

IPathCollection glyphs = TextBuilder.GenerateGlyphs(text, path, textOptions);
IPathCollection glyphs = TextBuilder.GeneratePaths(text, path, textOptions);

glyphs.SaveImageWithPath(path, "Text-Path", text + ".png");
}
Expand All @@ -107,7 +108,7 @@
string[] pl = line.Split([' '], StringSplitOptions.RemoveEmptyEntries);

PointF[] points = pl.Select(p => p.Split('x'))
.Select(p => new PointF(float.Parse(p[0]), float.Parse(p[1])))

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 111 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_a()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)
.ToArray();
return new Polygon(points);
}).ToArray();
Expand All @@ -126,7 +127,7 @@
string[] pl = line.Split([' '], StringSplitOptions.RemoveEmptyEntries);

PointF[] points = pl.Select(p => p.Split('x'))
.Select(p => new PointF(float.Parse(p[0]), float.Parse(p[1])))

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, ubuntu-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, windows-latest, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net9.0, 9.0.x, true, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)

Check warning on line 130 in samples/DrawShapesWithImageSharp/Program.cs

View workflow job for this annotation

GitHub Actions / Build (false, macos-13, net8.0, 8.0.x, -x64, false)

The behavior of 'float.Parse(string)' could vary based on the current user's locale settings. Replace this call in 'Program.DrawSerializedOPenSansLetterShape_o()' with a call to 'float.Parse(string, IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)
.ToArray();

return new Polygon(points);
Expand Down
4 changes: 2 additions & 2 deletions src/ImageSharp.Drawing/ImageSharp.Drawing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
<None Include="..\..\shared-infrastructure\branding\icons\imagesharp.drawing\sixlabors.imagesharp.drawing.128.png" Pack="true" PackagePath="" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SixLabors.Fonts" Version="3.0.0-alpha.0.1" />
<PackageReference Include="SixLabors.ImageSharp" Version="4.0.0-alpha.0.44" />
<PackageReference Include="SixLabors.Fonts" Version="3.0.0-alpha.0.3" />
<PackageReference Include="SixLabors.ImageSharp" Version="4.0.0-alpha.0.49" />
</ItemGroup>
<Import Project="..\..\shared-infrastructure\src\SharedInfrastructure\SharedInfrastructure.projitems" Label="Shared" />
</Project>
4 changes: 2 additions & 2 deletions src/ImageSharp.Drawing/Processing/EllipticGradientBrush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ public RadialGradientBrushApplicator(
this.center = center;
this.referenceAxisEnd = referenceAxisEnd;
this.axisRatio = axisRatio;
this.rotation = RadialGradientBrushApplicator<TPixel>.AngleBetween(
this.rotation = AngleBetween(
this.center,
new PointF(this.center.X + 1, this.center.Y),
this.referenceAxisEnd);
this.referenceRadius = RadialGradientBrushApplicator<TPixel>.DistanceBetween(this.center, this.referenceAxisEnd);
this.referenceRadius = DistanceBetween(this.center, this.referenceAxisEnd);
this.secondRadius = this.referenceRadius * this.axisRatio;

this.referenceRadiusSquared = this.referenceRadius * this.referenceRadius;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ public static IImageProcessingContext Clear(this IImageProcessingContext source,
internal static DrawingOptions CloneForClearOperation(this DrawingOptions drawingOptions)
{
GraphicsOptions options = drawingOptions.GraphicsOptions.DeepClone();
options.ColorBlendingMode = PixelFormats.PixelColorBlendingMode.Normal;
options.AlphaCompositionMode = PixelFormats.PixelAlphaCompositionMode.Src;
options.ColorBlendingMode = PixelColorBlendingMode.Normal;
options.AlphaCompositionMode = PixelAlphaCompositionMode.Src;
options.BlendPercentage = 1F;

return new DrawingOptions(options, drawingOptions.ShapeOptions, drawingOptions.Transform);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public static IImageProcessingContext Draw(
/// <param name="paths">The paths.</param>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext
Draw(this IImageProcessingContext source, Pen pen, IPathCollection paths) =>
source.Draw(source.GetDrawingOptions(), pen, paths);
Draw(this IImageProcessingContext source, Pen pen, IPathCollection paths)
=> source.Draw(source.GetDrawingOptions(), pen, paths);

/// <summary>
/// Draws the outline of the polygon with the provided brush at the provided thickness.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.

using SixLabors.ImageSharp.Drawing.Text;

namespace SixLabors.ImageSharp.Drawing.Processing;

/// <summary>
Expand All @@ -14,7 +16,7 @@ public static class FillPathCollectionExtensions
/// <param name="source">The source image processing context.</param>
/// <param name="options">The graphics options.</param>
/// <param name="brush">The brush.</param>
/// <param name="paths">The shapes.</param>
/// <param name="paths">The collection of paths.</param>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Fill(
this IImageProcessingContext source,
Expand All @@ -30,12 +32,120 @@ public static IImageProcessingContext Fill(
return source;
}

/// <summary>
/// Flood fills the image in the shape of the provided glyphs with the specified brush and pen.
/// For multi-layer glyphs, a heuristic is used to decide whether to fill or stroke each layer.
/// </summary>
/// <param name="source">The source image processing context.</param>
/// <param name="options">The graphics options.</param>
/// <param name="brush">The brush.</param>
/// <param name="pen">The pen.</param>
/// <param name="paths">The collection of glyph paths.</param>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Fill(
this IImageProcessingContext source,
DrawingOptions options,
Brush brush,
Pen pen,
IReadOnlyList<GlyphPathCollection> paths)
=> source.Fill(options, brush, pen, paths, static (gp, layer, path) =>
{
if (layer.Kind == GlyphLayerKind.Decoration)
{
// Decorations (underlines, strikethroughs, etc) are always filled.
return true;
}

if (layer.Kind == GlyphLayerKind.Glyph)
{
// Standard glyph layers are filled by default.
return true;
}

// Default heuristic: stroke "background-like" layers (large coverage), fill others.
// Use the bounding box area as an approximation of the glyph area as it is cheaper to compute.
float glyphArea = gp.Bounds.Width * gp.Bounds.Height;
float layerArea = path.ComputeArea();

if (layerArea <= 0 || glyphArea <= 0)
{
return false; // degenerate glyph, don't fill
}

float coverage = layerArea / glyphArea;

// <50% coverage, fill. Otherwise, stroke.
return coverage < 0.50F;
});

/// <summary>
/// Flood fills the image in the shape of the provided glyphs with the specified brush and pen.
/// For multi-layer glyphs, a heuristic is used to decide whether to fill or stroke each layer.
/// </summary>
/// <param name="source">The source image processing context.</param>
/// <param name="options">The graphics options.</param>
/// <param name="brush">The brush.</param>
/// <param name="pen">The pen.</param>
/// <param name="paths">The collection of glyph paths.</param>
/// <param name="shouldFillLayer">
/// A function that decides whether to fill or stroke a given layer within a multi-layer (painted) glyph.
/// </param>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Fill(
this IImageProcessingContext source,
DrawingOptions options,
Brush brush,
Pen pen,
IReadOnlyList<GlyphPathCollection> paths,
Func<GlyphPathCollection, GlyphLayerInfo, IPath, bool> shouldFillLayer)
{
foreach (GlyphPathCollection gp in paths)
{
if (gp.LayerCount == 0)
{
continue;
}

if (gp.LayerCount == 1)
{
// Single-layer glyph: just fill with the supplied brush.
source.Fill(options, brush, gp.Paths);
continue;
}

// Multi-layer: decide per layer whether to fill or stroke.
for (int i = 0; i < gp.Layers.Count; i++)
{
GlyphLayerInfo layer = gp.Layers[i];
IPath path = gp.PathList[i];

if (shouldFillLayer(gp, layer, path))
{
// Respect the layer's fill rule if different to the drawing options.
DrawingOptions o = options.CloneOrReturnForRules(
layer.IntersectionRule,
layer.PixelAlphaCompositionMode,
layer.PixelColorBlendingMode);

source.Fill(o, brush, path);
}
else
{
// Outline only to preserve interior detail.
source.Draw(options, pen, path);
}
}
}

return source;
}

/// <summary>
/// Flood fills the image in the shape of the provided polygon with the specified brush.
/// </summary>
/// <param name="source">The source image processing context.</param>
/// <param name="brush">The brush.</param>
/// <param name="paths">The paths.</param>
/// <param name="paths">The collection of paths.</param>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Fill(
this IImageProcessingContext source,
Expand All @@ -44,7 +154,23 @@ public static IImageProcessingContext Fill(
source.Fill(source.GetDrawingOptions(), brush, paths);

/// <summary>
/// Flood fills the image in the shape of the provided polygon with the specified brush.
/// Flood fills the image in the shape of the provided glyphs with the specified brush and pen.
/// For multi-layer glyphs, a heuristic is used to decide whether to fill or stroke each layer.
/// </summary>
/// <param name="source">The source image processing context.</param>
/// <param name="brush">The brush.</param>
/// <param name="pen">The pen.</param>
/// <param name="paths">The collection of glyph paths.</param>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Fill(
this IImageProcessingContext source,
Brush brush,
Pen pen,
IReadOnlyList<GlyphPathCollection> paths) =>
source.Fill(source.GetDrawingOptions(), brush, pen, paths);

/// <summary>
/// Flood fills the image in the shape of the provided polygon with the specified color.
/// </summary>
/// <param name="source">The source image processing context.</param>
/// <param name="options">The options.</param>
Expand All @@ -59,15 +185,29 @@ public static IImageProcessingContext Fill(
source.Fill(options, new SolidBrush(color), paths);

/// <summary>
/// Flood fills the image in the shape of the provided polygon with the specified brush.
/// Flood fills the image in the shape of the provided polygon with the specified color.
/// </summary>
/// <param name="source">The source image processing context.</param>
/// <param name="color">The color.</param>
/// <param name="paths">The paths.</param>
/// <param name="paths">The collection of paths.</param>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Fill(
this IImageProcessingContext source,
Color color,
IPathCollection paths) =>
source.Fill(new SolidBrush(color), paths);

/// <summary>
/// Flood fills the image in the shape of the provided glyphs with the specified color.
/// For multi-layer glyphs, a heuristic is used to decide whether to fill or stroke each layer.
/// </summary>
/// <param name="source">The source image processing context.</param>
/// <param name="color">The color.</param>
/// <param name="paths">The collection of glyph paths.</param>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Fill(
this IImageProcessingContext source,
Color color,
IReadOnlyList<GlyphPathCollection> paths) =>
source.Fill(new SolidBrush(color), new SolidPen(color), paths);
}
Loading
Loading