Skip to content

Commit d617c40

Browse files
committed
Revert "Fix warnings"
This reverts commit 2b7fec7.
1 parent 2b7fec7 commit d617c40

21 files changed

Lines changed: 76 additions & 75 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.Drawing
15+
namespace SixLabors.ImageSharp.Drawing.Benchmarks
1616
{
1717
public class DrawBeziers
1818
{

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

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

19-
namespace SixLabors.ImageSharp.Drawing.Benchmarks.Drawing
20+
namespace SixLabors.ImageSharp.Drawing.Benchmarks
2021
{
2122
public abstract class DrawPolygon
2223
{
@@ -25,7 +26,7 @@ public abstract class DrawPolygon
2526
private Image<Rgba32> image;
2627

2728
private SDPointF[][] sdPoints;
28-
private Bitmap sdBitmap;
29+
private System.Drawing.Bitmap sdBitmap;
2930
private Graphics sdGraphics;
3031

3132
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.Drawing
16+
namespace SixLabors.ImageSharp.Drawing.Benchmarks
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 SDBitmap(Width, Height);
45+
this.sdBitmap = new Bitmap(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.Drawing
14+
namespace SixLabors.ImageSharp.Drawing.Benchmarks
1515
{
1616
[MemoryDiagnoser]
1717
public class DrawTextOutline

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

Lines changed: 4 additions & 7 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.Drawing
9+
namespace SixLabors.ImageSharp.Drawing.Benchmarks
1010
{
1111
public class FillPathGradientBrush
1212
{
@@ -23,11 +23,8 @@ public void FillGradientBrush_ImageSharp()
2323
{
2424
var star = new Star(50, 50, 5, 20, 45);
2525
PointF[] points = star.Points.ToArray();
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-
};
26+
Color[] colors = { Color.Red, Color.Yellow, Color.Green, Color.Blue, Color.Purple,
27+
Color.Red, Color.Yellow, Color.Green, Color.Blue, Color.Purple };
3128

3229
var brush = new PathGradientBrush(points, colors, Color.White);
3330

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.Drawing
21+
namespace SixLabors.ImageSharp.Drawing.Benchmarks
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.Drawing
15+
namespace SixLabors.ImageSharp.Drawing.Benchmarks
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.Drawing
14+
namespace SixLabors.ImageSharp.Drawing.Benchmarks
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.Shapes
9+
namespace SixLabors.ImageSharp.Drawing.Tests
1010
{
1111
public class BezierLineSegmentTests
1212
{

0 commit comments

Comments
 (0)