@@ -2774,7 +2774,10 @@ public void Evaluate(Channels channels, IMagickGeometry geometry, EvaluateOperat
27742774 /// <param name="height">The height to extend the image to.</param>
27752775 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
27762776 public void Extent ( uint width , uint height )
2777- => Extent ( new MagickGeometry ( width , height ) ) ;
2777+ {
2778+ using var mutator = new Mutator ( _nativeInstance ) ;
2779+ mutator . Extent ( width , height ) ;
2780+ }
27782781
27792782 /// <summary>
27802783 /// Extend the image as defined by the width and height.
@@ -2785,7 +2788,10 @@ public void Extent(uint width, uint height)
27852788 /// <param name="height">The height to extend the image to.</param>
27862789 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
27872790 public void Extent ( int x , int y , uint width , uint height )
2788- => Extent ( new MagickGeometry ( x , y , width , height ) ) ;
2791+ {
2792+ using var mutator = new Mutator ( _nativeInstance ) ;
2793+ mutator . Extent ( x , y , width , height ) ;
2794+ }
27892795
27902796 /// <summary>
27912797 /// Extend the image as defined by the width and height.
@@ -2795,7 +2801,10 @@ public void Extent(int x, int y, uint width, uint height)
27952801 /// <param name="backgroundColor">The background color to use.</param>
27962802 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
27972803 public void Extent ( uint width , uint height , IMagickColor < QuantumType > backgroundColor )
2798- => Extent ( new MagickGeometry ( width , height ) , backgroundColor ) ;
2804+ {
2805+ using var mutator = new Mutator ( _nativeInstance ) ;
2806+ mutator . Extent ( width , height , backgroundColor ) ;
2807+ }
27992808
28002809 /// <summary>
28012810 /// Extend the image as defined by the width and height.
@@ -2805,7 +2814,10 @@ public void Extent(uint width, uint height, IMagickColor<QuantumType> background
28052814 /// <param name="gravity">The placement gravity.</param>
28062815 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
28072816 public void Extent ( uint width , uint height , Gravity gravity )
2808- => Extent ( new MagickGeometry ( width , height ) , gravity ) ;
2817+ {
2818+ using var mutator = new Mutator ( _nativeInstance ) ;
2819+ mutator . Extent ( width , height , gravity ) ;
2820+ }
28092821
28102822 /// <summary>
28112823 /// Extend the image as defined by the width and height.
@@ -2816,15 +2828,21 @@ public void Extent(uint width, uint height, Gravity gravity)
28162828 /// <param name="backgroundColor">The background color to use.</param>
28172829 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
28182830 public void Extent ( uint width , uint height , Gravity gravity , IMagickColor < QuantumType > backgroundColor )
2819- => Extent ( new MagickGeometry ( width , height ) , gravity , backgroundColor ) ;
2831+ {
2832+ using var mutator = new Mutator ( _nativeInstance ) ;
2833+ mutator . Extent ( width , height , gravity , backgroundColor ) ;
2834+ }
28202835
28212836 /// <summary>
28222837 /// Extend the image as defined by the rectangle.
28232838 /// </summary>
28242839 /// <param name="geometry">The geometry to extend the image to.</param>
28252840 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
28262841 public void Extent ( IMagickGeometry geometry )
2827- => Extent ( geometry , Gravity . Undefined ) ;
2842+ {
2843+ using var mutator = new Mutator ( _nativeInstance ) ;
2844+ mutator . Extent ( geometry ) ;
2845+ }
28282846
28292847 /// <summary>
28302848 /// Extend the image as defined by the geometry.
@@ -2834,10 +2852,8 @@ public void Extent(IMagickGeometry geometry)
28342852 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
28352853 public void Extent ( IMagickGeometry geometry , IMagickColor < QuantumType > backgroundColor )
28362854 {
2837- Throw . IfNull ( nameof ( backgroundColor ) , backgroundColor ) ;
2838-
2839- BackgroundColor = backgroundColor ;
2840- Extent ( geometry ) ;
2855+ using var mutator = new Mutator ( _nativeInstance ) ;
2856+ mutator . Extent ( geometry , backgroundColor ) ;
28412857 }
28422858
28432859 /// <summary>
@@ -2848,9 +2864,8 @@ public void Extent(IMagickGeometry geometry, IMagickColor<QuantumType> backgroun
28482864 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
28492865 public void Extent ( IMagickGeometry geometry , Gravity gravity )
28502866 {
2851- Throw . IfNull ( nameof ( geometry ) , geometry ) ;
2852-
2853- _nativeInstance . Extent ( geometry . ToString ( ) , gravity ) ;
2867+ using var mutator = new Mutator ( _nativeInstance ) ;
2868+ mutator . Extent ( geometry , gravity ) ;
28542869 }
28552870
28562871 /// <summary>
@@ -2862,10 +2877,8 @@ public void Extent(IMagickGeometry geometry, Gravity gravity)
28622877 /// <exception cref="MagickException">Thrown when an error is raised by ImageMagick.</exception>
28632878 public void Extent ( IMagickGeometry geometry , Gravity gravity , IMagickColor < QuantumType > backgroundColor )
28642879 {
2865- Throw . IfNull ( nameof ( backgroundColor ) , backgroundColor ) ;
2866-
2867- BackgroundColor = backgroundColor ;
2868- Extent ( geometry , gravity ) ;
2880+ using var mutator = new Mutator ( _nativeInstance ) ;
2881+ mutator . Extent ( geometry , gravity , backgroundColor ) ;
28692882 }
28702883
28712884 /// <summary>
0 commit comments