Skip to content

Commit 2b7fec7

Browse files
committed
Fix warnings
1 parent 5bbf20e commit 2b7fec7

21 files changed

Lines changed: 75 additions & 76 deletions

tests/ImageSharp.Drawing.Benchmarks/Drawing/DrawBeziers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
using SixLabors.ImageSharp.Processing;
1313
using SDPointF = System.Drawing.PointF;
1414

15-
namespace SixLabors.ImageSharp.Drawing.Benchmarks
15+
namespace SixLabors.ImageSharp.Drawing.Benchmarks.Drawing
1616
{
1717
public class DrawBeziers
1818
{

tests/ImageSharp.Drawing.Benchmarks/Drawing/DrawPolygon.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
using SixLabors.ImageSharp.PixelFormats;
1515
using SixLabors.ImageSharp.Processing;
1616
using SkiaSharp;
17-
using SDPoint = System.Drawing.Point;
1817
using SDPointF = System.Drawing.PointF;
1918

20-
namespace SixLabors.ImageSharp.Drawing.Benchmarks
19+
namespace SixLabors.ImageSharp.Drawing.Benchmarks.Drawing
2120
{
2221
public abstract class DrawPolygon
2322
{
@@ -26,7 +25,7 @@ public abstract class DrawPolygon
2625
private Image<Rgba32> image;
2726

2827
private SDPointF[][] sdPoints;
29-
private System.Drawing.Bitmap sdBitmap;
28+
private Bitmap sdBitmap;
3029
private Graphics sdGraphics;
3130

3231
private SKPath skPath;

tests/ImageSharp.Drawing.Benchmarks/Drawing/DrawText.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
using SDFont = System.Drawing.Font;
1414
using SDRectangleF = System.Drawing.RectangleF;
1515

16-
namespace SixLabors.ImageSharp.Drawing.Benchmarks
16+
namespace SixLabors.ImageSharp.Drawing.Benchmarks.Drawing
1717
{
1818
[MemoryDiagnoser]
1919
public class DrawText
@@ -42,7 +42,7 @@ public class DrawText
4242
public void Setup()
4343
{
4444
this.image = new Image<Rgba32>(Width, Height);
45-
this.sdBitmap = new Bitmap(Width, Height);
45+
this.sdBitmap = new SDBitmap(Width, Height);
4646
this.sdGraphics = Graphics.FromImage(this.sdBitmap);
4747
this.sdGraphics.InterpolationMode = InterpolationMode.Default;
4848
this.sdGraphics.SmoothingMode = SmoothingMode.AntiAlias;

tests/ImageSharp.Drawing.Benchmarks/Drawing/DrawTextOutline.cs

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

1212
using SDRectangleF = System.Drawing.RectangleF;
1313

14-
namespace SixLabors.ImageSharp.Drawing.Benchmarks
14+
namespace SixLabors.ImageSharp.Drawing.Benchmarks.Drawing
1515
{
1616
[MemoryDiagnoser]
1717
public class DrawTextOutline

tests/ImageSharp.Drawing.Benchmarks/Drawing/FillPathGradientBrush.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// Copyright (c) Six Labors.
1+
// Copyright (c) Six Labors.
22
// Licensed under the Apache License, Version 2.0.
33

44
using BenchmarkDotNet.Attributes;
55
using SixLabors.ImageSharp.Drawing.Processing;
66
using SixLabors.ImageSharp.PixelFormats;
77
using SixLabors.ImageSharp.Processing;
88

9-
namespace SixLabors.ImageSharp.Drawing.Benchmarks
9+
namespace SixLabors.ImageSharp.Drawing.Benchmarks.Drawing
1010
{
1111
public class FillPathGradientBrush
1212
{
@@ -23,8 +23,11 @@ public void FillGradientBrush_ImageSharp()
2323
{
2424
var star = new Star(50, 50, 5, 20, 45);
2525
PointF[] points = star.Points.ToArray();
26-
Color[] colors = { Color.Red, Color.Yellow, Color.Green, Color.Blue, Color.Purple,
27-
Color.Red, Color.Yellow, Color.Green, Color.Blue, Color.Purple };
26+
Color[] colors =
27+
{
28+
Color.Red, Color.Yellow, Color.Green, Color.Blue, Color.Purple,
29+
Color.Red, Color.Yellow, Color.Green, Color.Blue, Color.Purple
30+
};
2831

2932
var brush = new PathGradientBrush(points, colors, Color.White);
3033

tests/ImageSharp.Drawing.Benchmarks/Drawing/FillPolygon.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
using SDBitmap = System.Drawing.Bitmap;
1919
using SDPointF = System.Drawing.PointF;
2020

21-
namespace SixLabors.ImageSharp.Drawing.Benchmarks
21+
namespace SixLabors.ImageSharp.Drawing.Benchmarks.Drawing
2222
{
2323
public abstract class FillPolygon
2424
{

tests/ImageSharp.Drawing.Benchmarks/Drawing/FillRectangle.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
using SDRectangle = System.Drawing.Rectangle;
1313
using SDSize = System.Drawing.Size;
1414

15-
namespace SixLabors.ImageSharp.Drawing.Benchmarks
15+
namespace SixLabors.ImageSharp.Drawing.Benchmarks.Drawing
1616
{
1717
public class FillRectangle
1818
{

tests/ImageSharp.Drawing.Benchmarks/Drawing/FillWithPattern.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
using CoreBrushes = SixLabors.ImageSharp.Drawing.Processing.Brushes;
1212
using SDRectangle = System.Drawing.Rectangle;
1313

14-
namespace SixLabors.ImageSharp.Drawing.Benchmarks
14+
namespace SixLabors.ImageSharp.Drawing.Benchmarks.Drawing
1515
{
1616
public class FillWithPattern
1717
{

tests/ImageSharp.Drawing.Tests/Drawing/DrawingProfilingBenchmarks.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ static PointF[][] GetPoints(FeatureCollection features)
4646
[InlineData(IntersectionRule.Nonzero)]
4747
public void FillPolygon(IntersectionRule intersectionRule)
4848
{
49-
const int Times = 100;
49+
const int times = 100;
5050

51-
for (int i = 0; i < Times; i++)
51+
for (int i = 0; i < times; i++)
5252
{
5353
this.image.Mutate(c =>
5454
{
@@ -69,13 +69,13 @@ public void FillPolygon(IntersectionRule intersectionRule)
6969
[InlineData(10)]
7070
public void DrawText(int textIterations)
7171
{
72-
const int Times = 20;
73-
const string TextPhrase = "asdfghjkl123456789{}[]+$%?";
74-
string textToRender = string.Join("/n", Enumerable.Repeat(TextPhrase, textIterations));
72+
const int times = 20;
73+
const string textPhrase = "asdfghjkl123456789{}[]+$%?";
74+
string textToRender = string.Join("/n", Enumerable.Repeat(textPhrase, textIterations));
7575

7676
Font font = SystemFonts.CreateFont("Arial", 12);
7777

78-
for (int i = 0; i < Times; i++)
78+
for (int i = 0; i < times; i++)
7979
{
8080
this.image.Mutate(x => x
8181
.SetGraphicsOptions(o => o.Antialias = true)

tests/ImageSharp.Drawing.Tests/Shapes/BezierLineSegmentTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Numerics;
77
using Xunit;
88

9-
namespace SixLabors.ImageSharp.Drawing.Tests
9+
namespace SixLabors.ImageSharp.Drawing.Tests.Shapes
1010
{
1111
public class BezierLineSegmentTests
1212
{

0 commit comments

Comments
 (0)