Skip to content

Commit 45c2a26

Browse files
committed
fix some analyzer complaints on var
1 parent 5511873 commit 45c2a26

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/ImageSharp.Drawing/Processing/DrawingOptionsDefaultsExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static Matrix3x2 GetDrawingTransform(this IImageProcessingContext context
5555
return go;
5656
}
5757

58-
var matrix = context.Configuration.GetDrawingTransform();
58+
Matrix3x2 matrix = context.Configuration.GetDrawingTransform();
5959

6060
// do not cache the fall back to config into the processing context
6161
// in case someone want to change the value on the config and expects it re-flow thru.

src/ImageSharp.Drawing/Processing/Extensions/ClearPathExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static class ClearPathExtensions
1818
/// <returns>A clone of shapeOptions with ColorBlendingMode, AlphaCompositionMode, and BlendPercentage set</returns>
1919
internal static DrawingOptions CloneForClearOperation(this DrawingOptions shapeOptions)
2020
{
21-
var options = shapeOptions.GraphicsOptions.DeepClone();
21+
GraphicsOptions options = shapeOptions.GraphicsOptions.DeepClone();
2222
options.ColorBlendingMode = PixelFormats.PixelColorBlendingMode.Normal;
2323
options.AlphaCompositionMode = PixelFormats.PixelAlphaCompositionMode.Src;
2424
options.BlendPercentage = 1;

src/ImageSharp.Drawing/Processing/Processors/Drawing/FillPathProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public FillPathProcessor(DrawingOptions options, IBrush brush, IPath shape)
4545
public IImageProcessor<TPixel> CreatePixelSpecificProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle)
4646
where TPixel : unmanaged, IPixel<TPixel>
4747
{
48-
var shape = this.Shape.Transform(this.Options.Transform);
48+
IPath shape = this.Shape.Transform(this.Options.Transform);
4949

5050
if (shape is RectangularPolygon rectPoly)
5151
{

src/ImageSharp.Drawing/Processing/Processors/Text/DrawTextProcessor{TPixel}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ public void EndGlyph()
377377

378378
private Buffer2D<float> Render(IPath path)
379379
{
380-
var size = Rectangle.Ceiling(new RectangularPolygon(path.Bounds)
380+
Size size = Rectangle.Ceiling(new RectangularPolygon(path.Bounds)
381381
.Transform(this.Options.Transform)
382382
.Bounds)
383383
.Size;

0 commit comments

Comments
 (0)