Skip to content

Commit 315db72

Browse files
committed
Renamed RePage to ResetPage.
1 parent ac0b36f commit 315db72

File tree

6 files changed

+41
-39
lines changed

6 files changed

+41
-39
lines changed

src/Magick.NET.Core/IMagickImage.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,17 +1186,17 @@ public partial interface IMagickImage : IDisposable
11861186
void CopyPixels(IMagickImage source, IMagickGeometry geometry, int x, int y, Channels channels);
11871187

11881188
/// <summary>
1189-
/// Crop image (subregion of original image). RePage should be called unless the Page information
1190-
/// is needed.
1189+
/// Crop image (subregion of original image). <see cref="ResetPage"/> should be called unless
1190+
/// the <see cref="Page"/> information is needed.
11911191
/// </summary>
11921192
/// <param name="width">The width of the subregion to crop.</param>
11931193
/// <param name="height">The height of the subregion to crop.</param>
11941194
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
11951195
void Crop(uint width, uint height);
11961196

11971197
/// <summary>
1198-
/// Crop image (subregion of original image). RePage should be called unless the Page information
1199-
/// is needed.
1198+
/// Crop image (subregion of original image). <see cref="ResetPage"/> should be called unless
1199+
/// the <see cref="Page"/> information is needed.
12001200
/// </summary>
12011201
/// <param name="width">The width of the subregion to crop.</param>
12021202
/// <param name="height">The height of the subregion to crop.</param>
@@ -1205,16 +1205,16 @@ public partial interface IMagickImage : IDisposable
12051205
void Crop(uint width, uint height, Gravity gravity);
12061206

12071207
/// <summary>
1208-
/// Crop image (subregion of original image). RePage should be called unless the Page information
1209-
/// is needed.
1208+
/// Crop image (subregion of original image). <see cref="ResetPage"/> should be called unless
1209+
/// the <see cref="Page"/> information is needed.
12101210
/// </summary>
12111211
/// <param name="geometry">The subregion to crop.</param>
12121212
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
12131213
void Crop(IMagickGeometry geometry);
12141214

12151215
/// <summary>
1216-
/// Crop image (subregion of original image). RePage should be called unless the Page information
1217-
/// is needed.
1216+
/// Crop image (subregion of original image). <see cref="ResetPage"/> should be called unless
1217+
/// the <see cref="Page"/> information is needed.
12181218
/// </summary>
12191219
/// <param name="geometry">The subregion to crop.</param>
12201220
/// <param name="gravity">The position where the cropping should start from.</param>
@@ -2607,12 +2607,6 @@ public partial interface IMagickImage : IDisposable
26072607
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
26082608
void RemoveWriteMask();
26092609

2610-
/// <summary>
2611-
/// Resets the page property of this image.
2612-
/// </summary>
2613-
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
2614-
void RePage();
2615-
26162610
/// <summary>
26172611
/// Resize image in terms of its pixel size.
26182612
/// </summary>
@@ -2628,6 +2622,12 @@ public partial interface IMagickImage : IDisposable
26282622
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
26292623
void Resample(PointD density);
26302624

2625+
/// <summary>
2626+
/// Resets the page property of this image.
2627+
/// </summary>
2628+
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
2629+
void ResetPage();
2630+
26312631
/// <summary>
26322632
/// Resize image to specified size.
26332633
/// <para />

src/Magick.NET.Core/IMagickImageCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ public partial interface IMagickImageCollection : IDisposable
362362
/// Resets the page property of every image in the collection.
363363
/// </summary>
364364
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
365-
void RePage();
365+
void ResetPage();
366366

367367
/// <summary>
368368
/// Reverses the order of the images in the collection.

src/Magick.NET/MagickImage.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2280,8 +2280,8 @@ public void CopyPixels(IMagickImage source, IMagickGeometry geometry, int x, int
22802280
}
22812281

22822282
/// <summary>
2283-
/// Crop image (subregion of original image). RePage should be called unless the Page information
2284-
/// is needed.
2283+
/// Crop image (subregion of original image). <see cref="ResetPage"/> should be called unless
2284+
/// the <see cref="Page"/> information is needed.
22852285
/// </summary>
22862286
/// <param name="width">The width of the subregion to crop.</param>
22872287
/// <param name="height">The height of the subregion to crop.</param>
@@ -2290,8 +2290,8 @@ public void Crop(uint width, uint height)
22902290
=> Crop(width, height, Gravity.Undefined);
22912291

22922292
/// <summary>
2293-
/// Crop image (subregion of original image). RePage should be called unless the Page information
2294-
/// is needed.
2293+
/// Crop image (subregion of original image). <see cref="ResetPage"/> should be called unless
2294+
/// the <see cref="Page"/> information is needed.
22952295
/// </summary>
22962296
/// <param name="width">The width of the subregion to crop.</param>
22972297
/// <param name="height">The height of the subregion to crop.</param>
@@ -2301,17 +2301,17 @@ public void Crop(uint width, uint height, Gravity gravity)
23012301
=> Crop(new MagickGeometry(0, 0, width, height), gravity);
23022302

23032303
/// <summary>
2304-
/// Crop image (subregion of original image). RePage should be called unless the Page information
2305-
/// is needed.
2304+
/// Crop image (subregion of original image). <see cref="ResetPage"/> should be called unless
2305+
/// the <see cref="Page"/> information is needed.
23062306
/// </summary>
23072307
/// <param name="geometry">The subregion to crop.</param>
23082308
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
23092309
public void Crop(IMagickGeometry geometry)
23102310
=> Crop(geometry, Gravity.Undefined);
23112311

23122312
/// <summary>
2313-
/// Crop image (subregion of original image). RePage should be called unless the Page information
2314-
/// is needed.
2313+
/// Crop image (subregion of original image). <see cref="ResetPage"/> should be called unless
2314+
/// the <see cref="Page"/> information is needed.
23152315
/// </summary>
23162316
/// <param name="geometry">The subregion to crop.</param>
23172317
/// <param name="gravity">The position where the cropping should start from.</param>
@@ -5144,13 +5144,6 @@ public void RemoveReadMask()
51445144
public void RemoveWriteMask()
51455145
=> _nativeInstance.SetWriteMask(null);
51465146

5147-
/// <summary>
5148-
/// Resets the page property of this image.
5149-
/// </summary>
5150-
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
5151-
public void RePage()
5152-
=> Page = new MagickGeometry(0, 0, 0, 0);
5153-
51545147
/// <summary>
51555148
/// Resize image in terms of its pixel size.
51565149
/// </summary>
@@ -5168,6 +5161,13 @@ public void Resample(double resolutionX, double resolutionY)
51685161
public void Resample(PointD density)
51695162
=> Resample(density.X, density.Y);
51705163

5164+
/// <summary>
5165+
/// Resets the page property of this image.
5166+
/// </summary>
5167+
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
5168+
public void ResetPage()
5169+
=> Page = new MagickGeometry(0, 0, 0, 0);
5170+
51715171
/// <summary>
51725172
/// Resize image to specified size.
51735173
/// <para />

src/Magick.NET/MagickImageCollection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,11 +1266,11 @@ public void RemoveAt(int index)
12661266
/// Resets the page property of every image in the collection.
12671267
/// </summary>
12681268
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
1269-
public void RePage()
1269+
public void ResetPage()
12701270
{
12711271
foreach (var image in _images)
12721272
{
1273-
image.RePage();
1273+
image.ResetPage();
12741274
}
12751275
}
12761276

tests/Magick.NET.Tests/MagickImageCollectionTests/TheRePageMethod.cs renamed to tests/Magick.NET.Tests/MagickImageCollectionTests/TheResetPageMethod.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Magick.NET.Tests;
88

99
public partial class MagickImageCollectionTests
1010
{
11-
public class TheRePageMethod
11+
public class TheResetPageMethod
1212
{
1313
[Fact]
1414
public void ShouldResetThePagePropertyOfAllTheImages()
@@ -25,7 +25,7 @@ public void ShouldResetThePagePropertyOfAllTheImages()
2525
Assert.Equal(50, images[2].Page.X);
2626
Assert.Equal(60, images[2].Page.Y);
2727

28-
images.RePage();
28+
images.ResetPage();
2929

3030
Assert.Equal(0, images[0].Page.X);
3131
Assert.Equal(0, images[0].Page.Y);
@@ -38,13 +38,15 @@ public void ShouldResetThePagePropertyOfAllTheImages()
3838
[Fact]
3939
public void ShouldNotChangeThePageSettings()
4040
{
41-
using var images = new MagickImageCollection();
42-
images.Add(new MagickImage(MagickColors.Purple, 1, 1));
41+
using var images = new MagickImageCollection
42+
{
43+
new MagickImage(MagickColors.Purple, 1, 1),
44+
};
4345

4446
images[0].Page = new MagickGeometry("0x0+10+20");
4547
images[0].Settings.Page = new MagickGeometry("0x0+10+20");
4648

47-
images.RePage();
49+
images.ResetPage();
4850

4951
Assert.Equal(0, images[0].Page.X);
5052
Assert.Equal(0, images[0].Page.Y);

tests/Magick.NET.Tests/MagickImageTests/TheCloneMethod.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void ShouldCloneUsingTheSpecifiedOffset()
6161
using var icon = new MagickImage(Files.MagickNETIconPNG);
6262
using var area = icon.Clone();
6363
area.Crop(64, 64, Gravity.Southeast);
64-
area.RePage();
64+
area.ResetPage();
6565
area.Crop(64, 32, Gravity.North);
6666

6767
using var part = icon.Clone(64, 64, 64, 32);
@@ -81,7 +81,7 @@ public void ShouldCloneTheSpecifiedGeometry()
8181
using var icon = new MagickImage(Files.MagickNETIconPNG);
8282
using var area = icon.Clone();
8383
area.Crop(64, 64, Gravity.Southeast);
84-
area.RePage();
84+
area.ResetPage();
8585
area.Crop(64, 32, Gravity.North);
8686

8787
using var part = icon.Clone(new MagickGeometry(64, 64, 64, 32));

0 commit comments

Comments
 (0)