Skip to content

Commit b895b6e

Browse files
Merge pull request #2329 from SixLabors/js/fix-docs-parameters
Normalize parameter documentation across all extension methods
2 parents 03cc807 + 42eb110 commit b895b6e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+386
-390
lines changed

src/ImageSharp/Processing/AdaptiveThresholdExtensions.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,61 +13,61 @@ public static class AdaptiveThresholdExtensions
1313
/// <summary>
1414
/// Applies Bradley Adaptive Threshold to the image.
1515
/// </summary>
16-
/// <param name="source">The image this method extends.</param>
17-
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
16+
/// <param name="source">The current image processing context.</param>
17+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
1818
public static IImageProcessingContext AdaptiveThreshold(this IImageProcessingContext source)
1919
=> source.ApplyProcessor(new AdaptiveThresholdProcessor());
2020

2121
/// <summary>
2222
/// Applies Bradley Adaptive Threshold to the image.
2323
/// </summary>
24-
/// <param name="source">The image this method extends.</param>
24+
/// <param name="source">The current image processing context.</param>
2525
/// <param name="thresholdLimit">Threshold limit (0.0-1.0) to consider for binarization.</param>
26-
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
26+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
2727
public static IImageProcessingContext AdaptiveThreshold(this IImageProcessingContext source, float thresholdLimit)
2828
=> source.ApplyProcessor(new AdaptiveThresholdProcessor(thresholdLimit));
2929

3030
/// <summary>
3131
/// Applies Bradley Adaptive Threshold to the image.
3232
/// </summary>
33-
/// <param name="source">The image this method extends.</param>
33+
/// <param name="source">The current image processing context.</param>
3434
/// <param name="upper">Upper (white) color for thresholding.</param>
3535
/// <param name="lower">Lower (black) color for thresholding.</param>
36-
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
36+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
3737
public static IImageProcessingContext AdaptiveThreshold(this IImageProcessingContext source, Color upper, Color lower)
3838
=> source.ApplyProcessor(new AdaptiveThresholdProcessor(upper, lower));
3939

4040
/// <summary>
4141
/// Applies Bradley Adaptive Threshold to the image.
4242
/// </summary>
43-
/// <param name="source">The image this method extends.</param>
43+
/// <param name="source">The current image processing context.</param>
4444
/// <param name="upper">Upper (white) color for thresholding.</param>
4545
/// <param name="lower">Lower (black) color for thresholding.</param>
4646
/// <param name="thresholdLimit">Threshold limit (0.0-1.0) to consider for binarization.</param>
47-
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
47+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
4848
public static IImageProcessingContext AdaptiveThreshold(this IImageProcessingContext source, Color upper, Color lower, float thresholdLimit)
4949
=> source.ApplyProcessor(new AdaptiveThresholdProcessor(upper, lower, thresholdLimit));
5050

5151
/// <summary>
5252
/// Applies Bradley Adaptive Threshold to the image.
5353
/// </summary>
54-
/// <param name="source">The image this method extends.</param>
54+
/// <param name="source">The current image processing context.</param>
5555
/// <param name="upper">Upper (white) color for thresholding.</param>
5656
/// <param name="lower">Lower (black) color for thresholding.</param>
5757
/// <param name="rectangle">Rectangle region to apply the processor on.</param>
58-
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
58+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
5959
public static IImageProcessingContext AdaptiveThreshold(this IImageProcessingContext source, Color upper, Color lower, Rectangle rectangle)
6060
=> source.ApplyProcessor(new AdaptiveThresholdProcessor(upper, lower), rectangle);
6161

6262
/// <summary>
6363
/// Applies Bradley Adaptive Threshold to the image.
6464
/// </summary>
65-
/// <param name="source">The image this method extends.</param>
65+
/// <param name="source">The current image processing context.</param>
6666
/// <param name="upper">Upper (white) color for thresholding.</param>
6767
/// <param name="lower">Lower (black) color for thresholding.</param>
6868
/// <param name="thresholdLimit">Threshold limit (0.0-1.0) to consider for binarization.</param>
6969
/// <param name="rectangle">Rectangle region to apply the processor on.</param>
70-
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
70+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
7171
public static IImageProcessingContext AdaptiveThreshold(this IImageProcessingContext source, Color upper, Color lower, float thresholdLimit, Rectangle rectangle)
7272
=> source.ApplyProcessor(new AdaptiveThresholdProcessor(upper, lower, thresholdLimit), rectangle);
7373
}

src/ImageSharp/Processing/Extensions/Binarization/BinaryDitherExtensions.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ public static class BinaryDitherExtensions
1414
/// <summary>
1515
/// Dithers the image reducing it to two colors using ordered dithering.
1616
/// </summary>
17-
/// <param name="source">The image this method extends.</param>
17+
/// <param name="source">The current image processing context.</param>
1818
/// <param name="dither">The ordered ditherer.</param>
19-
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
19+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
2020
public static IImageProcessingContext
2121
BinaryDither(this IImageProcessingContext source, IDither dither) =>
2222
BinaryDither(source, dither, Color.White, Color.Black);
2323

2424
/// <summary>
2525
/// Dithers the image reducing it to two colors using ordered dithering.
2626
/// </summary>
27-
/// <param name="source">The image this method extends.</param>
27+
/// <param name="source">The current image processing context.</param>
2828
/// <param name="dither">The ordered ditherer.</param>
2929
/// <param name="upperColor">The color to use for pixels that are above the threshold.</param>
3030
/// <param name="lowerColor">The color to use for pixels that are below the threshold</param>
31-
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
31+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
3232
public static IImageProcessingContext BinaryDither(
3333
this IImageProcessingContext source,
3434
IDither dither,
@@ -39,12 +39,12 @@ public static IImageProcessingContext BinaryDither(
3939
/// <summary>
4040
/// Dithers the image reducing it to two colors using ordered dithering.
4141
/// </summary>
42-
/// <param name="source">The image this method extends.</param>
42+
/// <param name="source">The current image processing context.</param>
4343
/// <param name="dither">The ordered ditherer.</param>
4444
/// <param name="rectangle">
4545
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
4646
/// </param>
47-
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
47+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
4848
public static IImageProcessingContext BinaryDither(
4949
this IImageProcessingContext source,
5050
IDither dither,
@@ -54,14 +54,14 @@ public static IImageProcessingContext BinaryDither(
5454
/// <summary>
5555
/// Dithers the image reducing it to two colors using ordered dithering.
5656
/// </summary>
57-
/// <param name="source">The image this method extends.</param>
57+
/// <param name="source">The current image processing context.</param>
5858
/// <param name="dither">The ordered ditherer.</param>
5959
/// <param name="upperColor">The color to use for pixels that are above the threshold.</param>
6060
/// <param name="lowerColor">The color to use for pixels that are below the threshold</param>
6161
/// <param name="rectangle">
6262
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
6363
/// </param>
64-
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
64+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
6565
public static IImageProcessingContext BinaryDither(
6666
this IImageProcessingContext source,
6767
IDither dither,

src/ImageSharp/Processing/Extensions/Binarization/BinaryThresholdExtensions.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ public static class BinaryThresholdExtensions
1515
/// Applies binarization to the image splitting the pixels at the given threshold with
1616
/// Luminance as the color component to be compared to threshold.
1717
/// </summary>
18-
/// <param name="source">The image this method extends.</param>
18+
/// <param name="source">The current image processing context.</param>
1919
/// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
20-
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
20+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
2121
public static IImageProcessingContext BinaryThreshold(this IImageProcessingContext source, float threshold)
2222
=> source.ApplyProcessor(new BinaryThresholdProcessor(threshold, BinaryThresholdMode.Luminance));
2323

2424
/// <summary>
2525
/// Applies binarization to the image splitting the pixels at the given threshold.
2626
/// </summary>
27-
/// <param name="source">The image this method extends.</param>
27+
/// <param name="source">The current image processing context.</param>
2828
/// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
2929
/// <param name="mode">Selects the value to be compared to threshold.</param>
30-
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
30+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
3131
public static IImageProcessingContext BinaryThreshold(
3232
this IImageProcessingContext source,
3333
float threshold,
@@ -38,12 +38,12 @@ public static IImageProcessingContext BinaryThreshold(
3838
/// Applies binarization to the image splitting the pixels at the given threshold with
3939
/// Luminance as the color component to be compared to threshold.
4040
/// </summary>
41-
/// <param name="source">The image this method extends.</param>
41+
/// <param name="source">The current image processing context.</param>
4242
/// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
4343
/// <param name="rectangle">
4444
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
4545
/// </param>
46-
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
46+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
4747
public static IImageProcessingContext BinaryThreshold(
4848
this IImageProcessingContext source,
4949
float threshold,
@@ -53,13 +53,13 @@ public static IImageProcessingContext BinaryThreshold(
5353
/// <summary>
5454
/// Applies binarization to the image splitting the pixels at the given threshold.
5555
/// </summary>
56-
/// <param name="source">The image this method extends.</param>
56+
/// <param name="source">The current image processing context.</param>
5757
/// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
5858
/// <param name="mode">Selects the value to be compared to threshold.</param>
5959
/// <param name="rectangle">
6060
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
6161
/// </param>
62-
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
62+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
6363
public static IImageProcessingContext BinaryThreshold(
6464
this IImageProcessingContext source,
6565
float threshold,
@@ -71,11 +71,11 @@ public static IImageProcessingContext BinaryThreshold(
7171
/// Applies binarization to the image splitting the pixels at the given threshold with
7272
/// Luminance as the color component to be compared to threshold.
7373
/// </summary>
74-
/// <param name="source">The image this method extends.</param>
74+
/// <param name="source">The current image processing context.</param>
7575
/// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
7676
/// <param name="upperColor">The color to use for pixels that are above the threshold.</param>
7777
/// <param name="lowerColor">The color to use for pixels that are below the threshold</param>
78-
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
78+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
7979
public static IImageProcessingContext BinaryThreshold(
8080
this IImageProcessingContext source,
8181
float threshold,
@@ -86,12 +86,12 @@ public static IImageProcessingContext BinaryThreshold(
8686
/// <summary>
8787
/// Applies binarization to the image splitting the pixels at the given threshold.
8888
/// </summary>
89-
/// <param name="source">The image this method extends.</param>
89+
/// <param name="source">The current image processing context.</param>
9090
/// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
9191
/// <param name="upperColor">The color to use for pixels that are above the threshold.</param>
9292
/// <param name="lowerColor">The color to use for pixels that are below the threshold</param>
9393
/// <param name="mode">Selects the value to be compared to threshold.</param>
94-
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
94+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
9595
public static IImageProcessingContext BinaryThreshold(
9696
this IImageProcessingContext source,
9797
float threshold,
@@ -104,14 +104,14 @@ public static IImageProcessingContext BinaryThreshold(
104104
/// Applies binarization to the image splitting the pixels at the given threshold with
105105
/// Luminance as the color component to be compared to threshold.
106106
/// </summary>
107-
/// <param name="source">The image this method extends.</param>
107+
/// <param name="source">The current image processing context.</param>
108108
/// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
109109
/// <param name="upperColor">The color to use for pixels that are above the threshold.</param>
110110
/// <param name="lowerColor">The color to use for pixels that are below the threshold</param>
111111
/// <param name="rectangle">
112112
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
113113
/// </param>
114-
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
114+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
115115
public static IImageProcessingContext BinaryThreshold(
116116
this IImageProcessingContext source,
117117
float threshold,
@@ -123,15 +123,15 @@ public static IImageProcessingContext BinaryThreshold(
123123
/// <summary>
124124
/// Applies binarization to the image splitting the pixels at the given threshold.
125125
/// </summary>
126-
/// <param name="source">The image this method extends.</param>
126+
/// <param name="source">The current image processing context.</param>
127127
/// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
128128
/// <param name="upperColor">The color to use for pixels that are above the threshold.</param>
129129
/// <param name="lowerColor">The color to use for pixels that are below the threshold</param>
130130
/// <param name="mode">Selects the value to be compared to threshold.</param>
131131
/// <param name="rectangle">
132132
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
133133
/// </param>
134-
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
134+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
135135
public static IImageProcessingContext BinaryThreshold(
136136
this IImageProcessingContext source,
137137
float threshold,

src/ImageSharp/Processing/Extensions/Convolution/BokehBlurExtensions.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,44 +13,44 @@ public static class BokehBlurExtensions
1313
/// <summary>
1414
/// Applies a bokeh blur to the image.
1515
/// </summary>
16-
/// <param name="source">The image this method extends.</param>
17-
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
16+
/// <param name="source">The current image processing context.</param>
17+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
1818
public static IImageProcessingContext BokehBlur(this IImageProcessingContext source)
1919
=> source.ApplyProcessor(new BokehBlurProcessor());
2020

2121
/// <summary>
2222
/// Applies a bokeh blur to the image.
2323
/// </summary>
24-
/// <param name="source">The image this method extends.</param>
24+
/// <param name="source">The current image processing context.</param>
2525
/// <param name="radius">The 'radius' value representing the size of the area to sample.</param>
2626
/// <param name="components">The 'components' value representing the number of kernels to use to approximate the bokeh effect.</param>
2727
/// <param name="gamma">The gamma highlight factor to use to emphasize bright spots in the source image</param>
28-
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
28+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
2929
public static IImageProcessingContext BokehBlur(this IImageProcessingContext source, int radius, int components, float gamma)
3030
=> source.ApplyProcessor(new BokehBlurProcessor(radius, components, gamma));
3131

3232
/// <summary>
3333
/// Applies a bokeh blur to the image.
3434
/// </summary>
35-
/// <param name="source">The image this method extends.</param>
35+
/// <param name="source">The current image processing context.</param>
3636
/// <param name="rectangle">
3737
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
3838
/// </param>
39-
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
39+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
4040
public static IImageProcessingContext BokehBlur(this IImageProcessingContext source, Rectangle rectangle)
4141
=> source.ApplyProcessor(new BokehBlurProcessor(), rectangle);
4242

4343
/// <summary>
4444
/// Applies a bokeh blur to the image.
4545
/// </summary>
46-
/// <param name="source">The image this method extends.</param>
46+
/// <param name="source">The current image processing context.</param>
4747
/// <param name="radius">The 'radius' value representing the size of the area to sample.</param>
4848
/// <param name="components">The 'components' value representing the number of kernels to use to approximate the bokeh effect.</param>
4949
/// <param name="gamma">The gamma highlight factor to use to emphasize bright spots in the source image</param>
5050
/// <param name="rectangle">
5151
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
5252
/// </param>
53-
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
53+
/// <returns>The <see cref="IImageProcessingContext"/>.</returns>
5454
public static IImageProcessingContext BokehBlur(this IImageProcessingContext source, int radius, int components, float gamma, Rectangle rectangle)
5555
=> source.ApplyProcessor(new BokehBlurProcessor(radius, components, gamma), rectangle);
5656
}

0 commit comments

Comments
 (0)