Skip to content

Commit

Permalink
Merge pull request #507 from SixLabors/af/update-beta3-dependencies
Browse files Browse the repository at this point in the history
update external dependencies + fix RectangularPolygon usages
  • Loading branch information
JimBobSquarePants authored Mar 27, 2018
2 parents 72961b1 + 7d53c38 commit a98fd0e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/ImageSharp.Drawing/ImageSharp.Drawing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
<ProjectReference Include="..\ImageSharp\ImageSharp.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SixLabors.Core" Version="1.0.0-ci0005" />
<PackageReference Include="SixLabors.Shapes.Text" Version="1.0.0-ci0005" />
<PackageReference Include="SixLabors.Shapes" Version="1.0.0-ci0005" />
<PackageReference Include="SixLabors.Core" Version="1.0.0-beta0005" />
<PackageReference Include="SixLabors.Shapes" Version="1.0.0-beta0004" />
<PackageReference Include="SixLabors.Shapes.Text" Version="1.0.0-beta0004" />
<AdditionalFiles Include="..\..\stylecop.json" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004">
<PrivateAssets>All</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static class DrawRectangleExtensions
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
public static IImageProcessingContext<TPixel> Draw<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, IPen<TPixel> pen, RectangleF shape)
where TPixel : struct, IPixel<TPixel>
=> source.Draw(options, pen, new RectangularePolygon(shape.X, shape.Y, shape.Width, shape.Height));
=> source.Draw(options, pen, new RectangularPolygon(shape.X, shape.Y, shape.Width, shape.Height));

/// <summary>
/// Draws the outline of the rectangle with the provided pen.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static class FillRectangleExtensions
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
public static IImageProcessingContext<TPixel> Fill<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, IBrush<TPixel> brush, RectangleF shape)
where TPixel : struct, IPixel<TPixel>
=> source.Fill(options, brush, new RectangularePolygon(shape.X, shape.Y, shape.Width, shape.Height));
=> source.Fill(options, brush, new RectangularPolygon(shape.X, shape.Y, shape.Width, shape.Height));

/// <summary>
/// Flood fills the image in the shape of the provided rectangle with the specified brush.
Expand All @@ -36,7 +36,7 @@ public static IImageProcessingContext<TPixel> Fill<TPixel>(this IImageProcessing
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
public static IImageProcessingContext<TPixel> Fill<TPixel>(this IImageProcessingContext<TPixel> source, IBrush<TPixel> brush, RectangleF shape)
where TPixel : struct, IPixel<TPixel>
=> source.Fill(brush, new RectangularePolygon(shape.X, shape.Y, shape.Width, shape.Height));
=> source.Fill(brush, new RectangularPolygon(shape.X, shape.Y, shape.Width, shape.Height));

/// <summary>
/// Flood fills the image in the shape of the provided rectangle with the specified brush.
Expand Down
2 changes: 1 addition & 1 deletion src/ImageSharp/ImageSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<Compile Include="..\Shared\*.cs" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SixLabors.Core" Version="1.0.0-ci0005" />
<PackageReference Include="SixLabors.Core" Version="1.0.0-beta0005" />
<AdditionalFiles Include="..\..\stylecop.json" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta006">
<PrivateAssets>All</PrivateAssets>
Expand Down
8 changes: 4 additions & 4 deletions tests/ImageSharp.Tests/Drawing/Paths/FillRectangle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void CorrectlySetsBrushAndRectangle()
Assert.Equal(GraphicsOptions.Default, processor.Options);

ShapeRegion region = Assert.IsType<ShapeRegion>(processor.Region);
Shapes.RectangularePolygon rect = Assert.IsType<Shapes.RectangularePolygon>(region.Shape);
Shapes.RectangularPolygon rect = Assert.IsType<Shapes.RectangularPolygon>(region.Shape);
Assert.Equal(rect.Location.X, this.rectangle.X);
Assert.Equal(rect.Location.Y, this.rectangle.Y);
Assert.Equal(rect.Size.Width, this.rectangle.Width);
Expand All @@ -44,7 +44,7 @@ public void CorrectlySetsBrushRectangleAndOptions()
Assert.Equal(this.noneDefault, processor.Options);

ShapeRegion region = Assert.IsType<ShapeRegion>(processor.Region);
Shapes.RectangularePolygon rect = Assert.IsType<Shapes.RectangularePolygon>(region.Shape);
Shapes.RectangularPolygon rect = Assert.IsType<Shapes.RectangularPolygon>(region.Shape);
Assert.Equal(rect.Location.X, this.rectangle.X);
Assert.Equal(rect.Location.Y, this.rectangle.Y);
Assert.Equal(rect.Size.Width, this.rectangle.Width);
Expand All @@ -62,7 +62,7 @@ public void CorrectlySetsColorAndRectangle()
Assert.Equal(GraphicsOptions.Default, processor.Options);

ShapeRegion region = Assert.IsType<ShapeRegion>(processor.Region);
Shapes.RectangularePolygon rect = Assert.IsType<Shapes.RectangularePolygon>(region.Shape);
Shapes.RectangularPolygon rect = Assert.IsType<Shapes.RectangularPolygon>(region.Shape);
Assert.Equal(rect.Location.X, this.rectangle.X);
Assert.Equal(rect.Location.Y, this.rectangle.Y);
Assert.Equal(rect.Size.Width, this.rectangle.Width);
Expand All @@ -81,7 +81,7 @@ public void CorrectlySetsColorRectangleAndOptions()
Assert.Equal(this.noneDefault, processor.Options);

ShapeRegion region = Assert.IsType<ShapeRegion>(processor.Region);
Shapes.RectangularePolygon rect = Assert.IsType<Shapes.RectangularePolygon>(region.Shape);
Shapes.RectangularPolygon rect = Assert.IsType<Shapes.RectangularPolygon>(region.Shape);
Assert.Equal(rect.Location.X, this.rectangle.X);
Assert.Equal(rect.Location.Y, this.rectangle.Y);
Assert.Equal(rect.Size.Width, this.rectangle.Width);
Expand Down
2 changes: 1 addition & 1 deletion tests/ImageSharp.Tests/Drawing/SolidPolygonTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void ImageShouldBeOverlayedByFilledRectangle()
{
image.Mutate(x => x
.BackgroundColor(Rgba32.Blue)
.Fill(Rgba32.HotPink, new SixLabors.Shapes.RectangularePolygon(10, 10, 190, 140)));
.Fill(Rgba32.HotPink, new SixLabors.Shapes.RectangularPolygon(10, 10, 190, 140)));
image.Save($"{path}/Rectangle.png");

using (PixelAccessor<Rgba32> sourcePixels = image.Lock())
Expand Down

0 comments on commit a98fd0e

Please sign in to comment.