Skip to content

Commit c98899a

Browse files
lonitragewarren
andauthored
Port System.Drawing docs for .NET 9 (dotnet#10243)
* Port System.Drawing 9.0 docs * update docs based on feedback * missed a couple more feedback comments * fix issues * issue fix * fix GraphicsPath.Warp * rerun porting tool * Apply suggestions from code review Co-authored-by: Genevieve Warren <[email protected]> * additional updates based on feedback * Update xml/System.Drawing.Imaging/DitherType.xml Co-authored-by: Genevieve Warren <[email protected]> --------- Co-authored-by: Genevieve Warren <[email protected]>
1 parent 34d0fe1 commit c98899a

38 files changed

+841
-411
lines changed

xml/System.Drawing.Drawing2D/GraphicsPath.xml

Lines changed: 70 additions & 16 deletions
Large diffs are not rendered by default.

xml/System.Drawing.Drawing2D/GraphicsPathIterator.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@
208208
<summary>To be added.</summary>
209209
<returns>To be added.</returns>
210210
<remarks>To be added.</remarks>
211+
<inheritdoc cref="M:System.Drawing.Drawing2D.GraphicsPathIterator.CopyData(System.Drawing.PointF[]@,System.Byte[]@,System.Int32,System.Int32)" />
211212
</Docs>
212213
</Member>
213214
<Member MemberName="Count">
@@ -354,6 +355,7 @@
354355
355356
]]></format>
356357
</remarks>
358+
<inheritdoc cref="M:System.Drawing.Drawing2D.GraphicsPathIterator.CopyData(System.Drawing.PointF[]@,System.Byte[]@,System.Int32,System.Int32)" />
357359
</Docs>
358360
</Member>
359361
<Member MemberName="Enumerate">
@@ -384,6 +386,7 @@
384386
<summary>To be added.</summary>
385387
<returns>To be added.</returns>
386388
<remarks>To be added.</remarks>
389+
<inheritdoc cref="M:System.Drawing.Drawing2D.GraphicsPathIterator.CopyData(System.Drawing.PointF[]@,System.Byte[]@,System.Int32,System.Int32)" />
387390
</Docs>
388391
</Member>
389392
<Member MemberName="Finalize">

xml/System.Drawing.Drawing2D/Matrix.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,6 +1569,7 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
15691569
15701570
]]></format>
15711571
</remarks>
1572+
<inheritdoc cref="M:System.Drawing.Drawing2D.Matrix.TransformPoints(System.Drawing.Point[])" />
15721573
</Docs>
15731574
</Member>
15741575
<Member MemberName="TransformPoints">
@@ -1607,6 +1608,7 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
16071608
<param name="pts">To be added.</param>
16081609
<summary>To be added.</summary>
16091610
<remarks>To be added.</remarks>
1611+
<inheritdoc cref="M:System.Drawing.Drawing2D.Matrix.TransformPoints(System.Drawing.Point[])" />
16101612
</Docs>
16111613
</Member>
16121614
<Member MemberName="TransformPoints">
@@ -1731,6 +1733,7 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
17311733
17321734
]]></format>
17331735
</remarks>
1736+
<inheritdoc cref="M:System.Drawing.Drawing2D.Matrix.TransformVectors(System.Drawing.PointF[])" />
17341737
</Docs>
17351738
</Member>
17361739
<Member MemberName="TransformVectors">
@@ -1828,6 +1831,7 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
18281831
<param name="pts">To be added.</param>
18291832
<summary>To be added.</summary>
18301833
<remarks>To be added.</remarks>
1834+
<inheritdoc cref="M:System.Drawing.Drawing2D.Matrix.TransformVectors(System.Drawing.PointF[])" />
18311835
</Docs>
18321836
</Member>
18331837
<Member MemberName="TransformVectors">
@@ -1866,6 +1870,7 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
18661870
<param name="pts">To be added.</param>
18671871
<summary>To be added.</summary>
18681872
<remarks>To be added.</remarks>
1873+
<inheritdoc cref="M:System.Drawing.Drawing2D.Matrix.TransformVectors(System.Drawing.PointF[])" />
18691874
</Docs>
18701875
</Member>
18711876
<MemberGroup MemberName="Translate">
@@ -2043,6 +2048,7 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
20432048
<param name="pts">An array of <see cref="T:System.Drawing.Point" /> structures that represents the points to transform.</param>
20442049
<summary>Multiplies each vector in an array by the matrix. The translation elements of this matrix (third row) are ignored.</summary>
20452050
<remarks>To be added.</remarks>
2051+
<inheritdoc cref="M:System.Drawing.Drawing2D.Matrix.TransformVectors(System.Drawing.PointF[])" />
20462052
</Docs>
20472053
</Member>
20482054
<Member MemberName="VectorTransformPoints">
@@ -2081,6 +2087,7 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
20812087
<param name="pts">To be added.</param>
20822088
<summary>To be added.</summary>
20832089
<remarks>To be added.</remarks>
2090+
<inheritdoc cref="M:System.Drawing.Drawing2D.Matrix.TransformVectors(System.Drawing.PointF[])" />
20842091
</Docs>
20852092
</Member>
20862093
</Members>

xml/System.Drawing.Drawing2D/PathGradientBrush.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152
<param name="points">An array of <see cref="T:System.Drawing.Point" /> structures that represents the points that make up the vertices of the path.</param>
153153
<summary>Initializes a new instance of the <see cref="T:System.Drawing.Drawing2D.PathGradientBrush" /> class with the specified points.</summary>
154154
<remarks>To be added.</remarks>
155+
<inheritdoc cref="M:System.Drawing.Drawing2D.PathGradientBrush.#ctor(System.Drawing.PointF[])" />
155156
</Docs>
156157
</Member>
157158
<Member MemberName=".ctor">
@@ -242,6 +243,7 @@
242243
<param name="points">To be added.</param>
243244
<summary>To be added.</summary>
244245
<remarks>To be added.</remarks>
246+
<inheritdoc cref="M:System.Drawing.Drawing2D.PathGradientBrush.#ctor(System.Drawing.PointF[])" />
245247
</Docs>
246248
</Member>
247249
<Member MemberName=".ctor">
@@ -283,6 +285,7 @@
283285
<param name="points">To be added.</param>
284286
<summary>To be added.</summary>
285287
<remarks>To be added.</remarks>
288+
<inheritdoc cref="M:System.Drawing.Drawing2D.PathGradientBrush.#ctor(System.Drawing.PointF[])" />
286289
</Docs>
287290
</Member>
288291
<Member MemberName=".ctor">
@@ -326,6 +329,7 @@
326329
<param name="points">To be added.</param>
327330
<summary>To be added.</summary>
328331
<remarks>To be added.</remarks>
332+
<inheritdoc cref="M:System.Drawing.Drawing2D.PathGradientBrush.#ctor(System.Drawing.PointF[],System.Drawing.Drawing2D.WrapMode)" />
329333
</Docs>
330334
</Member>
331335
<Member MemberName=".ctor">
@@ -369,6 +373,7 @@
369373
<param name="points">To be added.</param>
370374
<summary>To be added.</summary>
371375
<remarks>To be added.</remarks>
376+
<inheritdoc cref="M:System.Drawing.Drawing2D.PathGradientBrush.#ctor(System.Drawing.PointF[])" />
372377
</Docs>
373378
</Member>
374379
<Member MemberName=".ctor">
@@ -404,6 +409,7 @@
404409
<param name="wrapMode">A <see cref="T:System.Drawing.Drawing2D.WrapMode" /> that specifies how fills drawn with this <see cref="T:System.Drawing.Drawing2D.PathGradientBrush" /> are tiled.</param>
405410
<summary>Initializes a new instance of the <see cref="T:System.Drawing.Drawing2D.PathGradientBrush" /> class with the specified points and wrap mode.</summary>
406411
<remarks>To be added.</remarks>
412+
<inheritdoc cref="M:System.Drawing.Drawing2D.PathGradientBrush.#ctor(System.Drawing.PointF[],System.Drawing.Drawing2D.WrapMode)" />
407413
</Docs>
408414
</Member>
409415
<Member MemberName=".ctor">

xml/System.Drawing.Drawing2D/PathPointType.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
<MemberValue>3</MemberValue>
104104
<Docs>
105105
<summary>A cubic Bézier curve.</summary>
106+
<inheritdoc cref="F:System.Drawing.Drawing2D.PathPointType.Bezier" />
106107
</Docs>
107108
</Member>
108109
<Member MemberName="CloseSubpath">

xml/System.Drawing.Imaging.Effects/BlackSaturationCurveEffect.xml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</Base>
1515
<Interfaces />
1616
<Docs>
17-
<summary>To be added.</summary>
17+
<summary>Sets the black saturation of an image. The black saturation is the point at which the darkest areas of the image are converted to black.</summary>
1818
<remarks>To be added.</remarks>
1919
</Docs>
2020
<Members>
@@ -35,10 +35,17 @@
3535
<Parameter Name="blackSaturation" Type="System.Int32" />
3636
</Parameters>
3737
<Docs>
38-
<param name="channel">To be added.</param>
39-
<param name="blackSaturation">To be added.</param>
40-
<summary>To be added.</summary>
38+
<param name="channel">The channel or channels that the effect is applied to.</param>
39+
<param name="blackSaturation">
40+
<para>A value of t specifies that the interval [t, 255] is mapped linearly to the interval [0, 255]. For example, if</para>
41+
<para>
42+
<paramref name="blackSaturation" /> is equal to 15, then color channel values in the interval [15, 255] are adjusted</para>
43+
<para>so that they spread out over the interval [0, 255]. Color channel values less than 15 are set to 0.</para>
44+
</param>
45+
<summary>Creates a new <see cref="T:System.Drawing.Imaging.Effects.BlackSaturationCurveEffect" /> with the given parameters.</summary>
4146
<remarks>To be added.</remarks>
47+
<exception cref="T:System.ArgumentException">
48+
<paramref name="blackSaturation" /> is less than 0 or greater than 254.</exception>
4249
</Docs>
4350
</Member>
4451
<Member MemberName="BlackSaturation">
@@ -57,9 +64,15 @@
5764
<ReturnType>System.Int32</ReturnType>
5865
</ReturnValue>
5966
<Docs>
60-
<summary>To be added.</summary>
67+
<summary>Gets the black saturation value.</summary>
6168
<value>To be added.</value>
62-
<remarks>To be added.</remarks>
69+
<remarks>
70+
<para>
71+
A value of t specifies that the interval [t, 255] is mapped linearly to the interval [0, 255]. For example, if
72+
<see cref="P:System.Drawing.Imaging.Effects.BlackSaturationCurveEffect.BlackSaturation" /> is equal to 15, then color channel values in the interval [15, 255] are adjusted
73+
so that they spread out over the interval [0, 255]. Color channel values less than 15 are set to 0.
74+
</para>
75+
</remarks>
6376
</Docs>
6477
</Member>
6578
</Members>

xml/System.Drawing.Imaging.Effects/BlurEffect.xml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</Base>
1515
<Interfaces />
1616
<Docs>
17-
<summary>To be added.</summary>
17+
<summary>Applies a Gaussian blur.</summary>
1818
<remarks>To be added.</remarks>
1919
</Docs>
2020
<Members>
@@ -35,10 +35,15 @@
3535
<Parameter Name="expandEdge" Type="System.Boolean" />
3636
</Parameters>
3737
<Docs>
38-
<param name="radius">To be added.</param>
39-
<param name="expandEdge">To be added.</param>
40-
<summary>To be added.</summary>
38+
<param name="radius">
39+
<para>
40+
<see langword="true" /> to expand the bitmap by an amount equal to the blur radius so it can have soft edges. <see langword="false" /> to keep the bitmap the same size and clip the soft edges.
41+
</para>
42+
</param>
43+
<summary>Creates a new <see cref="T:System.Drawing.Imaging.Effects.BlurEffect" /> with the given parameters.</summary>
4144
<remarks>To be added.</remarks>
45+
<exception cref="T:System.ArgumentException">
46+
<paramref name="radius" /> is less than 0 or greater than 256.</exception>
4247
</Docs>
4348
</Member>
4449
<Member MemberName="ExpandEdge">
@@ -57,8 +62,12 @@
5762
<ReturnType>System.Boolean</ReturnType>
5863
</ReturnValue>
5964
<Docs>
60-
<summary>To be added.</summary>
61-
<value>To be added.</value>
65+
<summary>
66+
Gets a value that indicates whether the bitmap expands by an amount equal to the blur radius.
67+
</summary>
68+
<value>
69+
<see langword="true" /> if the bitmap expands by an amount equal to the radius so that it can have soft edges. <see langword="false" /> if the bitmap remains the same size and the soft edges are clipped.
70+
</value>
6271
<remarks>To be added.</remarks>
6372
</Docs>
6473
</Member>
@@ -78,9 +87,9 @@
7887
<ReturnType>System.Single</ReturnType>
7988
</ReturnValue>
8089
<Docs>
81-
<summary>To be added.</summary>
90+
<summary>Gets the blur radius (the radius of the Gaussian convolution kernel) in pixels.</summary>
8291
<value>To be added.</value>
83-
<remarks>To be added.</remarks>
92+
<remarks>The radius must be in the range 0 through 255. As the radius increases, the resulting bitmap becomes more blurry.</remarks>
8493
</Docs>
8594
</Member>
8695
</Members>

xml/System.Drawing.Imaging.Effects/BrightnessContrastEffect.xml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</Base>
1515
<Interfaces />
1616
<Docs>
17-
<summary>To be added.</summary>
17+
<summary>Changes the brightness and contrast of an image.</summary>
1818
<remarks>To be added.</remarks>
1919
</Docs>
2020
<Members>
@@ -35,10 +35,23 @@
3535
<Parameter Name="contrastLevel" Type="System.Int32" />
3636
</Parameters>
3737
<Docs>
38-
<param name="brightnessLevel">To be added.</param>
39-
<param name="contrastLevel">To be added.</param>
40-
<summary>To be added.</summary>
38+
<param name="brightnessLevel">
39+
<para>Integer in the range -255 through 255 that specifies the brightness level. If the value is 0, the brightness</para>
40+
<para>remains the same. As the value moves from 0 to 255, the brightness of the image increases. As the value moves</para>
41+
<para>from 0 to -255, the brightness of the image decreases.</para>
42+
</param>
43+
<param name="contrastLevel">
44+
<para>Integer in the range -100 through 100 that specifies the contrast level. If the value is 0, the contrast</para>
45+
<para>remains the same. As the value moves from 0 to 100, the contrast of the image increases. As the value moves</para>
46+
<para>from 0 to -100, the contrast of the image decreases.</para>
47+
</param>
48+
<summary>Creates a new <see cref="T:System.Drawing.Imaging.Effects.BrightnessContrastEffect" /> with the given parameters.</summary>
4149
<remarks>To be added.</remarks>
50+
<exception cref="T:System.ArgumentException">
51+
<para>
52+
<paramref name="brightnessLevel" /> is less than -255 or greater than 255 or <paramref name="contrastLevel" /></para>
53+
<para>is less than -100 or greater than 100.</para>
54+
</exception>
4255
</Docs>
4356
</Member>
4457
<Member MemberName="BrightnessLevel">
@@ -57,9 +70,10 @@
5770
<ReturnType>System.Int32</ReturnType>
5871
</ReturnValue>
5972
<Docs>
60-
<summary>To be added.</summary>
61-
<value>To be added.</value>
62-
<remarks>To be added.</remarks>
73+
<summary>
74+
<para>Gets an integer in the range -255 through 255 that specifies the brightness level.</para></summary>
75+
<value>An integer in the range -255 through 255 that specifies the brightness level.</value>
76+
<remarks>If the value is 0, the brightness remains the same. As the value moves from 0 to 255, the brightness of the image increases. As the value moves from 0 to -255, the brightness of the image decreases.</remarks>
6377
</Docs>
6478
</Member>
6579
<Member MemberName="ContrastLevel">
@@ -78,9 +92,9 @@
7892
<ReturnType>System.Int32</ReturnType>
7993
</ReturnValue>
8094
<Docs>
81-
<summary>To be added.</summary>
82-
<value>To be added.</value>
83-
<remarks>To be added.</remarks>
95+
<summary>Gets the contrast level.</summary>
96+
<value>An integer in the range -100 through 100 that specifies the contrast level.</value>
97+
<remarks>If the value is 0, the contrast remains the same. As the value moves from 0 to 100, the contrast of the image increases. As the value moves from 0 to -100, the contrast of the image decreases.</remarks>
8498
</Docs>
8599
</Member>
86100
</Members>

xml/System.Drawing.Imaging.Effects/ColorBalanceEffect.xml

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</Base>
1515
<Interfaces />
1616
<Docs>
17-
<summary>To be added.</summary>
17+
<summary>Adjusts the color balance of an image.</summary>
1818
<remarks>To be added.</remarks>
1919
</Docs>
2020
<Members>
@@ -36,11 +36,37 @@
3636
<Parameter Name="yellowBlue" Type="System.Int32" />
3737
</Parameters>
3838
<Docs>
39-
<param name="cyanRed">To be added.</param>
40-
<param name="magentaGreen">To be added.</param>
41-
<param name="yellowBlue">To be added.</param>
42-
<summary>To be added.</summary>
39+
<param name="cyanRed">
40+
<para>
41+
Integer in the range -100 through 100 that specifies a change in the amount of red in the image. If the value
42+
is 0, there is no change. As the value moves from 0 to 100, the amount of red in the image increases and the
43+
amount of cyan decreases. As the value moves from 0 to -100, the amount of red in the image decreases and the
44+
amount of cyan increases.
45+
</para>
46+
</param>
47+
<param name="magentaGreen">
48+
<para>
49+
Integer in the range -100 through 100 that specifies a change in the amount of green in the image. If the value
50+
is 0, there is no change. As the value moves from 0 to 100, the amount of green in the image increases and the
51+
amount of magenta decreases. As the value moves from 0 to -100, the amount of green in the image decreases and
52+
and the amount of magenta increases.
53+
</para>
54+
</param>
55+
<param name="yellowBlue">
56+
<para>
57+
Integer in the range -100 through 100 that specifies a change in the amount of blue in the image. If the value
58+
is 0, there is no change. As the value moves from 0 to 100, the amount of blue in the image increases and the
59+
amount of yellow decreases. As the value moves from 0 to -100, the amount of blue in the image decreases and
60+
the amount of yellow increases.
61+
</para>
62+
</param>
63+
<summary>Creates a new <see cref="T:System.Drawing.Imaging.Effects.ColorBalanceEffect" /> with the specified red, green, and blue values.</summary>
4364
<remarks>To be added.</remarks>
65+
<exception cref="T:System.ArgumentException">
66+
<para>
67+
<paramref name="cyanRed" />, <paramref name="magentaGreen" />, or <paramref name="yellowBlue" /> is less than</para>
68+
<para>-100 or greater than 100.</para>
69+
</exception>
4470
</Docs>
4571
</Member>
4672
<Member MemberName="CyanRed">
@@ -59,8 +85,12 @@
5985
<ReturnType>System.Int32</ReturnType>
6086
</ReturnValue>
6187
<Docs>
62-
<summary>To be added.</summary>
63-
<value>To be added.</value>
88+
<summary>Gets the amount of cyanRed in the image.</summary>
89+
<value>
90+
The value can range from -100 through 100. As the value moves from 0 to 100, the amount of red in the image increases and the
91+
amount of cyan decreases. As the value moves from 0 to -100, the amount of red in the image decreases and the
92+
amount of cyan increases.
93+
</value>
6494
<remarks>To be added.</remarks>
6595
</Docs>
6696
</Member>
@@ -80,8 +110,12 @@
80110
<ReturnType>System.Int32</ReturnType>
81111
</ReturnValue>
82112
<Docs>
83-
<summary>To be added.</summary>
84-
<value>To be added.</value>
113+
<summary>Gets the amount of magentaGreen in the image</summary>
114+
<value>
115+
The value can range from -100 through 100. As the value moves from 0 to 100, the amount of green in the image increases and the
116+
amount of magenta decreases. As the value moves from 0 to -100, the amount of green in the image decreases and
117+
and the amount of magenta increases.
118+
</value>
85119
<remarks>To be added.</remarks>
86120
</Docs>
87121
</Member>
@@ -101,8 +135,12 @@
101135
<ReturnType>System.Int32</ReturnType>
102136
</ReturnValue>
103137
<Docs>
104-
<summary>To be added.</summary>
105-
<value>To be added.</value>
138+
<summary>Gets the amount of yellowBlue in the image.</summary>
139+
<value>
140+
The value can range from -100 through 100. As the value moves from 0 to 100, the amount of blue in the image increases and the
141+
amount of yellow decreases. As the value moves from 0 to -100, the amount of blue in the image decreases and
142+
the amount of yellow increases.
143+
</value>
106144
<remarks>To be added.</remarks>
107145
</Docs>
108146
</Member>

0 commit comments

Comments
 (0)