Skip to content

Commit d4bb696

Browse files
committed
Moved HoughLine to IMagickImageCreateOperations.
1 parent b3f2293 commit d4bb696

File tree

5 files changed

+30
-19
lines changed

5 files changed

+30
-19
lines changed

src/Magick.NET.Core/IMagickImage.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,21 +1135,6 @@ public partial interface IMagickImage : IMagickImageCreateOperations, IDisposabl
11351135
/// <returns>A value indicating whether a profile with the specified name already exists on the image.</returns>
11361136
bool HasProfile(string name);
11371137

1138-
/// <summary>
1139-
/// Identifies lines in the image.
1140-
/// </summary>
1141-
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
1142-
void HoughLine();
1143-
1144-
/// <summary>
1145-
/// Identifies lines in the image.
1146-
/// </summary>
1147-
/// <param name="width">The width of the neighborhood.</param>
1148-
/// <param name="height">The height of the neighborhood.</param>
1149-
/// <param name="threshold">The line count threshold.</param>
1150-
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
1151-
void HoughLine(uint width, uint height, uint threshold);
1152-
11531138
/// <summary>
11541139
/// Implode image (special effect).
11551140
/// </summary>

src/Magick.NET.Core/IMagickImageCreateOperations.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,21 @@ public interface IMagickImageCreateOperations
569569
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
570570
void GaussianBlur(double radius, double sigma, Channels channels);
571571

572+
/// <summary>
573+
/// Identifies lines in the image.
574+
/// </summary>
575+
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
576+
void HoughLine();
577+
578+
/// <summary>
579+
/// Identifies lines in the image.
580+
/// </summary>
581+
/// <param name="width">The width of the neighborhood.</param>
582+
/// <param name="height">The height of the neighborhood.</param>
583+
/// <param name="threshold">The line count threshold.</param>
584+
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
585+
void HoughLine(uint width, uint height, uint threshold);
586+
572587
/// <summary>
573588
/// Resize image to specified size.
574589
/// <para />

src/Magick.NET/MagickImage.CloneMutator.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,12 @@ public void GaussianBlur(double radius, double sigma)
329329
public void GaussianBlur(double radius, double sigma, Channels channels)
330330
=> SetResult(NativeMagickImage.GaussianBlur(radius, sigma, channels));
331331

332+
public void HoughLine()
333+
=> HoughLine(0, 0, 40);
334+
335+
public void HoughLine(uint width, uint height, uint threshold)
336+
=> SetResult(NativeMagickImage.HoughLine(width, height, threshold));
337+
332338
public void Resize(uint width, uint height)
333339
=> Resize(new MagickGeometry(width, height));
334340

src/Magick.NET/MagickImage.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3387,7 +3387,10 @@ public IReadOnlyDictionary<IMagickColor<QuantumType>, uint> Histogram()
33873387
/// </summary>
33883388
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
33893389
public void HoughLine()
3390-
=> HoughLine(0, 0, 40);
3390+
{
3391+
using var mutator = new Mutator(_nativeInstance);
3392+
mutator.HoughLine();
3393+
}
33913394

33923395
/// <summary>
33933396
/// Identifies lines in the image.
@@ -3397,7 +3400,10 @@ public void HoughLine()
33973400
/// <param name="threshold">The line count threshold.</param>
33983401
/// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
33993402
public void HoughLine(uint width, uint height, uint threshold)
3400-
=> _nativeInstance.HoughLine(width, height, threshold);
3403+
{
3404+
using var mutator = new Mutator(_nativeInstance);
3405+
mutator.HoughLine(width, height, threshold);
3406+
}
34013407

34023408
/// <summary>
34033409
/// Implode image (special effect).

src/Magick.NET/Native/MagickImage.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,7 @@ private unsafe sealed partial class NativeMagickImage : NativeInstance, INativeM
475475
public partial IntPtr Histogram(out nuint length);
476476

477477
[Throws]
478-
[SetInstance]
479-
public partial void HoughLine(nuint width, nuint height, nuint threshold);
478+
public partial IntPtr HoughLine(nuint width, nuint height, nuint threshold);
480479

481480
[Throws]
482481
[SetInstance]

0 commit comments

Comments
 (0)