From 86d32a6a85cf4334d99326f35fc7bba94b26b805 Mon Sep 17 00:00:00 2001
From: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Date: Wed, 28 Jul 2021 17:08:06 -0700
Subject: [PATCH] add note about non-windows os
---
includes/system-drawing-common.md | 2 +
.../AdjustableArrowCap.xml | 82 +-
.../CustomLineCap.xml | 276 +-
xml/System.Drawing.Drawing2D/GraphicsPath.xml | 2063 ++--
.../GraphicsPathIterator.xml | 414 +-
.../GraphicsState.xml | 10 +-
xml/System.Drawing.Drawing2D/HatchBrush.xml | 70 +-
.../LinearGradientBrush.xml | 540 +-
xml/System.Drawing.Drawing2D/Matrix.xml | 616 +-
.../PathGradientBrush.xml | 432 +-
xml/System.Drawing.Imaging/Encoder.xml | 44 +-
.../EncoderParameter.xml | 2 +-
.../EncoderParameters.xml | 10 +-
.../ImageAttributes.xml | 6 +-
xml/System.Drawing.Imaging/ImageCodecInfo.xml | 2 +
xml/System.Drawing.Imaging/ImageFormat.xml | 22 +-
xml/System.Drawing.Imaging/Metafile.xml | 52 +-
xml/System.Drawing.Imaging/MetafileHeader.xml | 10 +-
.../PlayRecordCallback.xml | 10 +-
xml/System.Drawing.Printing/PageSettings.xml | 342 +-
.../PreviewPageInfo.xml | 27 +-
.../PrintController.xml | 89 +-
xml/System.Drawing.Printing/PrintDocument.xml | 394 +-
.../PrintEventArgs.xml | 22 +-
.../PrintEventHandler.xml | 17 +-
.../PrintPageEventArgs.xml | 85 +-
.../PrintPageEventHandler.xml | 17 +-
.../PrinterSettings.xml | 570 +-
xml/System.Drawing.Text/FontCollection.xml | 44 +-
.../InstalledFontCollection.xml | 32 +-
.../PrivateFontCollection.xml | 32 +-
xml/System.Drawing/Bitmap.xml | 640 +-
xml/System.Drawing/Brush.xml | 48 +-
xml/System.Drawing/Brushes.xml | 1438 +--
xml/System.Drawing/BufferedGraphics.xml | 146 +-
.../BufferedGraphicsContext.xml | 154 +-
xml/System.Drawing/Font.xml | 728 +-
xml/System.Drawing/FontConverter.xml | 62 +-
xml/System.Drawing/FontFamily.xml | 348 +-
xml/System.Drawing/Graphics.xml | 9408 ++++++++---------
xml/System.Drawing/Icon.xml | 320 +-
xml/System.Drawing/IconConverter.xml | 40 +-
xml/System.Drawing/Image.xml | 804 +-
xml/System.Drawing/ImageAnimator.xml | 18 +-
xml/System.Drawing/Pen.xml | 718 +-
xml/System.Drawing/Pens.xml | 1434 +--
xml/System.Drawing/Region.xml | 1026 +-
xml/System.Drawing/SolidBrush.xml | 50 +-
xml/System.Drawing/StringFormat.xml | 468 +-
xml/System.Drawing/SystemBrushes.xml | 128 +-
xml/System.Drawing/SystemFonts.xml | 66 +-
xml/System.Drawing/SystemIcons.xml | 32 +-
xml/System.Drawing/SystemPens.xml | 574 +-
xml/System.Drawing/TextureBrush.xml | 352 +-
xml/System.Windows.Forms/PictureBox.xml | 614 +-
xml/System.Windows.Forms/Screen.xml | 120 +-
xml/ns-System.Drawing.Imaging.xml | 2 +-
57 files changed, 13087 insertions(+), 12985 deletions(-)
create mode 100644 includes/system-drawing-common.md
diff --git a/includes/system-drawing-common.md b/includes/system-drawing-common.md
new file mode 100644
index 00000000000..6a519da62c6
--- /dev/null
+++ b/includes/system-drawing-common.md
@@ -0,0 +1,2 @@
+> [!NOTE]
+> In .NET 6 and later versions, the [System.Drawing.Common package](https://www.nuget.org/packages/System.Drawing.Common/), which includes this type, is only supported on Windows operating systems. Use of this type in cross-platform apps causes compile-time warnings and run-time exceptions. For more information, see [System.Drawing.Common only supported on Windows](/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only).
diff --git a/xml/System.Drawing.Drawing2D/AdjustableArrowCap.xml b/xml/System.Drawing.Drawing2D/AdjustableArrowCap.xml
index 0a9338e91bb..986e7f55d59 100644
--- a/xml/System.Drawing.Drawing2D/AdjustableArrowCap.xml
+++ b/xml/System.Drawing.Drawing2D/AdjustableArrowCap.xml
@@ -26,7 +26,15 @@
Represents an adjustable arrow-shaped line cap. This class cannot be inherited.
- To be added.
+
+
+
@@ -76,21 +84,21 @@
The height of the arrow.
Initializes a new instance of the class with the specified width and height. The arrow end caps created with this constructor are always filled.
- `e`, an event object. The code performs the following actions:
-
-- Creates an object named `myArrow`.
-
-- Creates a object named `capPen`, and sets its and properties equal to `myArrow`.
-
-- Uses the method to draw to screen a line capped by two arrows.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates an object named `myArrow`.
+
+- Creates a object named `capPen`, and sets its and properties equal to `myArrow`.
+
+- Uses the method to draw to screen a line capped by two arrows.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMisc/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMisc/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMisc/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMisc/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -130,21 +138,21 @@
to fill the arrow cap; otherwise, .
Initializes a new instance of the class with the specified width, height, and fill property. Whether an arrow end cap is filled depends on the argument passed to the parameter.
- `e`, an event object. The code performs the following actions:
-
-- Creates an object named `myArrow`.
-
-- Creates a object named `capPen`, and sets its and properties equal to `myArrow`.
-
-- Uses the method to draw to screen a line capped by two arrows.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates an object named `myArrow`.
+
+- Creates a object named `capPen`, and sets its and properties equal to `myArrow`.
+
+- Uses the method to draw to screen a line capped by two arrows.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMisc/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMisc/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMisc/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMisc/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -231,11 +239,11 @@
Gets or sets the height of the arrow cap.
The height of the arrow cap.
- object used to draw the line being capped. For example, if you are drawing a capped line with a pen that has a width of 5 pixels, and the object has a height of 3, then the actual arrow cap is drawn 15 pixels high.
-
+ object used to draw the line being capped. For example, if you are drawing a capped line with a pen that has a width of 5 pixels, and the object has a height of 3, then the actual arrow cap is drawn 15 pixels high.
+
]]>
@@ -322,11 +330,11 @@
Gets or sets the width of the arrow cap.
The width, in units, of the arrow cap.
- object used to draw the line being capped. For example, if you are drawing a capped line with a pen that has a width of 5 pixels, and the object has a width of 3, then the actual arrow cap is drawn 15 pixels wide.
-
+ object used to draw the line being capped. For example, if you are drawing a capped line with a pen that has a width of 5 pixels, and the object has a width of 3, then the actual arrow cap is drawn 15 pixels wide.
+
]]>
diff --git a/xml/System.Drawing.Drawing2D/CustomLineCap.xml b/xml/System.Drawing.Drawing2D/CustomLineCap.xml
index 96ff88f804c..b8cfb7c38e1 100644
--- a/xml/System.Drawing.Drawing2D/CustomLineCap.xml
+++ b/xml/System.Drawing.Drawing2D/CustomLineCap.xml
@@ -34,19 +34,19 @@
Encapsulates a custom user-defined line cap.
- objects. GDI+ supports several predefined cap styles, and also allows users to define their own cap styles. This class is used to create custom cap styles.
-
-
-
-## Examples
- The following example demonstrates how to use the class. To run this example paste, the code into a Windows Form. Handle the form's event and call `DrawCaps` from the form's event-handling method, passing `e` as .
-
+ objects. GDI+ supports several predefined cap styles, and also allows users to define their own cap styles. This class is used to create custom cap styles.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+## Examples
+ The following example demonstrates how to use the class. To run this example paste, the code into a Windows Form. Handle the form's event and call `DrawCaps` from the form's event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Misc3/CS/Form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippet1":::
+
]]>
@@ -99,21 +99,21 @@
A object that defines the outline of the custom cap.
Initializes a new instance of the class with the specified outline and fill.
- uses a fill mode of "winding" regardless of the fill mode specified for the operation.
-
- The `fillPath` and `strokePath` parameters cannot be used at the same time. One parameter must be passed a null value. If neither parameter is passed a null value, `fillPath` will be ignored. If `strokePath` is `null`, `fillPath` should intercept the negative y-axis.
-
-
-
-## Examples
- The following example demonstrates how to use the constructor. To run this example, paste the code into a Windows Form. Handle the form's event and call `DrawCaps` from the form's event-handling method, passing `e` as .
-
+ uses a fill mode of "winding" regardless of the fill mode specified for the operation.
+
+ The `fillPath` and `strokePath` parameters cannot be used at the same time. One parameter must be passed a null value. If neither parameter is passed a null value, `fillPath` will be ignored. If `strokePath` is `null`, `fillPath` should intercept the negative y-axis.
+
+
+
+## Examples
+ The following example demonstrates how to use the constructor. To run this example, paste the code into a Windows Form. Handle the form's event and call `DrawCaps` from the form's event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Misc3/CS/Form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippet1":::
+
]]>
@@ -159,13 +159,13 @@
The line cap from which to create the custom cap.
Initializes a new instance of the class from the specified existing enumeration with the specified outline and fill.
- uses a fill mode of "winding" regardless of the fill mode specified for the operation.
-
- The `fillPath` and `strokePath` parameters cannot be used at the same time. One parameter must be passed a null value. If neither parameter is passed a null value, `fillPath` will be ignored. If `strokePath` is `null`, `fillPath` should intercept the negative y-axis.
-
+ uses a fill mode of "winding" regardless of the fill mode specified for the operation.
+
+ The `fillPath` and `strokePath` parameters cannot be used at the same time. One parameter must be passed a null value. If neither parameter is passed a null value, `fillPath` will be ignored. If `strokePath` is `null`, `fillPath` should intercept the negative y-axis.
+
]]>
@@ -207,13 +207,13 @@
The distance between the cap and the line.
Initializes a new instance of the class from the specified existing enumeration with the specified outline, fill, and inset.
- uses a fill mode of "winding" regardless of the fill mode specified for the operation.
-
- The `fillPath` and `strokePath` parameters cannot be used at the same time. One parameter must be passed a null value. If neither parameter is passed a null value, `fillPath` will be ignored. If `strokePath` is `null`, `fillPath` should intercept the negative y-axis.
-
+ uses a fill mode of "winding" regardless of the fill mode specified for the operation.
+
+ The `fillPath` and `strokePath` parameters cannot be used at the same time. One parameter must be passed a null value. If neither parameter is passed a null value, `fillPath` will be ignored. If `strokePath` is `null`, `fillPath` should intercept the negative y-axis.
+
]]>
@@ -336,75 +336,75 @@
Creates an exact copy of this .
The this method creates, cast as an object.
- `e`, an event object. The code performs the following actions:
-
-- Creates a custom line cap by using the object.
-
-- Creates a object, `firstCap`,using the object just created.
-
-- Creates a clone of `firstCap` by using the method.
-
-- Sets up the and properties of the object, and uses that pen to draw a line and the custom caps to the screen.
-
-```vb
-Public Sub CloneExample(e As PaintEventArgs)
- Dim points As Point() = New Point(- 5, - 5) New Point(0, 0) _
- New Point(5, - 5)
- Dim capPath As New GraphicsPath()
- ' Create a Path and add two lines to it,
- ' forming a custom line cap.
- capPath.AddLines(points)
- ' Create a CustomLineCap object.
- Dim firstCap As New CustomLineCap(Nothing, capPath)
- ' Create a copy of firstCap.
- Dim secondCap As CustomLineCap = CType(firstCap.Clone(), _
- CustomLineCap)
- ' Create a Pen object.
- Dim pen As New Pen(Color.Black, 3F)
- 'Set up the line.
- Dim point1 As New Point(20, 20)
- Dim point2 As New Point(100, 100)
- ' Set up the caps.
- pen.CustomStartCap = firstCap
- pen.CustomEndCap = secondCap
- ' Draw the line and caps to the screen.
- e.Graphics.DrawLine(pen, point1, point2)
- End Sub
-```
-
-```csharp
-private void CloneExample(PaintEventArgs e)
- {
- // Create a Path and add two lines to it,
- // forming a custom line cap.
- Point[] points =
- {
- new Point(-5, -5),
- new Point(0, 0),
- new Point(5, -5)
- };
- GraphicsPath capPath = new GraphicsPath();
- capPath.AddLines(points);
- // Create a CustomLineCap object.
- CustomLineCap firstCap = new CustomLineCap(null, capPath);
- // Create a copy of firstCap.
- CustomLineCap secondCap = (CustomLineCap)firstCap.Clone();
- // Create a Pen object.
- Pen pen = new Pen(Color.Black, 3.0f);
- // Set up the line.
- Point point1 = new Point(20, 20);
- Point point2 = new Point(100, 100);
- // Set up the caps.
- pen.CustomStartCap = firstCap;
- pen.CustomEndCap = secondCap;
- // Draw the line and caps to the screen.
- e.Graphics.DrawLine(pen, point1, point2);
- }
-```
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a custom line cap by using the object.
+
+- Creates a object, `firstCap`,using the object just created.
+
+- Creates a clone of `firstCap` by using the method.
+
+- Sets up the and properties of the object, and uses that pen to draw a line and the custom caps to the screen.
+
+```vb
+Public Sub CloneExample(e As PaintEventArgs)
+ Dim points As Point() = New Point(- 5, - 5) New Point(0, 0) _
+ New Point(5, - 5)
+ Dim capPath As New GraphicsPath()
+ ' Create a Path and add two lines to it,
+ ' forming a custom line cap.
+ capPath.AddLines(points)
+ ' Create a CustomLineCap object.
+ Dim firstCap As New CustomLineCap(Nothing, capPath)
+ ' Create a copy of firstCap.
+ Dim secondCap As CustomLineCap = CType(firstCap.Clone(), _
+ CustomLineCap)
+ ' Create a Pen object.
+ Dim pen As New Pen(Color.Black, 3F)
+ 'Set up the line.
+ Dim point1 As New Point(20, 20)
+ Dim point2 As New Point(100, 100)
+ ' Set up the caps.
+ pen.CustomStartCap = firstCap
+ pen.CustomEndCap = secondCap
+ ' Draw the line and caps to the screen.
+ e.Graphics.DrawLine(pen, point1, point2)
+ End Sub
+```
+
+```csharp
+private void CloneExample(PaintEventArgs e)
+ {
+ // Create a Path and add two lines to it,
+ // forming a custom line cap.
+ Point[] points =
+ {
+ new Point(-5, -5),
+ new Point(0, 0),
+ new Point(5, -5)
+ };
+ GraphicsPath capPath = new GraphicsPath();
+ capPath.AddLines(points);
+ // Create a CustomLineCap object.
+ CustomLineCap firstCap = new CustomLineCap(null, capPath);
+ // Create a copy of firstCap.
+ CustomLineCap secondCap = (CustomLineCap)firstCap.Clone();
+ // Create a Pen object.
+ Pen pen = new Pen(Color.Black, 3.0f);
+ // Set up the line.
+ Point point1 = new Point(20, 20);
+ Point point2 = new Point(100, 100);
+ // Set up the caps.
+ pen.CustomStartCap = firstCap;
+ pen.CustomEndCap = secondCap;
+ // Draw the line and caps to the screen.
+ e.Graphics.DrawLine(pen, point1, point2);
+ }
+```
+
]]>
@@ -442,11 +442,11 @@ private void CloneExample(PaintEventArgs e)
Releases all resources used by this object.
- allows the resources used by this object to be reallocated for other purposes.
-
+ allows the resources used by this object to be reallocated for other purposes.
+
]]>
@@ -554,14 +554,14 @@ private void CloneExample(PaintEventArgs e)
The enumeration used at the end of a line within this cap.
Gets the caps used to start and end lines that make up this custom cap.
- method. To run this example, paste the code into a Windows Form. Handle the form's event and call `DrawCaps` from the form's event-handling method, passing `e` as .
-
+ method. To run this example, paste the code into a Windows Form. Handle the form's event and call `DrawCaps` from the form's event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Misc3/CS/Form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippet1":::
+
]]>
@@ -601,14 +601,14 @@ private void CloneExample(PaintEventArgs e)
The enumeration used at the end of a line within this cap.
Sets the caps used to start and end lines that make up this custom cap.
- method. To run this example, paste the code into a Windows Form. Handle the form's event and call `DrawCaps` from the form's event-handling method, passing `e` as .
-
+ method. To run this example, paste the code into a Windows Form. Handle the form's event and call `DrawCaps` from the form's event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Misc3/CS/Form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippet1":::
+
]]>
@@ -653,11 +653,11 @@ private void CloneExample(PaintEventArgs e)
Gets or sets the enumeration that determines how lines that compose this object are joined.
The enumeration this object uses to join lines.
- enumeration that is used to join lines and curves that make up the stroked path of this object.
-
+ enumeration that is used to join lines and curves that make up the stroked path of this object.
+
]]>
@@ -702,11 +702,11 @@ private void CloneExample(PaintEventArgs e)
Gets or sets the amount by which to scale this Class object with respect to the width of the object.
The amount by which to scale the cap.
-
diff --git a/xml/System.Drawing.Drawing2D/GraphicsPath.xml b/xml/System.Drawing.Drawing2D/GraphicsPath.xml
index ab51951f012..cd23e2651e2 100644
--- a/xml/System.Drawing.Drawing2D/GraphicsPath.xml
+++ b/xml/System.Drawing.Drawing2D/GraphicsPath.xml
@@ -34,23 +34,26 @@
Represents a series of connected lines and curves. This class cannot be inherited.
- method, which closes the current figure by connecting a line from the ending point to the starting point. A figure that consists of a geometric shape primitive is a closed figure.
-
- For purposes of filling and clipping (for example, if a path is rendered using ), all open figures are closed by adding a line from the figure's first point to its last point.
-
- A new figure is implicitly started when a path is created or when a figure is closed. A new figure is explicitly created when the method is called.
-
- When a geometric shape primitive is added to a path, it adds a figure containing the geometric shape, and also implicitly starts a new figure. Consequently, there is always a current figure in a path. When lines and curves are added to a path, an implicit line is added as needed to connect the ending point of the current figure to the starting point of the new lines and curves to form a sequence of connected lines and curves.
-
- A figure has a direction that describes how line and curve segments are traced between the starting point and the ending point. The direction is defined in the order that lines and curves are added to a figure, or is defined by the geometric shape primitive. The direction is used in determining the path interiors for clipping and fill.
-
+ method, which closes the current figure by connecting a line from the ending point to the starting point. A figure that consists of a geometric shape primitive is a closed figure.
+
+ For purposes of filling and clipping (for example, if a path is rendered using ), all open figures are closed by adding a line from the figure's first point to its last point.
+
+ A new figure is implicitly started when a path is created or when a figure is closed. A new figure is explicitly created when the method is called.
+
+ When a geometric shape primitive is added to a path, it adds a figure containing the geometric shape, and also implicitly starts a new figure. Consequently, there is always a current figure in a path. When lines and curves are added to a path, an implicit line is added as needed to connect the ending point of the current figure to the starting point of the new lines and curves to form a sequence of connected lines and curves.
+
+ A figure has a direction that describes how line and curve segments are traced between the starting point and the ending point. The direction is defined in the order that lines and curves are added to a figure, or is defined by the geometric shape primitive. The direction is used in determining the path interiors for clipping and fill.
+
]]>
Constructing and Drawing Paths
@@ -329,30 +332,30 @@
The angle between and the end of the arc.
Appends an elliptical arc to the current figure.
- `e`, an event object. The code performs the following actions:
-
-- Creates a rectangle, from which the arc is defined.
-
-- Creates a path, `myPath`.
-
-- Defines a 180-degree elliptical arc that sweeps from 0 degrees to 180 degrees and appends it to a path.
-
-- Draws the path to screen.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a rectangle, from which the arc is defined.
+
+- Creates a path, `myPath`.
+
+- Defines a 180-degree elliptical arc that sweeps from 0 degrees to 180 degrees and appends it to a path.
+
+- Draws the path to screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -394,18 +397,18 @@
The angle between and the end of the arc.
Appends an elliptical arc to the current figure.
- .
-
+ .
+
]]>
@@ -453,18 +456,18 @@
The angle between and the end of the arc.
Appends an elliptical arc to the current figure.
- .
-
+ .
+
]]>
@@ -512,18 +515,18 @@
The angle between and the end of the arc.
Appends an elliptical arc to the current figure.
- .
-
+ .
+
]]>
@@ -576,18 +579,18 @@
A that represents the endpoint of the curve.
Adds a cubic Bézier curve to the current figure.
- .
-
+ .
+
]]>
@@ -631,18 +634,18 @@
A that represents the endpoint of the curve.
Adds a cubic Bézier curve to the current figure.
- .
-
+ .
+
]]>
@@ -694,30 +697,30 @@
The y-coordinate of the endpoint of the curve.
Adds a cubic Bézier curve to the current figure.
- `e`, an event object. The code performs the following actions:
-
-- Creates a path.
-
-- Adds a cubic Bézier curve defined by the points (50, 50), (70, 0), (100, 120), and (150, 50) to the path.
-
-- Closes the curve.
-
-- Draws the path to screen.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a path.
+
+- Adds a cubic Bézier curve defined by the points (50, 50), (70, 0), (100, 120), and (150, 50) to the path.
+
+- Closes the curve.
+
+- Draws the path to screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -769,18 +772,18 @@
The y-coordinate of the endpoint of the curve.
Adds a cubic Bézier curve to the current figure.
- .
-
+ .
+
]]>
@@ -837,28 +840,28 @@
An array of structures that represents the points that define the curves.
Adds a sequence of connected cubic Bézier curves to the current figure.
- `e`, an event object. The code performs the following actions:
-
-- Creates an array of seven points (representing two connected Bézier curves).
-
-- Creates a path and adds the series of Bézier curve points to the path.
-
-- Draws the path to screen.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates an array of seven points (representing two connected Bézier curves).
+
+- Creates a path and adds the series of Bézier curve points to the path.
+
+- Draws the path to screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -896,20 +899,20 @@
An array of structures that represents the points that define the curves.
Adds a sequence of connected cubic Bézier curves to the current figure.
-
-
+
+
]]>
@@ -956,16 +959,16 @@
An array of structures that represents the points that define the curve.
Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.
- .
-
+ .
+
]]>
@@ -1003,16 +1006,16 @@
An array of structures that represents the points that define the curve.
Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.
- .
-
+ .
+
]]>
@@ -1052,28 +1055,28 @@
A value between from 0 through 1 that specifies the amount that the curve bends between points, with 0 being the smallest curve (sharpest corner) and 1 being the smoothest curve.
Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.
- `e`, an event object. The code performs the following actions:
-
-- Creates an array of six points (representing a cardinal spline).
-
-- Creates a path and adds the closed cardinal spline curves to the path (closed from the endpoint to the starting point).
-
-- Draws the path to screen.
-
- Notice that a tension of 0.5 is used.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates an array of six points (representing a cardinal spline).
+
+- Creates a path and adds the closed cardinal spline curves to the path (closed from the endpoint to the starting point).
+
+- Draws the path to screen.
+
+ Notice that a tension of 0.5 is used.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet4":::
+
]]>
@@ -1113,16 +1116,16 @@
A value between from 0 through 1 that specifies the amount that the curve bends between points, with 0 being the smallest curve (sharpest corner) and 1 being the smoothest curve.
Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.
- .
-
+ .
+
]]>
@@ -1169,16 +1172,16 @@
An array of structures that represents the points that define the curve.
Adds a spline curve to the current figure. A cardinal spline curve is used because the curve travels through each of the points in the array.
- .
-
+ .
+
]]>
@@ -1216,16 +1219,16 @@
An array of structures that represents the points that define the curve.
Adds a spline curve to the current figure. A cardinal spline curve is used because the curve travels through each of the points in the array.
- .
-
+ .
+
]]>
@@ -1265,16 +1268,16 @@
A value that specifies the amount that the curve bends between control points. Values greater than 1 produce unpredictable results.
Adds a spline curve to the current figure.
- .
-
+ .
+
]]>
@@ -1314,16 +1317,16 @@
A value that specifies the amount that the curve bends between control points. Values greater than 1 produce unpredictable results.
Adds a spline curve to the current figure.
- .
-
+ .
+
]]>
@@ -1367,30 +1370,30 @@
A value that specifies the amount that the curve bends between control points. Values greater than 1 produce unpredictable results.
Adds a spline curve to the current figure.
- `e`, an event object. The code performs the following actions:
-
-- Creates an array of four points (representing a cardinal spline).
-
-- Creates a path and using the array of points, adds the curve to the path.
-
-- Draws the path to the screen.
-
- Notice that while the array holds four points, there are only three segments, which is the number specified in the third argument of the call to .
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates an array of four points (representing a cardinal spline).
+
+- Creates a path and using the array of points, adds the curve to the path.
+
+- Draws the path to the screen.
+
+ Notice that while the array holds four points, there are only three segments, which is the number specified in the third argument of the call to .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet5":::
+
]]>
@@ -1434,18 +1437,18 @@
A value that specifies the amount that the curve bends between control points. Values greater than 1 produce unpredictable results.
Adds a spline curve to the current figure.
- .
-
+ .
+
]]>
@@ -1492,21 +1495,21 @@
A that represents the bounding rectangle that defines the ellipse.
Adds an ellipse to the current path.
- `e`, an event object. The code performs the following actions:
-
- Creates a bounding rectangle that defines an ellipse.
-
- Creates a path and adds the ellipse to the path.
-
- Draws the path to screen.
-
+ `e`, an event object. The code performs the following actions:
+
+ Creates a bounding rectangle that defines an ellipse.
+
+ Creates a path and adds the ellipse to the path.
+
+ Draws the path to screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet6":::
+
]]>
@@ -1544,11 +1547,11 @@
A that represents the bounding rectangle that defines the ellipse.
Adds an ellipse to the current path.
- .
-
+ .
+
]]>
@@ -1592,11 +1595,11 @@
The height of the bounding rectangle that defines the ellipse.
Adds an ellipse to the current path.
- .
-
+ .
+
]]>
@@ -1640,11 +1643,11 @@
The height of the bounding rectangle that defines the ellipse.
Adds an ellipse to the current path.
- .
-
+ .
+
]]>
@@ -1693,16 +1696,16 @@
A that represents the endpoint of the line.
Appends a line segment to this .
- . If there are previous lines or curves in the , a line segment is drawn to connect the last point in the path to the first point in the new line segment.
-
-
-
-## Examples
- For an example, see .
-
+ . If there are previous lines or curves in the , a line segment is drawn to connect the last point in the path to the first point in the new line segment.
+
+
+
+## Examples
+ For an example, see .
+
]]>
@@ -1742,16 +1745,16 @@
A that represents the endpoint of the line.
Appends a line segment to this .
- . If there are previous lines or curves in the , a line segment is drawn to connect the last point in the path to the first point in the new line segment.
-
-
-
-## Examples
- For an example, see .
-
+ . If there are previous lines or curves in the , a line segment is drawn to connect the last point in the path to the first point in the new line segment.
+
+
+
+## Examples
+ For an example, see .
+
]]>
@@ -1795,20 +1798,20 @@
The y-coordinate of the endpoint of the line.
Appends a line segment to the current figure.
- , a line segment is drawn to connect the last point in the path to the first point in the new line segment.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code creates a path, adds three lines that form a triangle, and then draws the path to the screen.
-
+ , a line segment is drawn to connect the last point in the path to the first point in the new line segment.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code creates a path, adds three lines that form a triangle, and then draws the path to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet7":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet7":::
+
]]>
@@ -1852,16 +1855,16 @@
The y-coordinate of the endpoint of the line.
Appends a line segment to this .
- . If there are previous lines or curves in the , a line segment is drawn to connect the last point in the path to the first point in the new line segment.
-
-
-
-## Examples
- For an example, see .
-
+ . If there are previous lines or curves in the , a line segment is drawn to connect the last point in the path to the first point in the new line segment.
+
+
+
+## Examples
+ For an example, see .
+
]]>
@@ -1908,28 +1911,28 @@
An array of structures that represents the points that define the line segments to add.
Appends a series of connected line segments to the end of this .
- `e`, an event object. The code performs the following actions:
-
-- Creates an array of four points that describe a triangle.
-
-- Creates a path and adds the array of lines.
-
-- Draws the path to screen.
-
- Notice that each line after the first point uses the previous point as the starting point and the new point as the endpoint.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates an array of four points that describe a triangle.
+
+- Creates a path and adds the array of lines.
+
+- Draws the path to screen.
+
+ Notice that each line after the first point uses the previous point as the starting point and the new point as the endpoint.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet8":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet8":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet8":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet8":::
+
]]>
@@ -1967,16 +1970,16 @@
An array of structures that represents the points that define the line segments to add.
Appends a series of connected line segments to the end of this .
- .
-
+ .
+
]]>
@@ -2016,21 +2019,21 @@
A Boolean value that specifies whether the first figure in the added path is part of the last figure in this path. A value of specifies that (if possible) the first figure in the added path is part of the last figure in this path. A value of specifies that the first figure in the added path is separate from the last figure in this path.
Appends the specified to this path.
- `e`, an event object. The code performs the following actions:
-
-- Creates two paths one a right-side-up triangle and the other an up-side-down triangle.
-
-- Adds the second path to the first.
-
-- Draws the resultant path to the screen.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates two paths one a right-side-up triangle and the other an up-side-down triangle.
+
+- Adds the second path to the first.
+
+- Draws the resultant path to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet9":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet9":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet9":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet9":::
+
]]>
@@ -2081,16 +2084,16 @@
The angle between and the end of the pie section, measured in degrees clockwise from .
Adds the outline of a pie shape to this path.
- .
-
+ .
+
]]>
@@ -2138,20 +2141,20 @@
The angle between and the end of the pie section, measured in degrees clockwise from .
Adds the outline of a pie shape to this path.
- `e`, an event object. The code creates a graphics path, adds the pie shape, and then draws the path to the screen.
-
+ `e`, an event object. The code creates a graphics path, adds the pie shape, and then draws the path to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet10":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet10":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet10":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet10":::
+
]]>
@@ -2199,16 +2202,16 @@
The angle between and the end of the pie section, measured in degrees clockwise from .
Adds the outline of a pie shape to this path.
- .
-
+ .
+
]]>
@@ -2255,26 +2258,26 @@
An array of structures that defines the polygon to add.
Adds a polygon to this path.
- `e`, an event object. The code performs the following actions:
-
-- Creates an array of points that defines a polygon.
-
-- Creates a path and adds the polygon to the path.
-
-- Draws the path to the screen.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates an array of points that defines a polygon.
+
+- Creates a path and adds the polygon to the path.
+
+- Draws the path to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet11":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet11":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet11":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet11":::
+
]]>
@@ -2312,16 +2315,16 @@
An array of structures that defines the polygon to add.
Adds a polygon to this path.
- .
-
+ .
+
]]>
@@ -2368,21 +2371,21 @@
A that represents the rectangle to add.
Adds a rectangle to this path.
- `e`, an event object. The code performs the following actions:
-
-- Creates a path.
-
-- Creates a rectangle and adds the rectangle to the path.
-
-- Draws the path to the screen.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a path.
+
+- Creates a rectangle and adds the rectangle to the path.
+
+- Draws the path to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet12":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet12":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet12":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet12":::
+
]]>
@@ -2420,11 +2423,11 @@
A that represents the rectangle to add.
Adds a rectangle to this path.
- .
-
+ .
+
]]>
@@ -2471,21 +2474,21 @@
An array of structures that represents the rectangles to add.
Adds a series of rectangles to this path.
- `e`, an event object. The code performs the following actions:
-
-- Creates a path.
-
-- Creates an array of rectangles and adds the rectangles to the path.
-
-- Draws the path to the screen.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a path.
+
+- Creates an array of rectangles and adds the rectangles to the path.
+
+- Draws the path to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet13":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet13":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet13":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet13":::
+
]]>
@@ -2523,11 +2526,11 @@
An array of structures that represents the rectangles to add.
Adds a series of rectangles to this path.
- .
-
+ .
+
]]>
@@ -2585,25 +2588,25 @@
A that specifies text formatting information, such as line spacing and alignment.
Adds a text string to this path.
- `e`, an event object. The code performs the following actions:
-
-- Creates a path.
-
-- Sets up string and font arguments.
-
-- Adds the string to the path.
-
-- Draws the string to the screen.
-
- There are two important things to be pointed out. First, notice that the `fontStyle` argument is cast as an integer. The method requires this so that two or more members can be combined to create the desired font style (in this case, and ). Secondly, notice that the method is used rather than the method. If is used, solid text is rendered, whereas if is used, the text will be an outline style.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a path.
+
+- Sets up string and font arguments.
+
+- Adds the string to the path.
+
+- Draws the string to the screen.
+
+ There are two important things to be pointed out. First, notice that the `fontStyle` argument is cast as an integer. The method requires this so that two or more members can be combined to create the desired font style (in this case, and ). Secondly, notice that the method is used rather than the method. If is used, solid text is rendered, whereas if is used, the text will be an outline style.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet14":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet14":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet14":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet14":::
+
]]>
@@ -2652,11 +2655,11 @@
A that specifies text formatting information, such as line spacing and alignment.
Adds a text string to this path.
- .
-
+ .
+
]]>
@@ -2705,11 +2708,11 @@
A that specifies text formatting information, such as line spacing and alignment.
Adds a text string to this path.
- .
-
+ .
+
]]>
@@ -2758,11 +2761,11 @@
A that specifies text formatting information, such as line spacing and alignment.
Adds a text string to this path.
- .
-
+ .
+
]]>
@@ -2797,32 +2800,32 @@
Clears all markers from this path.
- method to create a marker at the current location in a . Use the method to iterate through the existing markers in a path.
-
- Markers are used to separate groups of subpaths. One or more subpaths can be contained between two markers.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
-
-- Creates a path.
-
-- Adds several objects to the path.
-
-- Adds markers to the path.
-
-- Clears all markers from the path.
-
-- Draws the path to the screen.
-
+ method to create a marker at the current location in a . Use the method to iterate through the existing markers in a path.
+
+ Markers are used to separate groups of subpaths. One or more subpaths can be contained between two markers.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
+
+- Creates a path.
+
+- Adds several objects to the path.
+
+- Adds markers to the path.
+
+- Clears all markers from the path.
+
+- Draws the path to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet15":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet15":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet15":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet15":::
+
]]>
@@ -2861,27 +2864,27 @@
Creates an exact copy of this path.
The this method creates, cast as an object.
- `e`, an event object. The code performs the following actions:
-
-- Creates a path.
-
-- Adds several figures to the path.
-
-- Draws the path to the screen.
-
-- Clones a copy of that path.
-
-- Draws the new path to the screen.
-
- Notice that the call the method must be cast as a .
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a path.
+
+- Adds several figures to the path.
+
+- Draws the path to the screen.
+
+- Clones a copy of that path.
+
+- Draws the new path to the screen.
+
+ Notice that the call the method must be cast as a .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet16":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet16":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet16":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet16":::
+
]]>
@@ -2916,23 +2919,23 @@
Closes all open figures in this path and starts a new figure. It closes each open figure by connecting a line from its endpoint to its starting point.
- `e`, an event object. The code performs the following actions:
-
-- Creates a path.
-
-- Adds several open figures to the path.
-
-- Closes all figures in the path.
-
-- Draws the path to the screen.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a path.
+
+- Adds several open figures to the path.
+
+- Closes all figures in the path.
+
+- Draws the path to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet17":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet17":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet17":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet17":::
+
]]>
@@ -2967,15 +2970,15 @@
Closes the current figure and starts a new figure. If the current figure contains a sequence of connected lines and curves, the method closes the loop by connecting a line from the endpoint to the starting point.
- `e`, an event object. The code creates a triangle by creating a new path, starting a figure, adding two intersecting lines to the figure, and then closing the figure to form a triangle. The path is then drawn to the screen.
-
+ `e`, an event object. The code creates a triangle by creating a new path, starting a figure, adding two intersecting lines to the figure, and then closing the figure to form a triangle. The path is then drawn to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet18":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet18":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet18":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet18":::
+
]]>
@@ -3013,11 +3016,11 @@
Releases all resources used by this .
- allows the resources used by this to be reallocated for other purposes.
-
+ allows the resources used by this to be reallocated for other purposes.
+
]]>
@@ -3131,11 +3134,11 @@
Converts each curve in this path into a sequence of connected line segments.
- .
-
+ .
+
]]>
@@ -3180,11 +3183,11 @@
A by which to transform this before flattening.
Applies the specified transform and then converts each curve in this into a sequence of connected line segments.
- .
-
+ .
+
]]>
@@ -3225,27 +3228,27 @@
Specifies the maximum permitted error between the curve and its flattened approximation. A value of 0.25 is the default. Reducing the flatness value will increase the number of line segments in the approximation.
Converts each curve in this into a sequence of connected line segments.
- `e`, an event object. The code performs the following actions:
-
-- Creates a graphics path and a translation matrix.
-
-- Adds a curve to the path using four points.
-
-- Draws the path (curve) to the screen, using a black pen.
-
-- Shifts the curve down 10 pixels and flattens it.
-
-- Draws the curve to the screen using, a red pen.
-
- Notice that the red curve has flattened lines connecting the points.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a graphics path and a translation matrix.
+
+- Adds a curve to the path using four points.
+
+- Draws the path (curve) to the screen, using a black pen.
+
+- Shifts the curve down 10 pixels and flattens it.
+
+- Draws the curve to the screen using, a red pen.
+
+ Notice that the red curve has flattened lines connecting the points.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet19":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet19":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet19":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet19":::
+
]]>
@@ -3296,40 +3299,40 @@
Returns a rectangle that bounds this .
A that represents a rectangle that bounds this .
- `e`, an event object. The code performs the following actions:
-
-- Creates a graphics path.
-
-- Adds an ellipse (circle) to it and draws it to the screen.
-
-- Retrieves the bounding rectangle for the circle with a call to and draws the rectangle to the screen.
-
-- Creates a second graphics path.
-
-- Adds a circle and widens the path to a width of 10.
-
-- Draws the path to the screen.
-
-- Retrieves the bounding rectangle for the second circle.
-
-- Draws the bounding rectangle to the screen.
-
-- Displays the rectangle size in a dialog box.
-
- Notice that the bounding rectangle on the right is larger (to account for the extra width of the line).
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a graphics path.
+
+- Adds an ellipse (circle) to it and draws it to the screen.
+
+- Retrieves the bounding rectangle for the circle with a call to and draws the rectangle to the screen.
+
+- Creates a second graphics path.
+
+- Adds a circle and widens the path to a width of 10.
+
+- Draws the path to the screen.
+
+- Retrieves the bounding rectangle for the second circle.
+
+- Draws the bounding rectangle to the screen.
+
+- Displays the rectangle size in a dialog box.
+
+ Notice that the bounding rectangle on the right is larger (to account for the extra width of the line).
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet20":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet20":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet20":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet20":::
+
]]>
@@ -3375,16 +3378,16 @@
Returns a rectangle that bounds this when this path is transformed by the specified .
A that represents a rectangle that bounds this .
- .
-
+ .
+
]]>
@@ -3426,16 +3429,16 @@
Returns a rectangle that bounds this when the current path is transformed by the specified and drawn with the specified .
A that represents a rectangle that bounds this .
- .
-
+ .
+
]]>
@@ -3471,15 +3474,15 @@
Gets the last point in the array of this .
A that represents the last point in this .
- `e`, an event object. The code creates a path, adds a line to the path, and then gets the last point in the path.
-
+ `e`, an event object. The code creates a path, adds a line to the path, and then gets the last point in the path.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet21":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet21":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet21":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet21":::
+
]]>
@@ -3535,16 +3538,16 @@
Indicates whether the specified point is contained within (under) the outline of this when drawn with the specified .
This method returns if the specified point is contained within the outline of this when drawn with the specified ; otherwise, .
- .
-
+ .
+
]]>
@@ -3591,16 +3594,16 @@
Indicates whether the specified point is contained within (under) the outline of this when drawn with the specified .
This method returns if the specified point is contained within the outline of this when drawn with the specified ; otherwise, .
- .
-
+ .
+
]]>
@@ -3644,16 +3647,16 @@
Indicates whether the specified point is contained within (under) the outline of this when drawn with the specified and using the specified .
This method returns if the specified point is contained within the outline of this as drawn with the specified ; otherwise, .
- .
-
+ .
+
]]>
@@ -3697,16 +3700,16 @@
Indicates whether the specified point is contained within (under) the outline of this when drawn with the specified and using the specified .
This method returns if the specified point is contained within (under) the outline of this as drawn with the specified ; otherwise, .
- .
-
+ .
+
]]>
@@ -3749,16 +3752,16 @@
Indicates whether the specified point is contained within (under) the outline of this when drawn with the specified .
This method returns if the specified point is contained within the outline of this when drawn with the specified ; otherwise, .
- .
-
+ .
+
]]>
@@ -3801,16 +3804,16 @@
Indicates whether the specified point is contained within (under) the outline of this when drawn with the specified .
This method returns if the specified point is contained within the outline of this when drawn with the specified ; otherwise, .
- .
-
+ .
+
]]>
@@ -3856,30 +3859,30 @@
Indicates whether the specified point is contained within (under) the outline of this when drawn with the specified and using the specified .
This method returns if the specified point is contained within the outline of this as drawn with the specified ; otherwise, .
- `e`, an event. The code performs the following actions:
-
-- Creates a path.
-
-- Adds a rectangle to the path.
-
-- Creates a wide pen and widens the path with that pen (to make the example clearer),
-
-- Tests a point (100, 50) to see if it lies within (under) one of the edges of the rectangle by calling .
-
- The result is shown in the message box (in this case, true). In other words the edge is rendered over that point.
-
+ `e`, an event. The code performs the following actions:
+
+- Creates a path.
+
+- Adds a rectangle to the path.
+
+- Creates a wide pen and widens the path with that pen (to make the example clearer),
+
+- Tests a point (100, 50) to see if it lies within (under) one of the edges of the rectangle by calling .
+
+ The result is shown in the message box (in this case, true). In other words the edge is rendered over that point.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet22":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet22":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet22":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet22":::
+
]]>
@@ -3925,16 +3928,16 @@
Indicates whether the specified point is contained within (under) the outline of this when drawn with the specified and using the specified .
This method returns if the specified point is contained within (under) the outline of this as drawn with the specified ; otherwise, .
- .
-
+ .
+
]]>
@@ -3988,11 +3991,11 @@
Indicates whether the specified point is contained within this .
This method returns if the specified point is contained within this ; otherwise, .
-
@@ -4037,11 +4040,11 @@
Indicates whether the specified point is contained within this .
This method returns if the specified point is contained within this ; otherwise, .
- .
-
+ .
+
]]>
@@ -4083,16 +4086,16 @@
Indicates whether the specified point is contained within this .
This method returns if the specified point is contained within this ; otherwise, .
-
@@ -4134,16 +4137,16 @@
Indicates whether the specified point is contained within this .
This method returns if the specified point is contained within this; otherwise, .
- .
-
+ .
+
]]>
@@ -4184,11 +4187,11 @@
Indicates whether the specified point is contained within this .
This method returns if the specified point is contained within this ; otherwise, .
- .
-
+ .
+
]]>
@@ -4229,11 +4232,11 @@
Indicates whether the specified point is contained within this .
This method returns if the specified point is contained within this ; otherwise, .
- .
-
+ .
+
]]>
@@ -4277,26 +4280,26 @@
Indicates whether the specified point is contained within this , using the specified .
This method returns if the specified point is contained within this ; otherwise, .
- `e`, an event object. The code performs the following actions:
-
-- Creates a path and adds an ellipse to the path.
-
-- Tests whether the specified point is contained within the path.
-
-- Displays the result in a dialog box.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a path and adds an ellipse to the path.
+
+- Tests whether the specified point is contained within the path.
+
+- Displays the result in a dialog box.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet23":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet23":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet23":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet23":::
+
]]>
@@ -4340,16 +4343,16 @@
Indicates whether the specified point is contained within this in the visible clip region of the specified .
This method returns if the specified point is contained within this ; otherwise, .
- .
-
+ .
+
]]>
@@ -4454,20 +4457,20 @@
Gets the types of the corresponding points in the array.
An array of bytes that specifies the types of the corresponding points in the path.
- property specifies point types and flags for the data points in a path. For each point, bits 0 through 2 indicate the type of a point, and bits 3 through 7 hold a set of flags that specify the attributes of a point. The following table shows possible values and their meanings.
-
-|Value|Meaning|
-|-----------|-------------|
-|0|Indicates that the point is the start of a figure.|
-|1|Indicates that the point is one of the two endpoints of a line.|
-|3|Indicates that the point is an endpoint or control point of a cubic Bézier spline.|
-|0x7|Masks all bits except for the three low-order bits, which indicate the point type.|
-|0x20|Specifies that the point is a marker.|
-|0x80|Specifies that the point is the last point in a closed subpath (figure).|
-
+ property specifies point types and flags for the data points in a path. For each point, bits 0 through 2 indicate the type of a point, and bits 3 through 7 hold a set of flags that specify the attributes of a point. The following table shows possible values and their meanings.
+
+|Value|Meaning|
+|-----------|-------------|
+|0|Indicates that the point is the start of a figure.|
+|1|Indicates that the point is one of the two endpoints of a line.|
+|3|Indicates that the point is an endpoint or control point of a cubic Bézier spline.|
+|0x7|Masks all bits except for the three low-order bits, which indicate the point type.|
+|0x20|Specifies that the point is a marker.|
+|0x80|Specifies that the point is the last point in a closed subpath (figure).|
+
]]>
@@ -4534,29 +4537,29 @@
Empties the and arrays and sets the to .
- `e`, an event object. The code performs the following actions:
-
-- Creates a path.
-
-- Adds several primitives to it.
-
-- Draws the path's points array to the screen.
-
-- Resets the path to an empty state.
-
-- Re-acquires the points array (if it exists).
-
-- Draws the array to the screen.
-
- Notice that it finds no array following the reset call.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a path.
+
+- Adds several primitives to it.
+
+- Draws the path's points array to the screen.
+
+- Resets the path to an empty state.
+
+- Re-acquires the points array (if it exists).
+
+- Draws the array to the screen.
+
+ Notice that it finds no array following the reset call.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet24":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet24":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet24":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet24":::
+
]]>
@@ -4591,23 +4594,23 @@
Reverses the order of points in the array of this .
- `e`, an event object. The code performs the following actions:
-
-- Creates a path and adds several primitives to the path.
-
-- Draws the path's points array to the screen.
-
-- Draws the reversed points array to the screen.
-
- Notice that the second listing of points is in reverse order from the first.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a path and adds several primitives to the path.
+
+- Draws the path's points array to the screen.
+
+- Draws the reversed points array to the screen.
+
+ Notice that the second listing of points is in reverse order from the first.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet25":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet25":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet25":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet25":::
+
]]>
@@ -4642,22 +4645,22 @@
Sets a marker on this .
- methods to iterate through the markers in the path.
-
- Markers are used to separate groups of subpaths. One or more subpaths can be contained between two markers in the path.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code creates a path and adds several primitives to the path separated by markers, and draws the path to the screen.
-
+ methods to iterate through the markers in the path.
+
+ Markers are used to separate groups of subpaths. One or more subpaths can be contained between two markers in the path.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code creates a path and adds several primitives to the path separated by markers, and draws the path to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet26":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet26":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet26":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet26":::
+
]]>
@@ -4692,30 +4695,30 @@
Starts a new figure without closing the current figure. All subsequent points added to the path are added to this new figure.
- class to iterate through the subpaths.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
-
-- Creates a path.
-
-- Adds two sets of figures. The first set of figures combines four primitives into two figures. The second set of figures combines the same four primitives (except that they are offset in the y-axis) into three figures.
-
-- Draws all the figures to the screen.
-
- Notice the difference in the appearance between the two sets of figures.
-
+ class to iterate through the subpaths.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
+
+- Creates a path.
+
+- Adds two sets of figures. The first set of figures combines four primitives into two figures. The second set of figures combines the same four primitives (except that they are offset in the y-axis) into three figures.
+
+- Draws all the figures to the screen.
+
+ Notice the difference in the appearance between the two sets of figures.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet27":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet27":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet27":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet27":::
+
]]>
@@ -4753,30 +4756,30 @@
A that represents the transformation to apply.
Applies a transform matrix to this .
- .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
-
-- Creates a path and adds an ellipse to the path.
-
-- Draws path to the screen.
-
-- Creates a transform matrix to translate the path 100 units in the x-axis direction.
-
-- Draws the transformed path to the screen.
-
- Notice that the original ellipse is drawn in black and the transformed ellipse is drawn in red.
-
+ .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
+
+- Creates a path and adds an ellipse to the path.
+
+- Draws path to the screen.
+
+- Creates a transform matrix to translate the path 100 units in the x-axis direction.
+
+- Draws the transformed path to the screen.
+
+ Notice that the original ellipse is drawn in black and the transformed ellipse is drawn in red.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet28":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet28":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet28":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet28":::
+
]]>
@@ -4831,11 +4834,11 @@
A that represents the rectangle that is transformed to the parallelogram defined by .
Applies a warp transform, defined by a rectangle and a parallelogram, to this .
- .
-
+ .
+
]]>
@@ -4884,11 +4887,11 @@
A that specifies a geometric transform to apply to the path.
Applies a warp transform, defined by a rectangle and a parallelogram, to this .
- .
-
+ .
+
]]>
@@ -4939,11 +4942,11 @@
A enumeration that specifies whether this warp operation uses perspective or bilinear mode.
Applies a warp transform, defined by a rectangle and a parallelogram, to this .
- .
-
+ .
+
]]>
@@ -4990,23 +4993,23 @@
A value from 0 through 1 that specifies how flat the resulting path is. For more information, see the methods.
Applies a warp transform, defined by a rectangle and a parallelogram, to this .
- `e`, an event object. The code performs the following actions:
-
-- Creates a path and adds a rectangle to the path.
-
-- Draws that rectangle to the screen in black.
-
-- Warps the path with a perspective warp.
-
-- Draws the warped rectangle (path) to the screen in red.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a path and adds a rectangle to the path.
+
+- Draws that rectangle to the screen in black.
+
+- Warps the path with a perspective warp.
+
+- Draws the warped rectangle (path) to the screen in red.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet29":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet29":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet29":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet29":::
+
]]>
@@ -5053,16 +5056,16 @@
A that specifies the width between the original outline of the path and the new outline this method creates.
Adds an additional outline to the path.
- , with a distance between the existing lines and the new outline equal to that of the width of the used in the call to . If you want to fill the space between the lines you must use the rather then the .
-
-
-
-## Examples
- For an example, see .
-
+ , with a distance between the existing lines and the new outline equal to that of the width of the used in the call to . If you want to fill the space between the lines you must use the rather then the .
+
+
+
+## Examples
+ For an example, see .
+
]]>
@@ -5103,16 +5106,16 @@
A that specifies a transform to apply to the path before widening.
Adds an additional outline to the .
- , with a distance between the existing lines and the new outline equal to that of the width of the used in the call to . If you want to fill the space between the lines you must use the rather then the .
-
-
-
-## Examples
- For an example, see .
-
+ , with a distance between the existing lines and the new outline equal to that of the width of the used in the call to . If you want to fill the space between the lines you must use the rather then the .
+
+
+
+## Examples
+ For an example, see .
+
]]>
@@ -5155,30 +5158,30 @@
A value that specifies the flatness for curves.
Replaces this with curves that enclose the area that is filled when this path is drawn by the specified pen.
- , with a distance between the existing lines and the new outline equal to that of the width of the used in the call to . If you want to fill the space between the lines you must use the rather then the .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
-
-- Creates a path and adds two ellipses to the path.
-
-- Draws the path in black.
-
-- Widens the path.
-
-- Draws the path in red.
-
- Notice that the second rendering uses instead of , and hence the rendered figure has the outline filled.
-
+ , with a distance between the existing lines and the new outline equal to that of the width of the used in the call to . If you want to fill the space between the lines you must use the rather then the .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
+
+- Creates a path and adds two ellipses to the path.
+
+- Draws the path in black.
+
+- Widens the path.
+
+- Draws the path in red.
+
+ Notice that the second rendering uses instead of , and hence the rendered figure has the outline filled.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CPP/form1.cpp" id="Snippet30":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/CS/form1.cs" id="Snippet30":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet30":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathExamples/VB/form1.vb" id="Snippet30":::
+
]]>
diff --git a/xml/System.Drawing.Drawing2D/GraphicsPathIterator.xml b/xml/System.Drawing.Drawing2D/GraphicsPathIterator.xml
index cacfc01df65..5170ce46b08 100644
--- a/xml/System.Drawing.Drawing2D/GraphicsPathIterator.xml
+++ b/xml/System.Drawing.Drawing2D/GraphicsPathIterator.xml
@@ -30,7 +30,15 @@
Provides the ability to iterate through subpaths in a and test the types of shapes contained in each subpath. This class cannot be inherited.
- To be added.
+
+
+
@@ -106,34 +114,34 @@
Copies the property and property arrays of the associated into the two specified arrays.
The number of points copied.
- `e`, an event object. The code performs the following actions:
-
-- Creates a graphics path.
-
-- Populates it with several primitives and some markers.
-
-- Lists the path data on the left side of the screen.
-
-- Creates a and rewinds it.
-
-- Increments the path data index to the second marker.
-
-- Calls the method to copy the path data contained between the start and end indexes to the points and types arrays.
-
-- Lists this copied data on the right side of the screen.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a graphics path.
+
+- Populates it with several primitives and some markers.
+
+- Lists the path data on the left side of the screen.
+
+- Creates a and rewinds it.
+
+- Increments the path data index to the second marker.
+
+- Calls the method to copy the path data contained between the start and end indexes to the points and types arrays.
+
+- Lists this copied data on the right side of the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -203,11 +211,11 @@
Releases all resources used by this object.
- object to be reallocated for other purposes.
-
+ object to be reallocated for other purposes.
+
]]>
@@ -248,29 +256,29 @@
Copies the property and property arrays of the associated into the two specified arrays.
The number of points copied.
- `e`, an event object. The code performs the following actions:
-
-- Creates a graphics path.
-
-- Populates it with several primitives and some markers.
-
-- Lists the path data on the left side of the screen.
-
-- Creates a and rewinds it.
-
-- Increments the path data index to the second marker.
-
-- Calls the method to copy the path data to the `points` and `types` arrays.
-
-- Lists this copied data on the right side of the screen.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a graphics path.
+
+- Populates it with several primitives and some markers.
+
+- Lists the path data on the left side of the screen.
+
+- Creates a and rewinds it.
+
+- Increments the path data index to the second marker.
+
+- Calls the method to copy the path data to the `points` and `types` arrays.
+
+- Lists this copied data on the right side of the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -338,34 +346,34 @@
Indicates whether the path associated with this contains a curve.
This method returns if the current subpath contains a curve; otherwise, .
- returns `true`. If all points in the array belong to lines, then returns `false`.
-
- Certain methods flatten a path, which means that all the curves in the path are converted to sequences of lines. After a path has been flattened, will always return `false`. Calling the , , or method of the class will flatten a path.
-
-
-
-## Examples
- The following example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
-
-- Creates a object, `myPath`.
-
-- Adds three lines, a rectangle, and an ellipse.
-
-- Creates a object for `myPath`.
-
-- Tests to see if the current path `myPath` contains a curve.
-
-- Shows the result of the test in a message box.
-
+ returns `true`. If all points in the array belong to lines, then returns `false`.
+
+ Certain methods flatten a path, which means that all the curves in the path are converted to sequences of lines. After a path has been flattened, will always return `false`. Calling the , , or method of the class will flatten a path.
+
+
+
+## Examples
+ The following example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
+
+- Creates a object, `myPath`.
+
+- Adds three lines, a rectangle, and an ellipse.
+
+- Creates a object for `myPath`.
+
+- Tests to see if the current path `myPath` contains a curve.
+
+- Shows the result of the test in a message box.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -413,36 +421,36 @@
This object has a object associated with it. The method increments the associated to the next marker in its path and copies all the points contained between the current marker and the next marker (or end of path) to a second object passed in to the parameter.
The number of points between this marker and the next.
- method to set markers in a path. Markers are used to create groups of subpaths. One or more subpaths can be between two markers.
-
-
-
-## Examples
- The following example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
-
-- Creates a object.
-
-- Adds three lines, a rectangle, an ellipse, and two markers.
-
-- Lists the values of all the path's points to the left side of the screen.
-
-- Creates a object.
-
-- Creates a object, `myPathSection`, to receive copied points.
-
-- Calls the method, which iterates to the first marker and copies all the points contained between that marker and the next to `myPathSection`.
-
-- Returns the number of points copied to `markerPoints`.
-
-- Lists the marker number (the first marker) and number of points it contains to the right side of the screen.
-
+ method to set markers in a path. Markers are used to create groups of subpaths. One or more subpaths can be between two markers.
+
+
+
+## Examples
+ The following example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
+
+- Creates a object.
+
+- Adds three lines, a rectangle, an ellipse, and two markers.
+
+- Lists the values of all the path's points to the left side of the screen.
+
+- Creates a object.
+
+- Creates a object, `myPathSection`, to receive copied points.
+
+- Calls the method, which iterates to the first marker and copies all the points contained between that marker and the next to `myPathSection`.
+
+- Returns the number of points copied to `markerPoints`.
+
+- Lists the marker number (the first marker) and number of points it contains to the right side of the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/CPP/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/CS/form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/VB/form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/VB/form1.vb" id="Snippet4":::
+
]]>
@@ -483,34 +491,34 @@
Increments the to the next marker in the path and returns the start and stop indexes by way of the [out] parameters.
The number of points between this marker and the next.
- method to set markers in a path. Markers are used to create groups of subpaths. One or more subpaths can be between two markers.
-
-
-
-## Examples
- The following example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
-
-- Creates a object.
-
-- Adds three lines, a rectangle, and an ellipse ¾ with markers between each.
-
-- Draws the values for the array of points to the screen.
-
-- Creates a object.
-
-- Calls the method.
-
-- Uses the values returned from the iterative calls to to draw the start and stop points for each marker to the screen.
-
-- Draws the value for the total number of points to the screen.
-
+ method to set markers in a path. Markers are used to create groups of subpaths. One or more subpaths can be between two markers.
+
+
+
+## Examples
+ The following example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
+
+- Creates a object.
+
+- Adds three lines, a rectangle, and an ellipse ¾ with markers between each.
+
+- Draws the values for the array of points to the screen.
+
+- Creates a object.
+
+- Calls the method.
+
+- Uses the values returned from the iterative calls to to draw the start and stop points for each marker to the screen.
+
+- Draws the value for the total number of points to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/VB/form1.vb" id="Snippet5":::
+
]]>
@@ -553,31 +561,31 @@
Gets the starting index and the ending index of the next group of data points that all have the same type.
This method returns the number of data points in the group. If there are no more groups in the path, this method returns 0.
- `e`, an event object. The code performs the following actions:
-
-- Creates a object.
-
-- Adds three lines, a rectangle, and an ellipse.
-
-- Lists the values of all the points to the left side of the screen.
-
-- Creates a and rewinds it.
-
-- In a `for` loop, iterates through the points using the and methods.
-
-- Uses the values returned from the iterative calls to list the subpath number, the number of points in it, and the type of the path points to the right side of the screen.
-
-- Displays the value for the total number of points to the screen.
-
- Note that `ListPathPoints` is a helper function that separates most (not all) of the display code from the graphics path code.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a object.
+
+- Adds three lines, a rectangle, and an ellipse.
+
+- Lists the values of all the points to the left side of the screen.
+
+- Creates a and rewinds it.
+
+- In a `for` loop, iterates through the points using the and methods.
+
+- Uses the values returned from the iterative calls to list the subpath number, the number of points in it, and the type of the path points to the right side of the screen.
+
+- Displays the value for the total number of points to the screen.
+
+ Note that `ListPathPoints` is a helper function that separates most (not all) of the display code from the graphics path code.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/CPP/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/CS/form1.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/VB/form1.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/VB/form1.vb" id="Snippet6":::
+
]]>
@@ -627,29 +635,29 @@
Gets the next figure (subpath) from the associated path of this .
The number of data points in the retrieved figure (subpath). If there are no more figures to retrieve, zero is returned.
- `e`, an event object. The code performs the following actions:
-
-- Creates a object.
-
-- Adds three lines, a rectangle, an ellipse, and two markers.
-
-- Lists the values of all the path's points to the left side of the screen.
-
-- Creates a object.
-
-- Creates a object, `myPathSection`, to receive copied points.
-
-- Calls the method, which iterates to the third subpath (figure) and copies all the points contained in that subpath to the `myPathSection` path, and also returns the number of points copied to `subpathPoints`.
-
-- Lists the subpath number and number of points it contains to the right side of the screen.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a object.
+
+- Adds three lines, a rectangle, an ellipse, and two markers.
+
+- Lists the values of all the path's points to the left side of the screen.
+
+- Creates a object.
+
+- Creates a object, `myPathSection`, to receive copied points.
+
+- Calls the method, which iterates to the third subpath (figure) and copies all the points contained in that subpath to the `myPathSection` path, and also returns the number of points copied to `subpathPoints`.
+
+- Lists the subpath number and number of points it contains to the right side of the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/CPP/form1.cpp" id="Snippet7":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/CS/form1.cs" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/VB/form1.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/VB/form1.vb" id="Snippet7":::
+
]]>
@@ -692,29 +700,29 @@
Moves the to the next subpath in the path. The start index and end index of the next subpath are contained in the [out] parameters.
The number of subpaths in the object.
- `e`, an event object. The code performs the following actions:
-
-- Creates a object.
-
-- Adds three lines, a rectangle, and an ellipse.
-
-- Draws the values for the array of points to the screen.
-
-- Creates a object.
-
-- Calls the method.
-
-- Uses the values returned from the iterative calls to to draw the start and stop values for each subpath to the screen.
-
-- Draws the value for the total number of subpaths to the screen.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a object.
+
+- Adds three lines, a rectangle, and an ellipse.
+
+- Draws the values for the array of points to the screen.
+
+- Creates a object.
+
+- Calls the method.
+
+- Uses the values returned from the iterative calls to to draw the start and stop values for each subpath to the screen.
+
+- Draws the value for the total number of subpaths to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/CPP/form1.cpp" id="Snippet8":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/CS/form1.cs" id="Snippet8":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/VB/form1.vb" id="Snippet8":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicGraphicsPathIterator/VB/form1.vb" id="Snippet8":::
+
]]>
@@ -749,11 +757,11 @@
Rewinds this to the beginning of its associated path.
- method of an iterator, it gets the first figure (subpath) of that iterator's associated path. The second time, it gets the second figure, and so on. When you call the method, the sequence starts over; that is, after you call , the next call to gets the first figure in the path. The and methods behave similarly.
-
+ method of an iterator, it gets the first figure (subpath) of that iterator's associated path. The second time, it gets the second figure, and so on. When you call the method, the sequence starts over; that is, after you call , the next call to gets the first figure in the path. The and methods behave similarly.
+
]]>
diff --git a/xml/System.Drawing.Drawing2D/GraphicsState.xml b/xml/System.Drawing.Drawing2D/GraphicsState.xml
index 6f2702a3366..ca0addb1fe3 100644
--- a/xml/System.Drawing.Drawing2D/GraphicsState.xml
+++ b/xml/System.Drawing.Drawing2D/GraphicsState.xml
@@ -26,7 +26,15 @@
Represents the state of a object. This object is returned by a call to the methods. This class cannot be inherited.
- To be added.
+
+
+
diff --git a/xml/System.Drawing.Drawing2D/HatchBrush.xml b/xml/System.Drawing.Drawing2D/HatchBrush.xml
index f0e86542054..057c8c964fd 100644
--- a/xml/System.Drawing.Drawing2D/HatchBrush.xml
+++ b/xml/System.Drawing.Drawing2D/HatchBrush.xml
@@ -27,23 +27,23 @@
Defines a rectangular brush with a hatch style, a foreground color, and a background color. This class cannot be inherited.
- , which fills the background and one for the lines that form the pattern over the background defined by the property. The property defines what type of pattern the brush has and can be any value from the enumeration. There are more than fifty elements in the enumeration.
-
- The following illustration shows an ellipse filled with a horizontal hatch pattern.
-
- 
-
-
-
-## Examples
- The following example shows how to create the shown in the previous illustration.
-
+ , which fills the background and one for the lines that form the pattern over the background defined by the property. The property defines what type of pattern the brush has and can be any value from the enumeration. There are more than fifty elements in the enumeration.
+
+ The following illustration shows an ellipse filled with a horizontal hatch pattern.
+
+ 
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+## Examples
+ The following example shows how to create the shown in the previous illustration.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.UsingABrush/CS/Class1.cs" id="Snippet41":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.UsingABrush/VB/Class1.vb" id="Snippet41":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.UsingABrush/VB/Class1.vb" id="Snippet41":::
+
]]>
@@ -89,11 +89,11 @@
The structure that represents the color of lines drawn by this .
Initializes a new instance of the class with the specified enumeration and foreground color.
-
@@ -132,21 +132,21 @@
The structure that represents the color of spaces between the lines drawn by this .
Initializes a new instance of the class with the specified enumeration, foreground color, and background color.
- to create the shown in the previous illustration.
-
+ to create the shown in the previous illustration.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.UsingABrush/CS/Class1.cs" id="Snippet41":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.UsingABrush/VB/Class1.vb" id="Snippet41":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.UsingABrush/VB/Class1.vb" id="Snippet41":::
+
]]>
diff --git a/xml/System.Drawing.Drawing2D/LinearGradientBrush.xml b/xml/System.Drawing.Drawing2D/LinearGradientBrush.xml
index f244d7e814c..bb29d3fedec 100644
--- a/xml/System.Drawing.Drawing2D/LinearGradientBrush.xml
+++ b/xml/System.Drawing.Drawing2D/LinearGradientBrush.xml
@@ -27,27 +27,27 @@
Encapsulates a with a linear gradient. This class cannot be inherited.
- class, the methods, or the methods. Customize the direction of the gradient by specifying the enumeration or the angle in the constructor.
-
- Use the property to create a multicolor gradient.
-
- The property specifies a local geometric transform applied to the gradient.
-
-
-
-## Examples
- The following example creates a horizontal ; the color components change linearly as you move from a horizontal coordinate of 0 to a horizontal coordinate of 200. For example, a point whose first coordinate is halfway between 0 and 200 will have a blue component that is halfway between 0 and 255. This example is designed for use with Windows Forms. The following code example is designed for use with Windows Forms, and it requires the `e`, which is a parameter of .
-
+ class, the methods, or the methods. Customize the direction of the gradient by specifying the enumeration or the angle in the constructor.
+
+ Use the property to create a multicolor gradient.
+
+ The property specifies a local geometric transform applied to the gradient.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+## Examples
+ The following example creates a horizontal ; the color components change linearly as you move from a horizontal coordinate of 0 to a horizontal coordinate of 200. For example, a point whose first coordinate is halfway between 0 and 200 will have a blue component that is halfway between 0 and 255. This example is designed for use with Windows Forms. The following code example is designed for use with Windows Forms, and it requires the `e`, which is a parameter of .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.UsingaGradientBrush/CS/Class1.cs" id="Snippet21":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.UsingaGradientBrush/VB/Class1.vb" id="Snippet21":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.UsingaGradientBrush/VB/Class1.vb" id="Snippet21":::
+
]]>
How To: Create a Linear Gradient
@@ -218,15 +218,15 @@
The angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.
Creates a new instance of the class based on a rectangle, starting and ending colors, and an orientation angle.
-
@@ -311,15 +311,15 @@
The angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.
Creates a new instance of the class based on a rectangle, starting and ending colors, and an orientation angle.
-
@@ -362,15 +362,15 @@
Set to to specify that the angle is affected by the transform associated with this ; otherwise, .
Creates a new instance of the class based on a rectangle, starting and ending colors, and an orientation angle.
-
@@ -413,15 +413,15 @@
Set to to specify that the angle is affected by the transform associated with this ; otherwise, .
Creates a new instance of the class based on a rectangle, starting and ending colors, and an orientation angle.
-
@@ -467,11 +467,11 @@
Gets or sets a that specifies positions and factors that define a custom falloff for the gradient.
A that represents a custom falloff for the gradient.
- contains corresponding arrays of blend factors and positions. The blend factors specify the percentages of the starting color and ending color to use at the corresponding position. The positions are given as a percentage of distance along the gradient line.
-
+ contains corresponding arrays of blend factors and positions. The blend factors specify the percentages of the starting color and ending color to use at the corresponding position. The positions are given as a percentage of distance along the gradient line.
+
]]>
@@ -507,23 +507,23 @@
Creates an exact copy of this .
The this method creates, cast as an object.
- `e`, an event object. The code performs the following actions:
-
-- Creates a new .
-
-- Draws an ellipse to the screen using this brush.
-
-- Clones the (`clonedLGBrush`).
-
-- Draws an ellipse to the screen directly below the first ellipse, using the cloned brush.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a new .
+
+- Draws an ellipse to the screen using this brush.
+
+- Clones the (`clonedLGBrush`).
+
+- Draws an ellipse to the screen directly below the first ellipse, using the cloned brush.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -600,13 +600,13 @@
Gets or sets a that defines a multicolor linear gradient.
A that defines a multicolor linear gradient.
- contains corresponding arrays of colors and positions. The positions are values from 0 through 1 that specify the percentage of the distance along the gradient line where the corresponding color is located.
-
- Setting this property creates a multicolor gradient with one color at each position along the gradient line. Setting this property nullifies all previous color, position, and falloff settings for this .
-
+ contains corresponding arrays of colors and positions. The positions are values from 0 through 1 that specify the percentage of the distance along the gradient line where the corresponding color is located.
+
+ Setting this property creates a multicolor gradient with one color at each position along the gradient line. Setting this property nullifies all previous color, position, and falloff settings for this .
+
]]>
@@ -697,11 +697,11 @@
The by which to multiply the geometric transform.
Multiplies the that represents the local geometric transform of this by the specified by prepending the specified .
- .
-
+ .
+
]]>
@@ -741,25 +741,25 @@
A that specifies in which order to multiply the two matrices.
Multiplies the that represents the local geometric transform of this by the specified in the specified order.
- `e`, an event object. The code performs the following actions:
-
-- Creates a new .
-
-- Draws an ellipse to the screen using this brush.
-
-- Calls the method, to transform the .
-
-- Draws an ellipse to the screen directly below the first ellipse, using the transformed brush.
-
- Notice that the lower ellipse is stretched in the horizontal direction, and that the gradient is stretched to match the new shape.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a new .
+
+- Draws an ellipse to the screen using this brush.
+
+- Calls the method, to transform the .
+
+- Draws an ellipse to the screen directly below the first ellipse, using the transformed brush.
+
+ Notice that the lower ellipse is stretched in the horizontal direction, and that the gradient is stretched to match the new shape.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -800,11 +800,11 @@
Gets a rectangular region that defines the starting and ending points of the gradient.
A structure that specifies the starting and ending points of the gradient.
-
@@ -839,29 +839,29 @@
Resets the property to identity.
- `e`, an event object. The code performs the following actions:
-
-- Creates a new .
-
-- Draws an ellipse to the screen using this brush.
-
-- Calls the method to transform the .
-
-- Draws an ellipse to the screen directly below the first ellipse, using the transformed brush.
-
-- Resets the transform.
-
-- Draws a third ellipse to the screen below the first two.
-
- Notice that the lowest ellipse is drawn the same size as the first, and that, due to the call to the method, the gradient has been reduced to match.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a new .
+
+- Draws an ellipse to the screen using this brush.
+
+- Calls the method to transform the .
+
+- Draws an ellipse to the screen directly below the first ellipse, using the transformed brush.
+
+- Resets the transform.
+
+- Draws a third ellipse to the screen below the first two.
+
+ Notice that the lowest ellipse is drawn the same size as the first, and that, due to the call to the method, the gradient has been reduced to match.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -914,11 +914,11 @@
The angle of rotation.
Rotates the local geometric transform by the specified amount. This method prepends the rotation to the transform.
- .
-
+ .
+
]]>
@@ -958,25 +958,25 @@
A that specifies whether to append or prepend the rotation matrix.
Rotates the local geometric transform by the specified amount in the specified order.
- `e`, an event object. The code
-
-- Creates a new .
-
-- Draws an ellipse to the screen using this brush.
-
-- Rotates the 45 degrees by calling the method.
-
-- Draws an ellipse to the screen directly below the first ellipse, using the rotated brush.
-
- Notice that the gradient of the lower ellipse is at a 45 degree angle to the x-axis of the top ellipse. Also notice that a call to the method is used to justify the left edge of the gradient fill with the left edge of the lower ellipse.
-
+ `e`, an event object. The code
+
+- Creates a new .
+
+- Draws an ellipse to the screen using this brush.
+
+- Rotates the 45 degrees by calling the method.
+
+- Draws an ellipse to the screen directly below the first ellipse, using the rotated brush.
+
+ Notice that the gradient of the lower ellipse is at a 45 degree angle to the x-axis of the top ellipse. Also notice that a call to the method is used to justify the left edge of the gradient fill with the left edge of the lower ellipse.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/CPP/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/CS/form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/VB/form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/VB/form1.vb" id="Snippet4":::
+
]]>
@@ -1031,11 +1031,11 @@
The amount by which to scale the transform in the y-axis direction.
Scales the local geometric transform by the specified amounts. This method prepends the scaling matrix to the transform.
- .
-
+ .
+
]]>
@@ -1077,25 +1077,25 @@
A that specifies whether to append or prepend the scaling matrix.
Scales the local geometric transform by the specified amounts in the specified order.
- `e`, an event object. The code performs the following actions:
-
-- Creates a new .
-
-- Draw an ellipse to the screen using this brush.
-
-- Scales the by a factor of two in the x-axis.
-
-- Draws an ellipse to the screen directly below the first ellipse, using the scaled brush.
-
- Notice that the gradient of the lower ellipse is stretched by a factor of two. Also notice that a call to the method is used to justify the left edge of the gradient fill with the left edge of ellipse.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a new .
+
+- Draw an ellipse to the screen using this brush.
+
+- Scales the by a factor of two in the x-axis.
+
+- Draws an ellipse to the screen directly below the first ellipse, using the scaled brush.
+
+ Notice that the gradient of the lower ellipse is stretched by a factor of two. Also notice that a call to the method is used to justify the left edge of the gradient fill with the left edge of ellipse.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/VB/form1.vb" id="Snippet5":::
+
]]>
@@ -1148,16 +1148,16 @@
A value from 0 through 1 that specifies the center of the gradient (the point where the gradient is composed of only the ending color).
Creates a linear gradient with a center color and a linear falloff to a single color on both ends.
- .
-
+ .
+
]]>
@@ -1197,30 +1197,30 @@
A value from 0 through1 that specifies how fast the colors falloff from the starting color to (ending color)
Creates a linear gradient with a center color and a linear falloff to a single color on both ends.
- `e`, an event object. The code performs the following actions:
-
-- Creates a new .
-
-- Uses this brush to draw an ellipse to the screen that has a linear, left-to-right transition of colors.
-
-- Transforms the into a triangular shape with its peak in the center.
-
-- Draws a second ellipse to the screen using the transformed brush.
-
- Notice that the gradient of the lower ellipse transitions from blue to red and then back to blue.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a new .
+
+- Uses this brush to draw an ellipse to the screen that has a linear, left-to-right transition of colors.
+
+- Transforms the into a triangular shape with its peak in the center.
+
+- Draws a second ellipse to the screen using the transformed brush.
+
+ Notice that the gradient of the lower ellipse transitions from blue to red and then back to blue.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/CPP/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/CS/form1.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/VB/form1.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/VB/form1.vb" id="Snippet6":::
+
]]>
@@ -1273,16 +1273,16 @@
A value from 0 through 1 that specifies the center of the gradient (the point where the starting color and ending color are blended equally).
Creates a gradient falloff based on a bell-shaped curve.
- `.`
-
+ `.`
+
]]>
@@ -1322,30 +1322,30 @@
A value from 0 through 1 that specifies how fast the colors falloff from the .
Creates a gradient falloff based on a bell-shaped curve.
- `e`, an event object. The code performs the following actions:
-
-- Creates a new .
-
-- Uses this brush to draw an ellipse to the screen that has a linear, left-to-right transition of colors.
-
-- Transforms the to have a bell shaped curve with its peak in the center.
-
-- Draws a second ellipse to the screen using the bell-shaped brush.
-
- Notice that the gradient of the lower ellipse transitions from blue to red and then back to blue.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a new .
+
+- Uses this brush to draw an ellipse to the screen that has a linear, left-to-right transition of colors.
+
+- Transforms the to have a bell shaped curve with its peak in the center.
+
+- Draws a second ellipse to the screen using the bell-shaped brush.
+
+ Notice that the gradient of the lower ellipse transitions from blue to red and then back to blue.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/CPP/form1.cpp" id="Snippet7":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/CS/form1.cs" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/VB/form1.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/VB/form1.vb" id="Snippet7":::
+
]]>
@@ -1390,11 +1390,11 @@
Gets or sets a copy that defines a local geometric transform for this .
A copy of the that defines a geometric transform that applies only to fills drawn with this .
- property is a copy of the brush's geometric transform, you should dispose of the matrix when you no longer need it.
-
+ property is a copy of the brush's geometric transform, you should dispose of the matrix when you no longer need it.
+
]]>
@@ -1449,11 +1449,11 @@
The value of the translation in y.
Translates the local geometric transform by the specified dimensions. This method prepends the translation to the transform.
- .
-
+ .
+
]]>
@@ -1495,29 +1495,29 @@
The order (prepend or append) in which to apply the translation.
Translates the local geometric transform by the specified dimensions in the specified order.
- `e`, an event object. The code performs the following actions:
-
-- Creates a new .
-
-- Uses this brush to draw a rectangle to the screen that has a linear, left-to-right transition of colors.
-
-- Rotates the by 90 degrees and scales the gradient.
-
-- Draws the rectangle, with the rotated and scaled gradient, to the screen.
-
-- Translates the rectangle so that it has a linear gradient running from top to bottom.
-
-- Draws the translated rectangle to the screen.
-
- Notice that there are three rectangles displayed the top one showing the left-to-right gradient, the middle one showing the rotated and scaled gradient, and the bottom one showing the final, translated gradient.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a new .
+
+- Uses this brush to draw a rectangle to the screen that has a linear, left-to-right transition of colors.
+
+- Rotates the by 90 degrees and scales the gradient.
+
+- Draws the rectangle, with the rotated and scaled gradient, to the screen.
+
+- Translates the rectangle so that it has a linear gradient running from top to bottom.
+
+- Draws the translated rectangle to the screen.
+
+ Notice that there are three rectangles displayed the top one showing the left-to-right gradient, the middle one showing the rotated and scaled gradient, and the bottom one showing the final, translated gradient.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/CPP/form1.cpp" id="Snippet8":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/CS/form1.cs" id="Snippet8":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/VB/form1.vb" id="Snippet8":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicLinearGradientBrush/VB/form1.vb" id="Snippet8":::
+
]]>
diff --git a/xml/System.Drawing.Drawing2D/Matrix.xml b/xml/System.Drawing.Drawing2D/Matrix.xml
index 03470f85e9c..582ad97b603 100644
--- a/xml/System.Drawing.Drawing2D/Matrix.xml
+++ b/xml/System.Drawing.Drawing2D/Matrix.xml
@@ -31,44 +31,46 @@
Encapsulates a 3-by-3 affine matrix that represents a geometric transform. This class cannot be inherited.
- object. Because the third column of a matrix that represents an affine transformation is always (0, 0, 1), you specify only the six numbers in the first two columns when you construct a object. The statement `Matrix myMatrix = new Matrix(0, 1, -1, 0, 3, 4)` constructs the matrix shown in the following figure.
-
- 
-
-## Composite Transformations
- A composite transformation is a sequence of transformations, one followed by the other. Consider the matrices and transformations in the following list:
-
-|||
-|-|-|
-|Matrix A|Rotate 90 degrees|
-|Matrix B|Scale by a factor of 2 in the x direction|
-|Matrix C|Translate 3 units in the y direction|
-
- If we start with the point (2, 1) - represented by the matrix [2 1 1] - and multiply by A, then B, then C, the point (2, 1) will undergo the three transformations in the order listed.
-
- [2 1 1]ABC = [-2 5 1]
-
- Rather than store the three parts of the composite transformation in three separate matrices, you can multiply A, B, and C together to get a single 3×3 matrix that stores the entire composite transformation. Suppose ABC = D. Then a point multiplied by D gives the same result as a point multiplied by A, then B, then C.
-
- [2 1 1]D = [-2 5 1]
-
- The following illustration shows the matrices A, B, C, and D.
-
- 
-
- The fact that the matrix of a composite transformation can be formed by multiplying the individual transformation matrices means that any sequence of affine transformations can be stored in a single object.
-
+ object. Because the third column of a matrix that represents an affine transformation is always (0, 0, 1), you specify only the six numbers in the first two columns when you construct a object. The statement `Matrix myMatrix = new Matrix(0, 1, -1, 0, 3, 4)` constructs the matrix shown in the following figure.
+
+ 
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+## Composite Transformations
+ A composite transformation is a sequence of transformations, one followed by the other. Consider the matrices and transformations in the following list:
+
+|||
+|-|-|
+|Matrix A|Rotate 90 degrees|
+|Matrix B|Scale by a factor of 2 in the x direction|
+|Matrix C|Translate 3 units in the y direction|
+
+ If we start with the point (2, 1) - represented by the matrix [2 1 1] - and multiply by A, then B, then C, the point (2, 1) will undergo the three transformations in the order listed.
+
+ [2 1 1]ABC = [-2 5 1]
+
+ Rather than store the three parts of the composite transformation in three separate matrices, you can multiply A, B, and C together to get a single 3×3 matrix that stores the entire composite transformation. Suppose ABC = D. Then a point multiplied by D gives the same result as a point multiplied by A, then B, then C.
+
+ [2 1 1]D = [-2 5 1]
+
+ The following illustration shows the matrices A, B, C, and D.
+
+ 
+
+ The fact that the matrix of a composite transformation can be formed by multiplying the individual transformation matrices means that any sequence of affine transformations can be stored in a single object.
+
> [!CAUTION]
-> The order of a composite transformation is important. In general, rotate, then scale, then translate is not the same as scale, then rotate, then translate. Similarly, the order of matrix multiplication is important. In general, ABC is not the same as BAC.
-
- The class provides several methods for building a composite transformation: , , , , , and . The following example creates the matrix of a composite transformation that first rotates 30 degrees, then scales by a factor of 2 in the y direction, and then translates 5 units in the x direction:
-
+> The order of a composite transformation is important. In general, rotate, then scale, then translate is not the same as scale, then rotate, then translate. Similarly, the order of matrix multiplication is important. In general, ABC is not the same as BAC.
+
+ The class provides several methods for building a composite transformation: , , , , , and . The following example creates the matrix of a composite transformation that first rotates 30 degrees, then scales by a factor of 2 in the y direction, and then translates 5 units in the x direction:
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.CoordinateSystems/CS/Class1.cs" id="Snippet11":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.CoordinateSystems/VB/Class1.vb" id="Snippet11":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.CoordinateSystems/VB/Class1.vb" id="Snippet11":::
+
]]>
Coordinate Systems and Transformations
@@ -164,11 +166,11 @@
An array of three structures that represents the points of a parallelogram to which the upper-left, upper-right, and lower-left corners of the rectangle is to be transformed. The lower-right corner of the parallelogram is implied by the first three corners.
Initializes a new instance of the class to the geometric transform defined by the specified rectangle and array of points.
-
@@ -205,11 +207,11 @@
An array of three structures that represents the points of a parallelogram to which the upper-left, upper-right, and lower-left corners of the rectangle is to be transformed. The lower-right corner of the parallelogram is implied by the first three corners.
Initializes a new instance of the class to the geometric transform defined by the specified rectangle and array of points.
- such that it represents the geometric transform that maps the rectangle specified by the `rect` parameter to the parallelogram defined by the three points in the `plgpts` parameter. The upper-left corner of the rectangle is mapped to the first point in the `plgpts` array, the upper-right corner is mapped to the second point, and the lower-left corner is mapped to the third point. The lower-right point of the parallelogram is implied by the first three.
-
+ such that it represents the geometric transform that maps the rectangle specified by the `rect` parameter to the parallelogram defined by the three points in the `plgpts` parameter. The upper-left corner of the rectangle is mapped to the first point in the `plgpts` array, the upper-right corner is mapped to the second point, and the lower-left corner is mapped to the third point. The lower-right point of the parallelogram is implied by the first three.
+
]]>
@@ -322,11 +324,11 @@
Releases all resources used by this .
- object to be reallocated for other purposes.
-
+ object to be reallocated for other purposes.
+
]]>
@@ -361,11 +363,11 @@
Gets an array of floating-point values that represents the elements of this .
An array of floating-point values that represents the elements of this .
- are represented by the values in the array in that order.
-
+ are represented by the values in the array in that order.
+
]]>
@@ -502,16 +504,16 @@
Inverts this , if it is invertible.
-
@@ -649,11 +651,11 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
The by which this is to be multiplied.
Multiplies this by the matrix specified in the parameter, by prepending the specified .
- .
-
+ .
+
]]>
@@ -693,40 +695,40 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
The that represents the order of the multiplication.
Multiplies this by the matrix specified in the parameter, and in the order specified in the parameter.
- , this is multiplied by the specified matrix in a prepended order. If the specified order is , this is multiplied by the specified matrix in an appended order.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
-
-- Creates three matrices.
-
-- Lists the contents of matrix 1 to the screen.
-
-- Multiplies matrix 1 by matrix 2 and stores the result in matrix 1.
-
-- Lists the contents of matrix 1 to the screen.
-
-- Multiplies the result stored in matrix 1 by matrix 3, and again stores the result in matrix 1.
-
-- Lists the contents of matrix 1 to the screen.
-
-- Draws a rectangle to the screen prior to applying the matrix 1 transform (the blue rectangle).
-
-- Applies the transform to the rectangle.
-
-- Draws the transformed rectangle to the screen (the red rectangle), using the same coordinates as the previous rectangle.
-
- Notice that the red rectangle has been scaled by a factor of two in the horizontal direction, then rotated 90 degrees, and then moved (translated) 250 points in the x direction and 50 points in the y direction.
-
+ , this is multiplied by the specified matrix in a prepended order. If the specified order is , this is multiplied by the specified matrix in an appended order.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
+
+- Creates three matrices.
+
+- Lists the contents of matrix 1 to the screen.
+
+- Multiplies matrix 1 by matrix 2 and stores the result in matrix 1.
+
+- Lists the contents of matrix 1 to the screen.
+
+- Multiplies the result stored in matrix 1 by matrix 3, and again stores the result in matrix 1.
+
+- Lists the contents of matrix 1 to the screen.
+
+- Draws a rectangle to the screen prior to applying the matrix 1 transform (the blue rectangle).
+
+- Applies the transform to the rectangle.
+
+- Draws the transformed rectangle to the screen (the red rectangle), using the same coordinates as the previous rectangle.
+
+ Notice that the red rectangle has been scaled by a factor of two in the horizontal direction, then rotated 90 degrees, and then moved (translated) 250 points in the x direction and 50 points in the y direction.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -825,40 +827,40 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
Resets this to have the elements of the identity matrix.
- `e`, an event object. The code performs the following actions:
-
-- Creates a scaling matrix.
-
-- Lists the matrix elements to the screen.
-
-- Resets the matrix to identity.
-
-- Lists the elements to the screen.
-
-- Translates the matrix by 50 points in the x-axis and 40 points in the y-axis.
-
-- Lists the elements of the translated matrix to the screen.
-
-- Draws a rectangle is drawn to the screen prior to applying the matrix transform (the blue rectangle).
-
-- Applies the transform to the rectangle.
-
-- Draws the transformed rectangle is drawn to the screen (the red rectangle), using the same coordinates as the previous rectangle.
-
- Notice that the red rectangle was not scaled (because of the reset) but was translated in the x-axis and y-axis.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a scaling matrix.
+
+- Lists the matrix elements to the screen.
+
+- Resets the matrix to identity.
+
+- Lists the elements to the screen.
+
+- Translates the matrix by 50 points in the x-axis and 40 points in the y-axis.
+
+- Lists the elements of the translated matrix to the screen.
+
+- Draws a rectangle is drawn to the screen prior to applying the matrix transform (the blue rectangle).
+
+- Applies the transform to the rectangle.
+
+- Draws the transformed rectangle is drawn to the screen (the red rectangle), using the same coordinates as the previous rectangle.
+
+ Notice that the red rectangle was not scaled (because of the reset) but was translated in the x-axis and y-axis.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -911,11 +913,11 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
The angle of the rotation, in degrees.
Prepend to this a clockwise rotation, around the origin and by the specified angle.
- .
-
+ .
+
]]>
@@ -955,25 +957,25 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
A that specifies the order (append or prepend) in which the rotation is applied to this .
Applies a clockwise rotation of an amount specified in the parameter, around the origin (zero x and y coordinates) for this .
- `e`, an event object. The code performs the following actions:
-
-- Draws a rectangle to the screen prior to applying a rotation transform (the blue rectangle).
-
-- Creates a matrix and rotates it 45 degrees.
-
-- Applies this matrix transform to the rectangle.
-
-- Draws the transformed rectangle to the screen (the red rectangle).
-
- Notice that the red rectangle has been rotated around the 0, 0 screen coordinates.
-
+ `e`, an event object. The code performs the following actions:
+
+- Draws a rectangle to the screen prior to applying a rotation transform (the blue rectangle).
+
+- Creates a matrix and rotates it 45 degrees.
+
+- Applies this matrix transform to the rectangle.
+
+- Draws the transformed rectangle to the screen (the red rectangle).
+
+ Notice that the red rectangle has been rotated around the 0, 0 screen coordinates.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -1028,15 +1030,15 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
A that represents the center of the rotation.
Applies a clockwise rotation to this around the point specified in the parameter, and by prepending the rotation.
- and the method to rotate a string. This example is designed to be used with Windows Forms. Create a form and paste the following code into it. Call the `DrawVerticalStringFromBottomUp` method in the form's event handler, passing `e` as .
-
+ and the method to rotate a string. This example is designed to be used with Windows Forms. Create a form and paste the following code into it. Call the `DrawVerticalStringFromBottomUp` method in the form's event handler, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet5":::
+
]]>
@@ -1078,25 +1080,25 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
A that specifies the order (append or prepend) in which the rotation is applied.
Applies a clockwise rotation about the specified point to this in the specified order.
- `e`, an event object. The code performs the following actions:
-
-- Draws a rectangle to the screen prior to applying a rotation transform (the blue rectangle).
-
-- Creates a matrix and rotates it 45 degrees around a specified point.
-
-- Applies this matrix transform is to the rectangle.
-
-- Draws the transformed rectangle to the screen (the red rectangle).
-
- Notice that the red rectangle has been rotated around the upper left-hand corner of the rectangle (the rotation point specified the method).
-
+ `e`, an event object. The code performs the following actions:
+
+- Draws a rectangle to the screen prior to applying a rotation transform (the blue rectangle).
+
+- Creates a matrix and rotates it 45 degrees around a specified point.
+
+- Applies this matrix transform is to the rectangle.
+
+- Draws the transformed rectangle to the screen (the red rectangle).
+
+ Notice that the red rectangle has been rotated around the upper left-hand corner of the rectangle (the rotation point specified the method).
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CPP/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CS/form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet4":::
+
]]>
@@ -1151,11 +1153,11 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
The value by which to scale this in the y-axis direction.
Applies the specified scale vector to this by prepending the scale vector.
- .
-
+ .
+
]]>
@@ -1197,25 +1199,25 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
A that specifies the order (append or prepend) in which the scale vector is applied to this .
Applies the specified scale vector ( and ) to this using the specified order.
- `e`, an event object. The code performs the following actions:
-
-- Draws a rectangle to the screen prior to applying a scaling transform (the blue rectangle).
-
-- Creates a matrix and scales it by 3 in the x-axis and 2 in the y-axis.
-
-- Applies this matrix transform to the rectangle.
-
-- Draws the transformed rectangle to the screen (the red rectangle).
-
- Notice that the red rectangle has been scaled by a factor of 3 in the x-axis and by 2 in the y-axis, including the upper left-hand corner of the rectangle (the beginning point of the rectangle).
-
+ `e`, an event object. The code performs the following actions:
+
+- Draws a rectangle to the screen prior to applying a scaling transform (the blue rectangle).
+
+- Creates a matrix and scales it by 3 in the x-axis and 2 in the y-axis.
+
+- Applies this matrix transform to the rectangle.
+
+- Draws the transformed rectangle to the screen (the red rectangle).
+
+ Notice that the red rectangle has been scaled by a factor of 3 in the x-axis and by 2 in the y-axis, including the upper left-hand corner of the rectangle (the beginning point of the rectangle).
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet5":::
+
]]>
@@ -1264,30 +1266,30 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
The vertical shear factor.
Applies the specified shear vector to this by prepending the shear transformation.
- `e`, an event object. The code performs the following action:
-
-- Draws a rectangle to the screen, using a green pen, prior to applying a scaling transform.
-
-- Creates a and uses it to set a world-coordinate transform for the .
-
-- Draws another rectangle using a red pen.
-
-- Draws an ellipse using a blue pen.
-
- The result is a green rectangle, a red parallelogram and a transformed, blue ellipse. Notice that the green rectangle (drawn prior to setting the transform) directly uses the coordinates supplied in the call. The other two figures are transformed prior to drawing. The rectangle is transformed to a parallelogram (red), and the ellipse (blue) is transformed to fit into the transformed parallelogram. Notice the bottom of the rectangle is moved (sheared) in the x-axis by a factor of two times the height of the rectangle, thus forming the parallelogram.
-
+ `e`, an event object. The code performs the following action:
+
+- Draws a rectangle to the screen, using a green pen, prior to applying a scaling transform.
+
+- Creates a and uses it to set a world-coordinate transform for the .
+
+- Draws another rectangle using a red pen.
+
+- Draws an ellipse using a blue pen.
+
+ The result is a green rectangle, a red parallelogram and a transformed, blue ellipse. Notice that the green rectangle (drawn prior to setting the transform) directly uses the coordinates supplied in the call. The other two figures are transformed prior to drawing. The rectangle is transformed to a parallelogram (red), and the ellipse (blue) is transformed to fit into the transformed parallelogram. Notice the bottom of the rectangle is moved (sheared) in the x-axis by a factor of two times the height of the rectangle, thus forming the parallelogram.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CPP/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CS/form1.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet6":::
+
]]>
@@ -1329,16 +1331,16 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
A that specifies the order (append or prepend) in which the shear is applied.
Applies the specified shear vector to this in the specified order.
- .
-
+ .
+
]]>
@@ -1385,27 +1387,27 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
An array of structures that represents the points to transform.
Applies the geometric transform represented by this to a specified array of points.
- `e`, an event object. The code performs the following actions:
-
-- Creates an array of points that form a rectangle.
-
-- Draws this array of points (to the screen prior to applying a scaling transform (the blue rectangle).
-
-- Creates a matrix and scales it by 3 in the x-axis and 2 in the y-axis.
-
-- Applies this matrix transform to the array of points.
-
-- Draws the transformed array to the screen (the red rectangle).
-
- Notice that the red rectangle has been scaled by a factor of 3 in the x-axis and by 2 in the y-axis, including the upper left-hand corner of the rectangle (the beginning point of the rectangle).
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates an array of points that form a rectangle.
+
+- Draws this array of points (to the screen prior to applying a scaling transform (the blue rectangle).
+
+- Creates a matrix and scales it by 3 in the x-axis and 2 in the y-axis.
+
+- Applies this matrix transform to the array of points.
+
+- Draws the transformed array to the screen (the red rectangle).
+
+ Notice that the red rectangle has been scaled by a factor of 3 in the x-axis and by 2 in the y-axis, including the upper left-hand corner of the rectangle (the beginning point of the rectangle).
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CPP/form1.cpp" id="Snippet7":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CS/form1.cs" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet7":::
+
]]>
@@ -1443,11 +1445,11 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
An array of structures that represents the points to transform.
Applies the geometric transform represented by this to a specified array of points.
- .
-
+ .
+
]]>
@@ -1494,29 +1496,29 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
An array of structures that represents the points to transform.
Applies only the scale and rotate components of this to the specified array of points.
- `e`, an event object. The code performs the following actions:
-
-- Creates an array of points that form a rectangle.
-
-- Draws this array of points to the screen prior to applying a scaling transform (the blue rectangle).
-
-- Creates a matrix and scales it by 3 in the x-axis and 2 in the y-axis, and translates it by 100 in both axes.
-
-- Lists the matrix elements to the screen.
-
-- Applies this matrix transform to the array of points.
-
-- Draws the transformed array to the screen (the red rectangle).
-
- Notice that the red rectangle has been scaled by a factor of 3 in the x-axis and by 2 in the y-axis, including the upper left-hand corner of the rectangle (the beginning point of the rectangle) but the translation vector (the last two elements of the matrix) is ignored.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates an array of points that form a rectangle.
+
+- Draws this array of points to the screen prior to applying a scaling transform (the blue rectangle).
+
+- Creates a matrix and scales it by 3 in the x-axis and 2 in the y-axis, and translates it by 100 in both axes.
+
+- Lists the matrix elements to the screen.
+
+- Applies this matrix transform to the array of points.
+
+- Draws the transformed array to the screen (the red rectangle).
+
+ Notice that the red rectangle has been scaled by a factor of 3 in the x-axis and by 2 in the y-axis, including the upper left-hand corner of the rectangle (the beginning point of the rectangle) but the translation vector (the last two elements of the matrix) is ignored.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CPP/form1.cpp" id="Snippet8":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CS/form1.cs" id="Snippet8":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet8":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet8":::
+
]]>
@@ -1554,11 +1556,11 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
An array of structures that represents the points to transform.
Multiplies each vector in an array by the matrix. The translation elements of this matrix (third row) are ignored.
- .
-
+ .
+
]]>
@@ -1613,11 +1615,11 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
The y value by which to translate this .
Applies the specified translation vector ( and ) to this by prepending the translation vector.
- .
-
+ .
+
]]>
@@ -1659,25 +1661,25 @@ Matrix myMatrix = new Matrix(3, 5, 1, 2, 2, 4);
A that specifies the order (append or prepend) in which the translation is applied to this .
Applies the specified translation vector to this in the specified order.
- `e`, an event object. The code performs the following actions:
-
-- Draws a rectangle to the screen prior to applying a translate transform (the blue rectangle).
-
-- Creates a matrix and translates it by 100 in both axes.
-
-- Applies this matrix transform to the rectangle,
-
-- Draws the transformed rectangle to the screen (the red rectangle).
-
- Notice that the beginning of the red rectangle is located 100 points in both axes from the beginning of the blue triangle.
-
+ `e`, an event object. The code performs the following actions:
+
+- Draws a rectangle to the screen prior to applying a translate transform (the blue rectangle).
+
+- Creates a matrix and translates it by 100 in both axes.
+
+- Applies this matrix transform to the rectangle,
+
+- Draws the transformed rectangle to the screen (the red rectangle).
+
+ Notice that the beginning of the red rectangle is located 100 points in both axes from the beginning of the blue triangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CPP/form1.cpp" id="Snippet9":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/CS/form1.cs" id="Snippet9":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet9":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicMatrixExamples/VB/form1.vb" id="Snippet9":::
+
]]>
diff --git a/xml/System.Drawing.Drawing2D/PathGradientBrush.xml b/xml/System.Drawing.Drawing2D/PathGradientBrush.xml
index cb614b35511..04b85632ec0 100644
--- a/xml/System.Drawing.Drawing2D/PathGradientBrush.xml
+++ b/xml/System.Drawing.Drawing2D/PathGradientBrush.xml
@@ -27,21 +27,21 @@
Encapsulates a object that fills the interior of a object with a gradient. This class cannot be inherited.
- property of the object used to do the drawing. Areas filled using a object are rendered the same way (aliased) regardless of the smoothing mode.
-
-
-
-## Examples
- The following code example shows how to create a . This example is designed for use with Windows Forms, and it requires the e, which is a parameter of .
-
+ property of the object used to do the drawing. Areas filled using a object are rendered the same way (aliased) regardless of the smoothing mode.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+## Examples
+ The following code example shows how to create a . This example is designed for use with Windows Forms, and it requires the e, which is a parameter of .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.UsingaGradientBrush/CS/Class1.cs" id="Snippet11":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.UsingaGradientBrush/VB/Class1.vb" id="Snippet11":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.UsingaGradientBrush/VB/Class1.vb" id="Snippet11":::
+
]]>
How To: Create a Path Gradient
@@ -272,11 +272,11 @@
Gets or sets a that specifies positions and factors that define a custom falloff for the gradient.
A that represents a custom falloff for the gradient.
- contains corresponding arrays of blend factors and positions. The blend factors specify the percentages of the starting color and ending color to use at the corresponding position. The positions are given as a percentage of distance along the gradient path.
-
+ contains corresponding arrays of blend factors and positions. The blend factors specify the percentages of the starting color and ending color to use at the corresponding position. The positions are given as a percentage of distance along the gradient path.
+
]]>
@@ -450,11 +450,11 @@
Gets or sets a that defines a multicolor linear gradient.
A that defines a multicolor linear gradient.
- contains corresponding arrays of colors and positions. The positions are values from 0 through 1 that specify the percentage of the distance along the gradient path where the corresponding color is located.
-
+ contains corresponding arrays of colors and positions. The positions are values from 0 through 1 that specify the percentage of the distance along the gradient path where the corresponding color is located.
+
]]>
@@ -507,11 +507,11 @@
The that will be multiplied by the brush's current transformation matrix.
Updates the brush's transformation matrix with the product of brush's transformation matrix multiplied by another matrix.
- .
-
+ .
+
]]>
@@ -551,29 +551,29 @@
A that specifies in which order to multiply the two matrices.
Updates the brush's transformation matrix with the product of the brush's transformation matrix multiplied by another matrix.
- `e`, an event object. The code performs the following actions:
-
-- Creates a graphics path and adds a rectangle to it.
-
-- Creates a from the path points (in this example, the points form a rectangle, but it could be most any shape).
-
-- Sets the center color to red and the surrounding color to blue.
-
-- Draws the to the screen prior to applying the multiply transform.
-
-- Creates s matrix that rotates the brush 90 degrees and translates it by 100 in both axes.
-
-- Applies this matrix to the brush by using the method.
-
-- Draws the brush to the screen.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a graphics path and adds a rectangle to it.
+
+- Creates a from the path points (in this example, the points form a rectangle, but it could be most any shape).
+
+- Sets the center color to red and the surrounding color to blue.
+
+- Draws the to the screen prior to applying the multiply transform.
+
+- Creates s matrix that rotates the brush 90 degrees and translates it by 100 in both axes.
+
+- Applies this matrix to the brush by using the method.
+
+- Draws the brush to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -646,16 +646,16 @@
Resets the property to identity.
- .
-
-```csharp
-PathGradientBrush pgBrush = new PathGradientBrush(myPath);
- pgBrush.ResetTransform();
-```
-
+ .
+
+```csharp
+PathGradientBrush pgBrush = new PathGradientBrush(myPath);
+ pgBrush.ResetTransform();
+```
+
]]>
@@ -708,11 +708,11 @@ PathGradientBrush pgBrush = new PathGradientBrush(myPath);
The angle (extent) of rotation.
Rotates the local geometric transform by the specified amount. This method prepends the rotation to the transform.
- .
-
+ .
+
]]>
@@ -752,29 +752,29 @@ PathGradientBrush pgBrush = new PathGradientBrush(myPath);
A that specifies whether to append or prepend the rotation matrix.
Rotates the local geometric transform by the specified amount in the specified order.
- `e`, an event object. The code performs the following actions:
-
-- Creates a graphics path and adds a rectangle to it.
-
-- Creates a from the path points (in this example, the points form a rectangle, but it could be most any shape).
-
-- Sets the center color to red and the surrounding color to blue.
-
-- Draws the to the screen prior to applying the rotate transform.
-
-- Applies the rotate transform to the brush by using its method.
-
-- Draws the rotated brush (rectangle) to the screen.
-
- Notice that the bottom rectangle is rotated 45 degrees as compared to the one drawn prior to the translation.
-
+ `e`, an event object. The code performs the following actions:
+
+- Creates a graphics path and adds a rectangle to it.
+
+- Creates a from the path points (in this example, the points form a rectangle, but it could be most any shape).
+
+- Sets the center color to red and the surrounding color to blue.
+
+- Draws the to the screen prior to applying the rotate transform.
+
+- Applies the rotate transform to the brush by using its method.
+
+- Draws the rotated brush (rectangle) to the screen.
+
+ Notice that the bottom rectangle is rotated 45 degrees as compared to the one drawn prior to the translation.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -829,11 +829,11 @@ PathGradientBrush pgBrush = new PathGradientBrush(myPath);
The transform scale factor in the y-axis direction.
Scales the local geometric transform by the specified amounts. This method prepends the scaling matrix to the transform.
- .
-
+ .
+
]]>
@@ -875,31 +875,31 @@ PathGradientBrush pgBrush = new PathGradientBrush(myPath);
A that specifies whether to append or prepend the scaling matrix.
Scales the local geometric transform by the specified amounts in the specified order.
- `e`, an event object. The code
-
-- Creates a graphics path and adds a rectangle to it.
-
-- Creates a from the path points (in this example, the points form a rectangle, but it could be most any shape).
-
-- Sets the center color to red and the surrounding color to blue.
-
-- Draws the to the screen prior to applying the scale transform.
-
-- Applies the scale transform to the brush by using its method.
-
-- Calls the method to move the brush rectangle such that it does not overlay the one drawn to the screen earlier.
-
-- Draws the translated brush rectangle to the screen.
-
- Notice that the bottom rectangle is twice as long in the x-axis as is the one drawn prior to the translation.
-
+ `e`, an event object. The code
+
+- Creates a graphics path and adds a rectangle to it.
+
+- Creates a from the path points (in this example, the points form a rectangle, but it could be most any shape).
+
+- Sets the center color to red and the surrounding color to blue.
+
+- Draws the to the screen prior to applying the scale transform.
+
+- Applies the scale transform to the brush by using its method.
+
+- Calls the method to move the brush rectangle such that it does not overlay the one drawn to the screen earlier.
+
+- Draws the translated brush rectangle to the screen.
+
+ Notice that the bottom rectangle is twice as long in the x-axis as is the one drawn prior to the translation.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -952,16 +952,16 @@ PathGradientBrush pgBrush = new PathGradientBrush(myPath);
A value from 0 through 1 that specifies where, along any radial from the center of the path to the path's boundary, the center color will be at its highest intensity. A value of 1 (the default) places the highest intensity at the center of the path.
Creates a gradient with a center color and a linear falloff to one surrounding color.
- array, the first color in the array is used for the ending color. The colors specified in this array are used for discrete points on the brush's boundary path.
-
-
-
-## Examples
- For an example, see `.`
-
+ array, the first color in the array is used for the ending color. The colors specified in this array are used for discrete points on the brush's boundary path.
+
+
+
+## Examples
+ For an example, see `.`
+
]]>
@@ -1001,38 +1001,38 @@ PathGradientBrush pgBrush = new PathGradientBrush(myPath);
A value from 0 through 1 that specifies the maximum intensity of the center color that gets blended with the boundary color. A value of 1 causes the highest possible intensity of the center color, and it is the default value.
Creates a gradient with a center color and a linear falloff to each surrounding color.
- array, the first color in the array is used for the ending color. The colors specified in this array are colors used for discrete points on the brush's boundary path.
-
- By default, as you move from the boundary of a path gradient to the center point, the color changes gradually from the boundary color to the center color. You can customize the positioning and blending of the boundary and center colors by calling this method.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
-
-- Creates a graphics path and adds a rectangle to it.
-
-- Creates a from the path points (in this example, the points form a rectangle, but it could be most any shape).
-
-- Sets the center color to red and the surrounding color to blue.
-
-- Draws the to the screen prior to applying the blend transform.
-
-- Applies the blend transform to the brush by using its method.
-
-- Calls the method to move the brush rectangle such that it does not overlay the one drawn to the screen earlier.
-
-- Draws the transformed-brush rectangle is drawn to the screen.
-
- Notice that the maximum center color (red) is located half way from the center of the path to the path boundary.
-
+ array, the first color in the array is used for the ending color. The colors specified in this array are colors used for discrete points on the brush's boundary path.
+
+ By default, as you move from the boundary of a path gradient to the center point, the color changes gradually from the boundary color to the center color. You can customize the positioning and blending of the boundary and center colors by calling this method.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
+
+- Creates a graphics path and adds a rectangle to it.
+
+- Creates a from the path points (in this example, the points form a rectangle, but it could be most any shape).
+
+- Sets the center color to red and the surrounding color to blue.
+
+- Draws the to the screen prior to applying the blend transform.
+
+- Applies the blend transform to the brush by using its method.
+
+- Calls the method to move the brush rectangle such that it does not overlay the one drawn to the screen earlier.
+
+- Draws the transformed-brush rectangle is drawn to the screen.
+
+ Notice that the maximum center color (red) is located half way from the center of the path to the path boundary.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/CPP/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/CS/form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/VB/form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/VB/form1.vb" id="Snippet4":::
+
]]>
@@ -1085,18 +1085,18 @@ PathGradientBrush pgBrush = new PathGradientBrush(myPath);
A value from 0 through 1 that specifies where, along any radial from the center of the path to the path's boundary, the center color will be at its highest intensity. A value of 1 (the default) places the highest intensity at the center of the path.
Creates a gradient brush that changes color starting from the center of the path outward to the path's boundary. The transition from one color to another is based on a bell-shaped curve.
- array, the first color in the array is used for the ending color. The colors specified in this array are colors used for discrete points on the brush's boundary path.
-
- By default, as you move from the boundary of a path gradient to the center point, the color changes gradually from the boundary color to the center color. You can customize the positioning and blending of the boundary and center colors by calling this method.
-
-
-
-## Examples
- For an example, see .
-
+ array, the first color in the array is used for the ending color. The colors specified in this array are colors used for discrete points on the brush's boundary path.
+
+ By default, as you move from the boundary of a path gradient to the center point, the color changes gradually from the boundary color to the center color. You can customize the positioning and blending of the boundary and center colors by calling this method.
+
+
+
+## Examples
+ For an example, see .
+
]]>
@@ -1136,38 +1136,38 @@ PathGradientBrush pgBrush = new PathGradientBrush(myPath);
A value from 0 through 1 that specifies the maximum intensity of the center color that gets blended with the boundary color. A value of 1 causes the highest possible intensity of the center color, and it is the default value.
Creates a gradient brush that changes color starting from the center of the path outward to the path's boundary. The transition from one color to another is based on a bell-shaped curve.
- array, the first color in the array is used for the ending color. The colors specified in this array are colors used for discrete points on the brush's boundary path.
-
- By default, as you move from the boundary of a path gradient to the center point, the color changes gradually from the boundary color to the center color. You can customize the positioning and blending of the boundary and center colors by calling this method.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
-
-- Creates a graphics path and adds a rectangle to it.
-
-- Creates a from the path points (in this example, the points form a rectangle, but it could be most any shape).
-
-- Sets the center color to red and the surrounding color to blue.
-
-- Draws the to the screen prior to applying the blend transform.
-
-- Applies the blend transform to the brush by using its method.
-
-- Calls the method to move the brush rectangle such that it does not overlay the one drawn to the screen earlier.
-
-- Draws the transformed-brush rectangle to the screen.
-
- Notice that the maximum center color (red) is located half way from the center of the path to the path boundary.
-
+ array, the first color in the array is used for the ending color. The colors specified in this array are colors used for discrete points on the brush's boundary path.
+
+ By default, as you move from the boundary of a path gradient to the center point, the color changes gradually from the boundary color to the center color. You can customize the positioning and blending of the boundary and center colors by calling this method.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, an event object. The code performs the following actions:
+
+- Creates a graphics path and adds a rectangle to it.
+
+- Creates a from the path points (in this example, the points form a rectangle, but it could be most any shape).
+
+- Sets the center color to red and the surrounding color to blue.
+
+- Draws the to the screen prior to applying the blend transform.
+
+- Applies the blend transform to the brush by using its method.
+
+- Calls the method to move the brush rectangle such that it does not overlay the one drawn to the screen earlier.
+
+- Draws the transformed-brush rectangle to the screen.
+
+ Notice that the maximum center color (red) is located half way from the center of the path to the path boundary.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Drawing2D.ClassicPathGradientBrush/VB/form1.vb" id="Snippet5":::
+
]]>
@@ -1212,11 +1212,11 @@ PathGradientBrush pgBrush = new PathGradientBrush(myPath);
Gets or sets an array of colors that correspond to the points in the path this fills.
An array of structures that represents the colors associated with each point in the path this fills.
- in the array corresponds to a point in the path.
-
+ in the array corresponds to a point in the path.
+
]]>
@@ -1261,11 +1261,11 @@ PathGradientBrush pgBrush = new PathGradientBrush(myPath);
Gets or sets a copy of the that defines a local geometric transform for this .
A copy of the that defines a geometric transform that applies only to fills drawn with this .
- property is a copy of the brush's geometric transform, you should dispose of the matrix when you no longer need it.
-
+ property is a copy of the brush's geometric transform, you should dispose of the matrix when you no longer need it.
+
]]>
@@ -1320,11 +1320,11 @@ PathGradientBrush pgBrush = new PathGradientBrush(myPath);
The value of the translation in y.
Applies the specified translation to the local geometric transform. This method prepends the translation to the transform.
- .
-
+ .
+
]]>
@@ -1366,11 +1366,11 @@ PathGradientBrush pgBrush = new PathGradientBrush(myPath);
The order (prepend or append) in which to apply the translation.
Applies the specified translation to the local geometric transform in the specified order.
- .
-
+ .
+
]]>
diff --git a/xml/System.Drawing.Imaging/Encoder.xml b/xml/System.Drawing.Imaging/Encoder.xml
index 2ae65d41848..21dd65a9797 100644
--- a/xml/System.Drawing.Imaging/Encoder.xml
+++ b/xml/System.Drawing.Imaging/Encoder.xml
@@ -30,39 +30,25 @@
object. One of the fields of the object is a GUID that specifies the category of the parameter. Use the static fields of the class to retrieve an that contains parameters of the desired category.
-
- The image encoders that are built into GDI+ receive parameters that belong to several categories. The following table lists all the categories and the GUID associated with each category.
-
-
- f2e455dc-09b3-4316-8260-676ada32481c
-
-
- 66087055-ad66-4c7c-9a18-38a2310b8337
-
-
- e09d739d-ccd4-44ee-8eba-3fbf8be4fc58
-
- edb33bce-0266-4a77-b904-27216099e717
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
-
- 1d5be4b5-fa4a-452d-9cdd-5db35105e7eb
-
-
- 6d42c53a-229a-4825-8bb7-5c99e2b9a8b8
-
-
- 292266fc-ac40-47bf-8cfc-a85b89a655de
-
-
- 3a4e2661-3109-4e56-8536-42c156e7dcfa
+ When you pass a parameter to an image encoder, the parameter is encapsulated in an object. One of the fields of the object is a GUID that specifies the category of the parameter. Use the static fields of the class to retrieve an that contains parameters of the desired category.
-
- 8d0eb2d1-a58e-4ea8-aa14-108074b7b6f9
+ The image encoders that are built into GDI+ receive parameters that belong to several categories. The following table lists all the categories and the GUID associated with each category.
-
- 24d18c76-814a-41a4-bf53-1c219cccf797
+| Category | GUID |
+| - | - |
+| | f2e455dc-09b3-4316-8260-676ada32481c |
+| | 66087055-ad66-4c7c-9a18-38a2310b8337 |
+| | e09d739d-ccd4-44ee-8eba-3fbf8be4fc58 |
+| | edb33bce-0266-4a77-b904-27216099e717 |
+| | 1d5be4b5-fa4a-452d-9cdd-5db35105e7eb |
+| | 6d42c53a-229a-4825-8bb7-5c99e2b9a8b8 |
+| | 292266fc-ac40-47bf-8cfc-a85b89a655de |
+| | 3a4e2661-3109-4e56-8536-42c156e7dcfa|
+| | 8d0eb2d1-a58e-4ea8-aa14-108074b7b6f9 |
+| | 24d18c76-814a-41a4-bf53-1c219cccf797 |
]]>
diff --git a/xml/System.Drawing.Imaging/EncoderParameter.xml b/xml/System.Drawing.Imaging/EncoderParameter.xml
index 0c86ce3399e..ba03c98a4aa 100644
--- a/xml/System.Drawing.Imaging/EncoderParameter.xml
+++ b/xml/System.Drawing.Imaging/EncoderParameter.xml
@@ -37,7 +37,7 @@
## Remarks
You can also use an object to receive a list of possible values supported by a particular parameter of a particular image encoder.
-
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
## Examples
The following code example demonstrates how to create a using the constructor. To run this example, paste the code into a Windows Form and call the `VaryQualityLevel` method from the form's constructor. This example requires an image file named `TestPhoto.jpg` located at **c:\\**.
diff --git a/xml/System.Drawing.Imaging/EncoderParameters.xml b/xml/System.Drawing.Imaging/EncoderParameters.xml
index 9f574a56ea4..865a1a667b7 100644
--- a/xml/System.Drawing.Imaging/EncoderParameters.xml
+++ b/xml/System.Drawing.Imaging/EncoderParameters.xml
@@ -30,7 +30,15 @@
Encapsulates an array of objects.
- To be added.
+
+
+
Using Image Encoders and Decoders in Managed GDI+
diff --git a/xml/System.Drawing.Imaging/ImageAttributes.xml b/xml/System.Drawing.Imaging/ImageAttributes.xml
index 32024bf53f5..ac51f3d38c0 100644
--- a/xml/System.Drawing.Imaging/ImageAttributes.xml
+++ b/xml/System.Drawing.Imaging/ImageAttributes.xml
@@ -40,16 +40,16 @@
## Remarks
An object maintains several color-adjustment settings, including color-adjustment matrices, grayscale-adjustment matrices, gamma-correction values, color-map tables, and color-threshold values. During rendering, colors can be corrected, darkened, lightened, and removed. To apply such manipulations, initialize an object and pass the path of that object (along with the path of an ) to the method.
-
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
## Examples
- The following example takes an image that is all one color (0.2, 0.0, 0.4, 1.0) and doubles the red component adds 0.2 to the red, green, and blue components
+ The following example takes an image that is all one color (0.2, 0.0, 0.4, 1.0) and doubles the red component adds 0.2 to the red, green, and blue components.
The following illustration shows the original image on the left and the transformed image on the right.

- The code in the following example uses the following steps to perform the recoloring:
+ The code in the example uses the following steps to perform the recoloring:
1. Initialize a object.
diff --git a/xml/System.Drawing.Imaging/ImageCodecInfo.xml b/xml/System.Drawing.Imaging/ImageCodecInfo.xml
index 0920f2c4a39..0eab157f367 100644
--- a/xml/System.Drawing.Imaging/ImageCodecInfo.xml
+++ b/xml/System.Drawing.Imaging/ImageCodecInfo.xml
@@ -38,6 +38,8 @@
## Remarks
GDI+ uses image encoders to convert the images stored in objects to various file formats. Image encoders are built into GDI+ for the BMP, JPEG, GIF, TIFF, and PNG formats. An encoder is invoked when you call the or method of a object.
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
]]>
Using Image Encoders and Decoders in Managed GDI+
diff --git a/xml/System.Drawing.Imaging/ImageFormat.xml b/xml/System.Drawing.Imaging/ImageFormat.xml
index 431af5e6e12..5b14bc36fda 100644
--- a/xml/System.Drawing.Imaging/ImageFormat.xml
+++ b/xml/System.Drawing.Imaging/ImageFormat.xml
@@ -37,11 +37,13 @@
Specifies the file format of the image. Not inheritable.
- class indicate image formats such as bitmap (), enhanced metafile (), and icon (). For example, you can use the properties of the class to specify an image format when saving an image using the method. You can compare two image formats by using the method.
-
+ class indicate image formats such as bitmap (), enhanced metafile (), and icon (). For example, you can use the properties of the class to specify an image format when saving an image using the method. You can compare two image formats by using the method.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
]]>
@@ -84,11 +86,11 @@
The structure that specifies a particular image format.
Initializes a new instance of the class by using the specified structure.
- class to specify a particular format such as or , rather than constructing a new .
-
+ class to specify a particular format such as or , rather than constructing a new .
+
]]>
diff --git a/xml/System.Drawing.Imaging/Metafile.xml b/xml/System.Drawing.Imaging/Metafile.xml
index 66b24a43f46..ad41799d8a4 100644
--- a/xml/System.Drawing.Imaging/Metafile.xml
+++ b/xml/System.Drawing.Imaging/Metafile.xml
@@ -54,19 +54,19 @@
Defines a graphic metafile. A metafile contains records that describe a sequence of graphics operations that can be recorded (constructed) and played back (displayed). This class is not inheritable.
- method to save a graphic image as a Windows Metafile Format (WMF) or Enhanced Metafile Format (EMF) file, the resulting file is saved as a Portable Network Graphics (PNG) file instead. This behavior occurs because the GDI+ component of the .NET Framework does not have an encoder that you can use to save files as .wmf or .emf files.
-
-
-
-## Examples
- The following code example demonstrates how to create a and use the method.
-
+ method to save a graphic image as a Windows Metafile Format (WMF) or Enhanced Metafile Format (EMF) file, the resulting file is saved as a Portable Network Graphics (PNG) file instead. This behavior occurs because the GDI+ component of the .NET Framework does not have an encoder that you can use to save files as .wmf or .emf files.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+## Examples
+ The following code example demonstrates how to create a and use the method.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Graphics.EnumerateMetafile/CS/Form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Graphics.EnumerateMetafile/VB/Form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Graphics.EnumerateMetafile/VB/Form1.vb" id="Snippet1":::
+
]]>
@@ -144,14 +144,14 @@
A that represents the file name from which to create the new .
Initializes a new instance of the class from the specified file name.
- .
-
+ .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Graphics.EnumerateMetafile/CS/Form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Graphics.EnumerateMetafile/VB/Form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Graphics.EnumerateMetafile/VB/Form1.vb" id="Snippet1":::
+
]]>
@@ -1975,14 +1975,14 @@
An array of bytes that contains the record data.
Plays an individual metafile record.
- method.
-
+ method.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Graphics.EnumerateMetafile/CS/Form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Graphics.EnumerateMetafile/VB/Form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Graphics.EnumerateMetafile/VB/Form1.vb" id="Snippet1":::
+
]]>
diff --git a/xml/System.Drawing.Imaging/MetafileHeader.xml b/xml/System.Drawing.Imaging/MetafileHeader.xml
index f91b56e5388..af989ad460f 100644
--- a/xml/System.Drawing.Imaging/MetafileHeader.xml
+++ b/xml/System.Drawing.Imaging/MetafileHeader.xml
@@ -27,7 +27,15 @@
Contains attributes of an associated . Not inheritable.
- To be added.
+
+
+
diff --git a/xml/System.Drawing.Imaging/PlayRecordCallback.xml b/xml/System.Drawing.Imaging/PlayRecordCallback.xml
index cb0cb587383..ff6ab64ec50 100644
--- a/xml/System.Drawing.Imaging/PlayRecordCallback.xml
+++ b/xml/System.Drawing.Imaging/PlayRecordCallback.xml
@@ -38,6 +38,14 @@
Not used.
Not used.
This delegate is not used. For an example of enumerating the records of a metafile, see .
- To be added.
+
+
+
diff --git a/xml/System.Drawing.Printing/PageSettings.xml b/xml/System.Drawing.Printing/PageSettings.xml
index f5c2bfbc4df..8b0ae592fea 100644
--- a/xml/System.Drawing.Printing/PageSettings.xml
+++ b/xml/System.Drawing.Printing/PageSettings.xml
@@ -42,21 +42,21 @@
Specifies settings that apply to a single, printed page.
- class is used to specify settings that modify the way a page will be printed. Typically, you set default settings for all pages to be printed through the property. To specify settings on a page-by-page basis, handle the or event and modify the argument included in the or , respectively.
-
- For more information about handling events, see the class overview. For more information about printing, see the namespace overview.
-
-
-
-## Examples
- The following example demonstrates handling the event and checking the argument of . To use this code, add a component named `PrintDocument1` to a Windows Form and associate its event with the `printDocument1_PrintPage` method in the example.
-
+ class is used to specify settings that modify the way a page will be printed. Typically, you set default settings for all pages to be printed through the property. To specify settings on a page-by-page basis, handle the or event and modify the argument included in the or , respectively.
+
+ For more information about handling events, see the class overview. For more information about printing, see the namespace overview.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+## Examples
+ The following example demonstrates handling the event and checking the argument of . To use this code, add a component named `PrintDocument1` to a Windows Form and associate its event with the `printDocument1_PrintPage` method in the example.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.MiscBugDriven/CS/Form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MiscBugDriven/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.MiscBugDriven/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -98,13 +98,13 @@
Initializes a new instance of the class using the default printer.
- , but instead use the to set settings for all pages.
-
+ , but instead use the to set settings for all pages.
+
]]>
@@ -139,11 +139,11 @@
The that describes the printer to use.
Initializes a new instance of the class using a specified printer.
- constructor is similar to initializing a new instance of and setting the property.
-
+ constructor is similar to initializing a new instance of and setting the property.
+
]]>
@@ -178,11 +178,11 @@
Gets the size of the page, taking into account the page orientation specified by the property.
A that represents the length and width, in hundredths of an inch, of the page.
- property along with the property to calculate the printing area for the page.
-
+ property along with the property to calculate the printing area for the page.
+
]]>
The printer named in the property does not exist.
@@ -257,22 +257,22 @@
if the page should be printed in color; otherwise, . The default is determined by the printer.
- property to determine if the printer supports color printing. If the printer supports color, but you do not want to print in color, set the property to `false`. The default will be `true`.
-
-
-
-## Examples
- The following code example prints a document with the first page in color, if the printer supports it. The example requires that a variable named `printDoc` has been created, and the and events are handled.
-
- Use the and namespaces for this example.
-
+ property to determine if the printer supports color printing. If the printer supports color, but you do not want to print in color, set the property to `false`. The default will be `true`.
+
+
+
+## Examples
+ The following code example prints a document with the first page in color, if the printer supports it. The example requires that a variable named `printDoc` has been created, and the and events are handled.
+
+ Use the and namespaces for this example.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CPP/source.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CS/source.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet6":::
+
]]>
The printer named in the property does not exist.
@@ -312,13 +312,13 @@
The handle to a Win32 structure.
Copies the relevant information from the to the specified structure.
- method to copy relevant information to a `DEVMODE` structure from a . This method is useful when you want to make unmanaged Win32 calls that require a `DEVMODE`.
-
- To copy information from a `DEVMODE` structure to the , call .
-
+ method to copy relevant information to a `DEVMODE` structure from a . This method is useful when you want to make unmanaged Win32 calls that require a `DEVMODE`.
+
+ To copy information from a `DEVMODE` structure to the , call .
+
]]>
The printer named in the property does not exist or there is no default printer installed.
@@ -354,11 +354,11 @@
Gets the x-coordinate, in hundredths of an inch, of the hard margin at the left of the page.
The x-coordinate, in hundredths of an inch, of the left-hand hard margin.
-
@@ -392,11 +392,11 @@
Gets the y-coordinate, in hundredths of an inch, of the hard margin at the top of the page.
The y-coordinate, in hundredths of an inch, of the hard margin at the top of the page.
-
@@ -432,28 +432,28 @@
if the page should be printed in landscape orientation; otherwise, . The default is determined by the printer.
- property to determine the angle, in degrees, that the portrait orientation is rotated to produce the landscape orientation.
-
-
-
-## Examples
- The following code example sets a document's default page orientation to landscape through the property, and prints the document. The example has three prerequisites:
-
-- A variable named `filePath` has been set to the path of the file to print.
-
-- A method named `pd_PrintPage`, which handles the event, has been defined.
-
-- A variable named `printer` has been set to the printer's name.
-
- Use the , , and namespaces for this example.
-
+ property to determine the angle, in degrees, that the portrait orientation is rotated to produce the landscape orientation.
+
+
+
+## Examples
+ The following code example sets a document's default page orientation to landscape through the property, and prints the document. The example has three prerequisites:
+
+- A variable named `filePath` has been set to the path of the file to print.
+
+- A method named `pd_PrintPage`, which handles the event, has been defined.
+
+- A variable named `printer` has been set to the printer's name.
+
+ Use the , , and namespaces for this example.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Classic PageSettings Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Classic PageSettings Example/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PageSettings Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PageSettings Example/VB/source.vb" id="Snippet1":::
+
]]>
The printer named in the property does not exist.
@@ -502,28 +502,28 @@
Gets or sets the margins for this page.
A that represents the margins, in hundredths of an inch, for the page. The default is 1-inch margins on all sides.
- event, you can use this property along with the property to calculate the printing area for the page.
-
-
-
-## Examples
- The following code example sets the default page settings for a document to margins to 1 inch on each side. The example has three prerequisites:
-
-- A variable named `filePath` has been set to the path of the file to print.
-
-- A method named `pd_PrintPage`, which handles the event, has been defined.
-
-- A variable named `printer` has been set to the printer's name.
-
- Use the , , and namespaces for this example.
-
+ event, you can use this property along with the property to calculate the printing area for the page.
+
+
+
+## Examples
+ The following code example sets the default page settings for a document to margins to 1 inch on each side. The example has three prerequisites:
+
+- A variable named `filePath` has been set to the path of the file to print.
+
+- A method named `pd_PrintPage`, which handles the event, has been defined.
+
+- A variable named `printer` has been set to the printer's name.
+
+ Use the , , and namespaces for this example.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Classic PageSettings.Margins Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Classic PageSettings.Margins Example/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PageSettings.Margins Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PageSettings.Margins Example/VB/source.vb" id="Snippet1":::
+
]]>
The printer named in the property does not exist.
@@ -566,33 +566,33 @@
Gets or sets the paper size for the page.
A that represents the size of the paper. The default is the printer's default paper size.
- represents the size of the paper through the property, which contains one of the values.
-
- Set the property for the page to a valid , available through the collection.
-
- For information about how you can specify a custom paper size, see the constructor.
-
-
-
-## Examples
- The following code example sets three properties for the document's default page, including the paper size based upon the size selected in the `comboPaperSize` combo box, and then prints the document using the method. The example requires that a variable named `printDoc` exists and that the specific combo boxes exist.
-
+ represents the size of the paper through the property, which contains one of the values.
+
+ Set the property for the page to a valid , available through the collection.
+
+ For information about how you can specify a custom paper size, see the constructor.
+
+
+
+## Examples
+ The following code example sets three properties for the document's default page, including the paper size based upon the size selected in the `comboPaperSize` combo box, and then prints the document using the method. The example requires that a variable named `printDoc` exists and that the specific combo boxes exist.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet1":::
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet1":::
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CPP/source.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CS/source.cs" id="Snippet2":::
-:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet2":::
+:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet2":::
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CPP/source.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CS/source.cs" id="Snippet3":::
-:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet3":::
+:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet3":::
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CPP/source.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CS/source.cs" id="Snippet4":::
-:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet4":::
-
+:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet4":::
+
]]>
The printer named in the property does not exist or there is no default printer installed.
@@ -638,31 +638,31 @@
Gets or sets the page's paper source; for example, the printer's upper tray.
A that specifies the source of the paper. The default is the printer's default paper source.
- represents the source of the paper through the property, which contains one of the values.
-
- Set the property for the page to a valid , available through the collection.
-
-
-
-## Examples
- The following code example sets three properties for the document's default page, including the paper source based upon the source selected in the `comboPaperSource` combo box, and then prints the document using the method. The example requires that a variable named `printDoc` exists and that the specific combo boxes exist.
-
+ represents the source of the paper through the property, which contains one of the values.
+
+ Set the property for the page to a valid , available through the collection.
+
+
+
+## Examples
+ The following code example sets three properties for the document's default page, including the paper source based upon the source selected in the `comboPaperSource` combo box, and then prints the document using the method. The example requires that a variable named `printDoc` exists and that the specific combo boxes exist.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet1":::
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet1":::
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CPP/source.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CS/source.cs" id="Snippet2":::
-:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet2":::
+:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet2":::
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CPP/source.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CS/source.cs" id="Snippet3":::
-:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet3":::
+:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet3":::
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CPP/source.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CS/source.cs" id="Snippet4":::
-:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet4":::
-
+:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet4":::
+
]]>
The printer named in the property does not exist or there is no default printer installed.
@@ -701,13 +701,13 @@
Gets the bounds of the printable area of the page for the printer.
A representing the length and width, in hundredths of an inch, of the area the printer is capable of printing in.
- property returns the correct value, whether the page orientation is landscape or portrait.
-
- You can use this property to print outside the margins of the page, but within the printable area.
-
+ property returns the correct value, whether the page orientation is landscape or portrait.
+
+ You can use this property to print outside the margins of the page, but within the printable area.
+
]]>
@@ -748,22 +748,22 @@
Gets or sets the printer resolution for the page.
A that specifies the printer resolution for the page. The default is the printer's default resolution.
- represents the printer resolution of through the property, which contains one of the values.
-
- Set the property for the page to a valid , available through the collection.
-
-
-
-## Examples
- The following code example sets three properties for the document's default page, including the printer's resolution based upon the resolution selected in the `comboPrintResolution` combo box, and then prints the document using the method. The example requires that a variable named `printDoc` exists and that the specific combo boxes exist.
-
+ represents the printer resolution of through the property, which contains one of the values.
+
+ Set the property for the page to a valid , available through the collection.
+
+
+
+## Examples
+ The following code example sets three properties for the document's default page, including the printer's resolution based upon the resolution selected in the `comboPrintResolution` combo box, and then prints the document using the method. The example requires that a variable named `printDoc` exists and that the specific combo boxes exist.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CPP/source.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CS/source.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet4":::
+
]]>
The printer named in the property does not exist or there is no default printer installed.
@@ -809,11 +809,11 @@
Gets or sets the printer settings associated with the page.
A that represents the printer settings associated with the page.
-
@@ -852,13 +852,13 @@
The handle to a Win32 structure.
Copies relevant information to the from the specified structure.
- .
-
- To copy information from the to a `DEVMODE`, call .
-
+ .
+
+ To copy information from the to a `DEVMODE`, call .
+
]]>
The printer handle is not valid.
diff --git a/xml/System.Drawing.Printing/PreviewPageInfo.xml b/xml/System.Drawing.Printing/PreviewPageInfo.xml
index 434fb161ca4..0f63024aee1 100644
--- a/xml/System.Drawing.Printing/PreviewPageInfo.xml
+++ b/xml/System.Drawing.Printing/PreviewPageInfo.xml
@@ -27,13 +27,16 @@
Specifies print preview information for a single page. This class cannot be inherited.
- class.
-
- For more information on printing, see the namespace overview.
-
+ class.
+
+ For more information on printing, see the namespace overview.
+
]]>
@@ -112,11 +115,11 @@
Gets the image of the printed page.
An representing the printed page.
- namespace for details on manipulating graphics.
-
+ namespace for details on manipulating graphics.
+
]]>
diff --git a/xml/System.Drawing.Printing/PrintController.xml b/xml/System.Drawing.Printing/PrintController.xml
index 5c868aa0037..d6d49c7129b 100644
--- a/xml/System.Drawing.Printing/PrintController.xml
+++ b/xml/System.Drawing.Printing/PrintController.xml
@@ -27,17 +27,20 @@
Controls how a document is printed, when printing from a Windows Forms application.
- controls how a is printed. invokes the print controller's , , , and methods, which in turn tell the printer how to print the document. Print preview uses a specialized . For an example of a print controller that is specialized for print preview, see the .
-
- is used by , and not typically used directly.
-
- The .NET Framework includes three print controllers that are derived from that help accomplish common tasks. The prints a document to a printer. The generates a preview of what the document will look like when printed and is used by the and classes. The provides a printing status dialog during the printing process.
-
- For more information about printing with Windows Forms, see the namespace overview. If you wish to print from a Windows Presentation Foundation application, see the namespace.
-
+ controls how a is printed. invokes the print controller's , , , and methods, which in turn tell the printer how to print the document. Print preview uses a specialized . For an example of a print controller that is specialized for print preview, see the .
+
+ is used by , and not typically used directly.
+
+ The .NET Framework includes three print controllers that are derived from that help accomplish common tasks. The prints a document to a printer. The generates a preview of what the document will look like when printed and is used by the and classes. The provides a printing status dialog during the printing process.
+
+ For more information about printing with Windows Forms, see the namespace overview. If you wish to print from a Windows Presentation Foundation application, see the namespace.
+
]]>
@@ -143,13 +146,13 @@
A that contains the event data.
When overridden in a derived class, completes the control sequence that determines when and how to print a page of a document.
- is called immediately after the raises the event. If an exception is thrown inside a event of a , is not called.
-
- creates the that is sent to the printer. After is called, the method sets the to a graphic of a single page. (Use the method to set how to print a page in a document. For example, you can adjust page settings separately for each page.) The method clears the , while the method deallocates the object.
-
+ is called immediately after the raises the event. If an exception is thrown inside a event of a , is not called.
+
+ creates the that is sent to the printer. After is called, the method sets the to a graphic of a single page. (Use the method to set how to print a page in a document. For example, you can adjust page settings separately for each page.) The method clears the , while the method deallocates the object.
+
]]>
@@ -195,13 +198,13 @@
A that contains the event data.
When overridden in a derived class, completes the control sequence that determines when and how to print a document.
- is called immediately after the raises the event.
-
- creates the that is sent to the printer. After is called, the method sets the to a graphic of a single page. (Use the method to determine when and how to print a document. For example, you can delay printing for 30 minutes or adjust the printer settings for the document.) The method clears the , while the method deallocates the object.
-
+ is called immediately after the raises the event.
+
+ creates the that is sent to the printer. After is called, the method sets the to a graphic of a single page. (Use the method to determine when and how to print a document. For example, you can delay printing for 30 minutes or adjust the printer settings for the document.) The method clears the , while the method deallocates the object.
+
]]>
@@ -248,15 +251,15 @@
When overridden in a derived class, begins the control sequence that determines when and how to print a page of a document.
A that represents a page from a .
- is called immediately before the raises the event.
-
- creates the that is sent to the printer. After is called, the method sets the to a graphic of a single page. The method clears the , while the method deallocates the object.
-
- Use the method to set how to print a page in a document. For example, you can adjust page settings separately for each page.
-
+ is called immediately before the raises the event.
+
+ creates the that is sent to the printer. After is called, the method sets the to a graphic of a single page. The method clears the , while the method deallocates the object.
+
+ Use the method to set how to print a page in a document. For example, you can adjust page settings separately for each page.
+
]]>
@@ -300,15 +303,15 @@
A that contains the event data.
When overridden in a derived class, begins the control sequence that determines when and how to print a document.
- is called immediately after the raises the event.
-
- Use the method to determine when and how to print a document. For example, you can delay printing for 30 minutes or adjust the printer settings for the document. creates the that is sent to the printer. After is called, the method sets the to one of a single page. The method clears the , while the method deallocates the object.
-
- The method is a good place to verify that are valid.
-
+ is called immediately after the raises the event.
+
+ Use the method to determine when and how to print a document. For example, you can delay printing for 30 minutes or adjust the printer settings for the document. creates the that is sent to the printer. After is called, the method sets the to one of a single page. The method clears the , while the method deallocates the object.
+
+ The method is a good place to verify that are valid.
+
]]>
diff --git a/xml/System.Drawing.Printing/PrintDocument.xml b/xml/System.Drawing.Printing/PrintDocument.xml
index cb059820118..e37dbdb1c5b 100644
--- a/xml/System.Drawing.Printing/PrintDocument.xml
+++ b/xml/System.Drawing.Printing/PrintDocument.xml
@@ -41,25 +41,25 @@
Defines a reusable object that sends output to a printer, when printing from a Windows Forms application.
- class, set properties such as the and , and call the method to start the printing process. Handle the event where you specify the output to print, by using the property of the .
-
- For more information about printing from a Windows Form application, see the [Windows Forms Print Support](/dotnet/framework/winforms/advanced/windows-forms-print-support). If you wish to print from a Windows Presentation Foundation application, see the namespace.
-
-
-
-## Examples
- The following code example prints the file named C:\My Documents\MyFile.txt on the default printer. To run the example, create a new Windows Forms project and paste the example code into the form, replacing the file contents. For C#, you will need to delete the Form1.Designer.cs file. Also, change the path to the file you want to print.
-
+ class, set properties such as the and , and call the method to start the printing process. Handle the event where you specify the output to print, by using the property of the .
+
+ For more information about printing from a Windows Form application, see the [Windows Forms Print Support](/dotnet/framework/winforms/advanced/windows-forms-print-support). If you wish to print from a Windows Presentation Foundation application, see the namespace.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+## Examples
+ The following code example prints the file named C:\My Documents\MyFile.txt on the default printer. To run the example, create a new Windows Forms project and paste the example code into the form, replacing the file contents. For C#, you will need to delete the Form1.Designer.cs file. Also, change the path to the file you want to print.
+
> [!NOTE]
-> The example requires that each line fits within the page width.
-
+> The example requires that each line fits within the page width.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Classic PrintDocument Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Classic PrintDocument Example/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintDocument Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintDocument Example/VB/source.vb" id="Snippet1":::
+
]]>
@@ -95,20 +95,20 @@
Initializes a new instance of the class.
- , you set printer and page settings that affect the output through the and properties, respectively.
-
-
-
-## Examples
- The following code example sets a document's page orientation to landscape, and prints the document.
-
+ , you set printer and page settings that affect the output through the and properties, respectively.
+
+
+
+## Examples
+ The following code example sets a document's page orientation to landscape, and prints the document.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Classic PrintDocument Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Classic PrintDocument Example/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintDocument Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintDocument Example/VB/source.vb" id="Snippet1":::
+
]]>
@@ -142,13 +142,13 @@
Occurs when the method is called and before the first page of the document prints.
- event to initialize fonts, file streams, and other resources used during the printing process.
-
- To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs. For more information about handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/).
-
+ event to initialize fonts, file streams, and other resources used during the printing process.
+
+ To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs. For more information about handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/).
+
]]>
@@ -202,27 +202,27 @@
Gets or sets page settings that are used as defaults for all pages to be printed.
A that specifies the default page settings for the document.
- property. For example, the property specifies whether the page prints in color, the property specifies landscape or portrait orientation, and the property specifies the margins of the page.
-
- To specify settings on a page-by-page basis, handle the or event and modify the argument included in the or , respectively.
-
+ property. For example, the property specifies whether the page prints in color, the property specifies landscape or portrait orientation, and the property specifies the margins of the page.
+
+ To specify settings on a page-by-page basis, handle the or event and modify the argument included in the or , respectively.
+
> [!NOTE]
-> After printing has started, changes to page settings through the property will not affect pages being printed.
-
-
-
-## Examples
- The following code example sets a document's page orientation to landscape, and prints the document. The example makes three assumptions: that a variable named `filePath` has been set to the path of the file to print; that a method named `pd_PrintPage`, which handles the event, has been defined; and that a variable named `printer` has been set to the printer's name.
-
- Use the , , and namespaces for this example.
-
+> After printing has started, changes to page settings through the property will not affect pages being printed.
+
+
+
+## Examples
+ The following code example sets a document's page orientation to landscape, and prints the document. The example makes three assumptions: that a variable named `filePath` has been set to the path of the file to print; that a method named `pd_PrintPage`, which handles the event, has been defined; and that a variable named `printer` has been set to the printer's name.
+
+ Use the , , and namespaces for this example.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Classic PrintDocument.PrintDocument Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Classic PrintDocument.PrintDocument Example/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintDocument.PrintDocument Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintDocument.PrintDocument Example/VB/source.vb" id="Snippet1":::
+
]]>
@@ -270,22 +270,22 @@
Gets or sets the document name to display (for example, in a print status dialog box or printer queue) while printing the document.
The document name to display while printing the document. The default is "document".
- property does not specify the file to print. Rather, you specify the output to print by handling the event. For an example, see the class overview.
-
-
-
-## Examples
- The following code example prints a document with the first page in color, if the printer supports it, and sets the to a user-friendly name. The example requires that a variable named `printDoc` has been created, and the and events are handled.
-
- Use the and namespaces for this example.
-
+ property does not specify the file to print. Rather, you specify the output to print by handling the event. For an example, see the class overview.
+
+
+
+## Examples
+ The following code example prints a document with the first page in color, if the printer supports it, and sets the to a user-friendly name. The example requires that a variable named `printDoc` has been created, and the and events are handled.
+
+ Use the and namespaces for this example.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CPP/source.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CS/source.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet6":::
+
]]>
@@ -321,15 +321,15 @@
Occurs when the last page of the document has printed.
- event to release fonts, file streams, and other resources used during the printing process, like fonts.
-
- You indicate that there are no more pages to print by setting the property to `false` in the event. The event also occurs if the printing process is canceled or an exception occurs during the printing process.
-
- To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs. For more information about handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/).
-
+ event to release fonts, file streams, and other resources used during the printing process, like fonts.
+
+ You indicate that there are no more pages to print by setting the property to `false` in the event. The event also occurs if the printing process is canceled or an exception occurs during the printing process.
+
+ To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs. For more information about handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/).
+
]]>
@@ -376,13 +376,13 @@
A that contains the event data.
Raises the event. It is called after the method is called and before the first page of the document prints.
- method allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
-
- When a derived class calls the method, it raises the event by invoking the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/).
-
+ method allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
+
+ When a derived class calls the method, it raises the event by invoking the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/).
+
]]>
@@ -429,13 +429,13 @@
A that contains the event data.
Raises the event. It is called when the last page of the document has printed.
- method allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. The method is also called if the printing process is canceled or an exception occurs during the printing process.
-
- When a derived class calls the method, it raises the event by invoking the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/).
-
+ method allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. The method is also called if the printing process is canceled or an exception occurs during the printing process.
+
+ When a derived class calls the method, it raises the event by invoking the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/).
+
]]>
@@ -482,13 +482,13 @@
A that contains the event data.
Raises the event. It is called before a page prints.
- method allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
-
- When a derived class calls the method, it raises the event by invoking the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/).
-
+ method allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
+
+ When a derived class calls the method, it raises the event by invoking the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/).
+
]]>
@@ -535,13 +535,13 @@
A that contains the event data.
Raises the event. It is called immediately before each event.
- method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
-
- When a derived class calls the method, it raises the event by invoking the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/).
-
+ method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
+
+ When a derived class calls the method, it raises the event by invoking the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/).
+
]]>
@@ -596,16 +596,16 @@
if the graphics origin starts at the page margins; if the graphics origin is at the top-left corner of the printable page. The default is .
- object origin. When is `true`, the object location takes into account the property value and the printable area of the page. When is `false`, only the printable area of the page is used to determine the location of the object origin, the value is ignored.
-
- For example, if is `true`, and is set for 1 inch on each side, the object included in the is located 1 inch from the left and top of the page. If the printable area of the page is .25 of an inch on each side and is `false`, the object is located .25 of an inch from the left and top of the page.
-
+ object origin. When is `true`, the object location takes into account the property value and the printable area of the page. When is `false`, only the printable area of the page is used to determine the location of the object origin, the value is ignored.
+
+ For example, if is `true`, and is set for 1 inch on each side, the object included in the is located 1 inch from the left and top of the page. If the printable area of the page is .25 of an inch on each side and is `false`, the object is located .25 of an inch from the left and top of the page.
+
> [!NOTE]
-> The printable area of a page varies from printer to printer and is not guaranteed to be symmetrical.
-
+> The printable area of a page varies from printer to printer and is not guaranteed to be symmetrical.
+
]]>
@@ -640,32 +640,32 @@
Starts the document's printing process.
- event and by using the included in the .
-
- Use the property to specify which printer should print the document.
-
- The method prints the document without using a print dialog. Use a when you want to offer the user the ability to choose print settings.
-
+ event and by using the included in the .
+
+ Use the property to specify which printer should print the document.
+
+ The method prints the document without using a print dialog. Use a when you want to offer the user the ability to choose print settings.
+
> [!NOTE]
-> If an exception that is not handled by the method is thrown during printing, the printing of the document is aborted.
-
-
-
-## Examples
- The following code example prints the file that is specified through the command line to the default printer.
-
+> If an exception that is not handled by the method is thrown during printing, the printing of the document is aborted.
+
+
+
+## Examples
+ The following code example prints the file that is specified through the command line to the default printer.
+
> [!NOTE]
-> The example requires that each line fits within the page width.
-
- Use the , , , , and namespaces for this example.
-
+> The example requires that each line fits within the page width.
+
+ Use the , , , , and namespaces for this example.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Classic PrintDocument.PrintPage Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Classic PrintDocument.PrintPage Example/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintDocument.PrintPage Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintDocument.PrintPage Example/VB/source.vb" id="Snippet1":::
+
]]>
The printer named in the property does not exist.
@@ -711,22 +711,22 @@
Gets or sets the print controller that guides the printing process.
The that guides the printing process. The default is a new instance of the class.
- object. A specifies where to draw the graphic in an image for a print preview or on a printer to actually print the document. A print controller can also specify whether to print a document immediately, or wait a specified interval.
-
-
-
-## Examples
- The following code example requires that you have created an instance of the class that is named `myPrintDocument`. The example creates a new instance of the class, assigns it to the property of `myPrintDocument`, and prints the document.
-
- Use the and namespaces for this example.
-
+ object. A specifies where to draw the graphic in an image for a print preview or on a printer to actually print the document. A print controller can also specify whether to print a document immediately, or wait a specified interval.
+
+
+
+## Examples
+ The following code example requires that you have created an instance of the class that is named `myPrintDocument`. The example creates a new instance of the class, assigns it to the property of `myPrintDocument`, and prints the document.
+
+ Use the and namespaces for this example.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Classic PrintDocument.PrintController Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Classic PrintDocument.PrintController Example/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintDocument.PrintController Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintDocument.PrintController Example/VB/source.vb" id="Snippet1":::
+
]]>
@@ -782,22 +782,22 @@
Gets or sets the printer that prints the document.
A that specifies where and how the document is printed. The default is a with its properties set to their default values.
- property. For example, use the property to specify the number of copies you want to print, the property to specify the printer to use, and the property to specify the range of pages you want to print.
-
-
-
-## Examples
- The following code example prints a document on the specified printer. The example makes three assumptions: that a variable names `filePath` has been set to the path of the file to print; that a method named `pd_PrintPage`, which handles the event, has been defined; and that a variable named `printer` has been set to the printer's name.
-
- Use the , , and namespaces for this example.
-
+ property. For example, use the property to specify the number of copies you want to print, the property to specify the printer to use, and the property to specify the range of pages you want to print.
+
+
+
+## Examples
+ The following code example prints a document on the specified printer. The example makes three assumptions: that a variable names `filePath` has been set to the path of the file to print; that a method named `pd_PrintPage`, which handles the event, has been defined; and that a variable named `printer` has been set to the printer's name.
+
+ Use the , , and namespaces for this example.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Classic PrintDocument.PrinterSettings Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Classic PrintDocument.PrinterSettings Example/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintDocument.PrinterSettings Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintDocument.PrinterSettings Example/VB/source.vb" id="Snippet1":::
+
]]>
@@ -835,26 +835,26 @@
Occurs when the output to print for the current page is needed.
- property of the . For example, to specify a line of text that should be printed, draw the text using the method.
-
- In addition to specifying the output, you can indicate if there are additional pages to print by setting the property to `true`. The default is `false`, which indicates that there are no more pages to print. Individual page settings can also be modified through the and the print job can be canceled by setting the property to `true`. To print each page of a document using different page settings, handle the event.
-
- To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs. For more information about handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/).
-
-
-
-## Examples
- The following code example demonstrates handling the event.
-
- For another example, see [How to: Print a Multi-Page Text File in Windows Forms](/dotnet/framework/winforms/advanced/how-to-print-a-multi-page-text-file-in-windows-forms).
-
+ property of the . For example, to specify a line of text that should be printed, draw the text using the method.
+
+ In addition to specifying the output, you can indicate if there are additional pages to print by setting the property to `true`. The default is `false`, which indicates that there are no more pages to print. Individual page settings can also be modified through the and the print job can be canceled by setting the property to `true`. To print each page of a document using different page settings, handle the event.
+
+ To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs. For more information about handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/).
+
+
+
+## Examples
+ The following code example demonstrates handling the event.
+
+ For another example, see [How to: Print a Multi-Page Text File in Windows Forms](/dotnet/framework/winforms/advanced/how-to-print-a-multi-page-text-file-in-windows-forms).
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Classic PrintDocument Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Classic PrintDocument Example/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintDocument Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintDocument Example/VB/source.vb" id="Snippet1":::
+
]]>
@@ -896,24 +896,24 @@
Occurs immediately before each event.
- property or by setting the property to a . Changes made to the affect only the current page, not the document's default page settings. The print job can also be canceled by setting the property to `true` for the .
-
- To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs. For more information about handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/).
-
-If you use the event to modify printer settings, the performance of the control will not improve even if an optimization configuration switch is set. For more information, see [PrintPreviewDialog control overview](/dotnet/framework/winforms/controls/printpreviewdialog-control-overview-windows-forms).
-
-## Examples
- The following code example prints a document with the first page in color, if the printer supports it. The example requires that a variable named `printDoc` has been created, and the and events are handled. The `currentPageNumber` variable is incremented after every page is printed in the event, which is not shown.
-
- Use the and namespaces for this example.
-
+ property or by setting the property to a . Changes made to the affect only the current page, not the document's default page settings. The print job can also be canceled by setting the property to `true` for the .
+
+ To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs. For more information about handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/).
+
+If you use the event to modify printer settings, the performance of the control will not improve even if an optimization configuration switch is set. For more information, see [PrintPreviewDialog control overview](/dotnet/framework/winforms/controls/printpreviewdialog-control-overview-windows-forms).
+
+## Examples
+ The following code example prints a document with the first page in color, if the printer supports it. The example requires that a variable named `printDoc` has been created, and the and events are handled. The `currentPageNumber` variable is incremented after every page is printed in the event, which is not shown.
+
+ Use the and namespaces for this example.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CPP/source.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CS/source.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet6":::
+
]]>
diff --git a/xml/System.Drawing.Printing/PrintEventArgs.xml b/xml/System.Drawing.Printing/PrintEventArgs.xml
index 39e51298239..642722306b9 100644
--- a/xml/System.Drawing.Printing/PrintEventArgs.xml
+++ b/xml/System.Drawing.Printing/PrintEventArgs.xml
@@ -27,11 +27,13 @@
Provides data for the and events.
- namespace overview.
-
+ namespace overview.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
]]>
@@ -112,11 +114,11 @@
in all cases.
- does not reliably indicate the type of print operation occurring, and returns in all cases.
-
+ does not reliably indicate the type of print operation occurring, and returns in all cases.
+
]]>
diff --git a/xml/System.Drawing.Printing/PrintEventHandler.xml b/xml/System.Drawing.Printing/PrintEventHandler.xml
index 24bab99da1c..7df310997a8 100644
--- a/xml/System.Drawing.Printing/PrintEventHandler.xml
+++ b/xml/System.Drawing.Printing/PrintEventHandler.xml
@@ -35,13 +35,16 @@
A that contains the event data.
Represents the method that will handle the or event of a .
- delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event-handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
-
- For more information on printing, see the namespace overview.
-
+ delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event-handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
+
+ For more information on printing, see the namespace overview.
+
]]>
diff --git a/xml/System.Drawing.Printing/PrintPageEventArgs.xml b/xml/System.Drawing.Printing/PrintPageEventArgs.xml
index 2254902d37d..eb1a263939d 100644
--- a/xml/System.Drawing.Printing/PrintPageEventArgs.xml
+++ b/xml/System.Drawing.Printing/PrintPageEventArgs.xml
@@ -27,24 +27,25 @@
Provides data for the event.
- property retrieves the rectangular area that represents the portion of the page between the margins. The property retrieves the rectangular area that represents the total area of the page. The property defines the graphics object with which to do the painting. The property retrieves the printer settings for the current page. The remaining properties indicate whether a print job should be canceled or whether a print job has more pages.
-
- For more information about printing with Windows Forms, see the namespace overview. If you wish to print from a Windows Presentation Foundation application, see the namespace.
-
-
-
-## Examples
- The following code example assumes a named `printButton` and a named `pd` have been created on a . Make sure the event for the is associated with the `printButton_Click` method and the event of the is associated with the `pd_PrintPage` method in the example. The `printButton_Click` method from the example calls the method raising the event, and prints the .bmp file specified in the `pd_PrintPage` method. To run this example, change the path to the bitmap you want to print.
-
- Use the , , and namespaces for this example.
-
+ property retrieves the rectangular area that represents the portion of the page between the margins. The property retrieves the rectangular area that represents the total area of the page. The property defines the graphics object with which to do the painting. The property retrieves the printer settings for the current page. The remaining properties indicate whether a print job should be canceled or whether a print job has more pages.
+
+ For more information about printing with Windows Forms, see the namespace overview. If you wish to print from a Windows Presentation Foundation application, see the namespace.
+
+## Examples
+ The following code example assumes a named `printButton` and a named `pd` have been created on a . Make sure the event for the is associated with the `printButton_Click` method and the event of the is associated with the `pd_PrintPage` method in the example. The `printButton_Click` method from the example calls the method raising the event, and prints the .bmp file specified in the `pd_PrintPage` method. To run this example, change the path to the bitmap you want to print.
+
+ Use the , , and namespaces for this example.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Classic PrintPageEventArgs Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Classic PrintPageEventArgs Example/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintPageEventArgs Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintPageEventArgs Example/VB/source.vb" id="Snippet1":::
+
]]>
@@ -179,17 +180,17 @@
Gets the used to paint the page.
The used to paint the page.
- named `printButton` and a named `pd` have been created on a . Make sure the event for the is associated with the `printButton_Click` method and the event of the is associated with the `pd_PrintPage` method in the example. The `printButton_Click` method from the example calls the method raising the event, and prints the .bmp file specified in the `pd_PrintPage` method. To run this example, change the path to the bitmap you want to print.
-
- Use the , , and namespaces for this example.
-
+ named `printButton` and a named `pd` have been created on a . Make sure the event for the is associated with the `printButton_Click` method and the event of the is associated with the `pd_PrintPage` method in the example. The `printButton_Click` method from the example calls the method raising the event, and prints the .bmp file specified in the `pd_PrintPage` method. To run this example, change the path to the bitmap you want to print.
+
+ Use the , , and namespaces for this example.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Classic PrintPageEventArgs Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Classic PrintPageEventArgs Example/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintPageEventArgs Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintPageEventArgs Example/VB/source.vb" id="Snippet1":::
+
]]>
@@ -236,19 +237,19 @@
if an additional page should be printed; otherwise, . The default is .
- named `printButton` and a named `pd` have been created on a . Make sure the event for the is associated with the `printButton_Click` method and the event of the is associated with the `pd_PrintPage` method in the example. The `printButton_Click` method from the example calls the method raising the event, and prints the .bmp file specified in the `pd_PrintPage` method. To run this example, change the path to the bitmap you want to print.
-
- Use the , , and namespaces for this example.
-
+ named `printButton` and a named `pd` have been created on a . Make sure the event for the is associated with the `printButton_Click` method and the event of the is associated with the `pd_PrintPage` method in the example. The `printButton_Click` method from the example calls the method raising the event, and prints the .bmp file specified in the `pd_PrintPage` method. To run this example, change the path to the bitmap you want to print.
+
+ Use the , , and namespaces for this example.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Classic PrintPageEventArgs Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Classic PrintPageEventArgs Example/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintPageEventArgs Example/VB/source.vb" id="Snippet1":::
-
- For another example that shows how to use , see [How to: Print a Multi-Page Text File in Windows Forms](/dotnet/framework/winforms/advanced/how-to-print-a-multi-page-text-file-in-windows-forms)
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrintPageEventArgs Example/VB/source.vb" id="Snippet1":::
+
+ For another example that shows how to use , see [How to: Print a Multi-Page Text File in Windows Forms](/dotnet/framework/winforms/advanced/how-to-print-a-multi-page-text-file-in-windows-forms)
+
]]>
How to: Print a Multi-Page Text File in Windows Forms
@@ -329,13 +330,13 @@
Gets the rectangular area that represents the total area of the page.
The rectangular area that represents the total area of the page.
- [!NOTE]
-> Most printers cannot print at the very edge of the page.
-
+> Most printers cannot print at the very edge of the page.
+
]]>
diff --git a/xml/System.Drawing.Printing/PrintPageEventHandler.xml b/xml/System.Drawing.Printing/PrintPageEventHandler.xml
index dc7f24de71f..290dfe7688f 100644
--- a/xml/System.Drawing.Printing/PrintPageEventHandler.xml
+++ b/xml/System.Drawing.Printing/PrintPageEventHandler.xml
@@ -35,13 +35,16 @@
A that contains the event data.
Represents the method that will handle the event of a .
- delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event-handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
-
- For more information on printing, see the namespace overview.
-
+ delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event-handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
+
+ For more information on printing, see the namespace overview.
+
]]>
diff --git a/xml/System.Drawing.Printing/PrinterSettings.xml b/xml/System.Drawing.Printing/PrinterSettings.xml
index de48aa4a900..e5a5416cae5 100644
--- a/xml/System.Drawing.Printing/PrinterSettings.xml
+++ b/xml/System.Drawing.Printing/PrinterSettings.xml
@@ -42,30 +42,30 @@
Specifies information about how a document is printed, including the printer that prints it, when printing from a Windows Forms application.
- through or properties to modify printer settings. The most common printer setting is , which specifies the printer to print to.
-
- For more information about printing with Windows Forms, see the namespace overview. If you wish to print from a Windows Presentation Foundation application, see the namespace.
-
-
-
-## Examples
- The following code example prints a document on the specified printer. The example has three prerequisites:
-
-- A variable named `filePath` has been set to the path of the file to print.
-
-- A method named `pd_PrintPage`, which handles the event, has been defined.
-
-- A variable named `printer` has been set to the printer's name.
-
- Use the , , and namespaces for this example.
-
+ through or properties to modify printer settings. The most common printer setting is , which specifies the printer to print to.
+
+ For more information about printing with Windows Forms, see the namespace overview. If you wish to print from a Windows Presentation Foundation application, see the namespace.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+## Examples
+ The following code example prints a document on the specified printer. The example has three prerequisites:
+
+- A variable named `filePath` has been set to the path of the file to print.
+
+- A method named `pd_PrintPage`, which handles the event, has been defined.
+
+- A variable named `printer` has been set to the printer's name.
+
+ Use the , , and namespaces for this example.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Classic PrinterSettings Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Classic PrinterSettings Example/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrinterSettings Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrinterSettings Example/VB/source.vb" id="Snippet1":::
+
]]>
@@ -99,13 +99,13 @@
Initializes a new instance of the class.
- , but instead use the to set settings for the printer.
-
+ , but instead use the to set settings for the printer.
+
]]>
@@ -141,11 +141,11 @@
if the printer supports double-sided printing; otherwise, .
- to one of the values.
-
+ to one of the values.
+
]]>
@@ -222,13 +222,13 @@
if the printed document is collated; otherwise, . The default is .
- property to specify the number of copies to print.
-
- Setting to `true` will print a complete copy of the document before the first page of the next copy is printed. `false` will print each page by the number of copies specified before printing the next page.
-
+ property to specify the number of copies to print.
+
+ Setting to `true` will print a complete copy of the document before the first page of the next copy is printed. `false` will print each page by the number of copies specified before printing the next page.
+
]]>
@@ -267,14 +267,14 @@
Gets or sets the number of copies of the document to print.
The number of copies to print. The default is 1.
- property to determine the maximum number of copies the printer supports. If the number of copies is set higher than the maximum copies supported by the printer, only the maximum number of copies will be printed, and no exception will occur.
-
+ property to determine the maximum number of copies the printer supports. If the number of copies is set higher than the maximum copies supported by the printer, only the maximum number of copies will be printed, and no exception will occur.
+
> [!NOTE]
-> Some printers might not support printing more than one copy at a time.
-
+> Some printers might not support printing more than one copy at a time.
+
]]>
The value of the property is less than zero.
@@ -331,11 +331,11 @@
Returns a that contains printer information that is useful when creating a .
A that contains information from a printer.
- method, you can obtain a for the printer without creating a print job. You can use the to make decisions on how to layout visual elements like fonts, sizes, and type styles of a complex print job.
-
+ method, you can obtain a for the printer without creating a print job. You can use the to make decisions on how to layout visual elements like fonts, sizes, and type styles of a complex print job.
+
]]>
The printer named in the property does not exist.
@@ -377,11 +377,11 @@
Returns a that contains printer information, optionally specifying the origin at the margins.
A that contains printer information from the .
- method, you can obtain a for the printer without creating a print job. Use the to make decisions on how to layout visual elements like fonts, sizes, and type styles of a complex print job.
-
+ method, you can obtain a for the printer without creating a print job. Use the to make decisions on how to layout visual elements like fonts, sizes, and type styles of a complex print job.
+
]]>
@@ -419,11 +419,11 @@
Returns a that contains printer information associated with the specified .
A that contains printer information from the .
- method, you can obtain a for the printer without creating a print job. Use the to make decisions on how to layout visual elements like fonts, sizes, and type styles of a complex print job.
-
+ method, you can obtain a for the printer without creating a print job. Use the to make decisions on how to layout visual elements like fonts, sizes, and type styles of a complex print job.
+
]]>
@@ -464,11 +464,11 @@
Creates a associated with the specified page settings and optionally specifying the origin at the margins.
A that contains printer information from the .
- method allows you to obtain a for the printer without creating a print job. Use the to make decisions on how to layout visual elements like fonts, sizes, and type styles of a complex print job.
-
+ method allows you to obtain a for the printer without creating a print job. Use the to make decisions on how to layout visual elements like fonts, sizes, and type styles of a complex print job.
+
]]>
@@ -509,11 +509,11 @@
Gets the default page settings for this printer.
A that represents the default page settings for this printer.
- class.
-
+ class.
+
]]>
@@ -549,11 +549,11 @@
Gets or sets the printer setting for double-sided printing.
One of the values. The default is determined by the printer.
- property to check to see if the printer supports duplex printing.
-
+ property to check to see if the printer supports duplex printing.
+
]]>
The value of the property is not one of the values.
@@ -604,15 +604,15 @@
Gets or sets the page number of the first page to print.
The page number of the first page to print.
- and properties are used by the when the user selects a print range. The property must be set to `true` to enable the user to specify a print range. In addition, the requires the and to be specified and the value to be within that range.
-
- During the printing process, in the event, view the to determine what should be printed. If is , use the and properties to determine what pages should be printed. If is , then specify output only for the selected pages.
-
- The , and can also be set programmatically, though the implementation is the same.
-
+ and properties are used by the when the user selects a print range. The property must be set to `true` to enable the user to specify a print range. In addition, the requires the and to be specified and the value to be within that range.
+
+ During the printing process, in the event, view the to determine what should be printed. If is , use the and properties to determine what pages should be printed. If is , then specify output only for the selected pages.
+
+ The , and can also be set programmatically, though the implementation is the same.
+
]]>
The property's value is less than zero.
@@ -662,11 +662,11 @@
Creates a handle to a structure that corresponds to the printer settings.
A handle to a structure.
- to a for a different printer is not supported. When you are done with the handle that is created through this method, you must deallocate it yourself by calling the native Win32 `GlobalFree` method. When you call this method, you pass as a parameter the return value from the method.
-
+ to a for a different printer is not supported. When you are done with the handle that is created through this method, you must deallocate it yourself by calling the native Win32 `GlobalFree` method. When you call this method, you pass as a parameter the return value from the method.
+
]]>
The printer named in the property does not exist.
@@ -707,13 +707,13 @@
Creates a handle to a structure that corresponds to the printer and the page settings specified through the parameter.
A handle to a structure.
- to a for a different printer is not supported.
-
- When you are done with the handle that is created through this method, you must deallocate it yourself by calling the native Win32 `GlobalFree` method. When you call this method, you pass as a parameter the return value from the method.
-
+ to a for a different printer is not supported.
+
+ When you are done with the handle that is created through this method, you must deallocate it yourself by calling the native Win32 `GlobalFree` method. When you call this method, you pass as a parameter the return value from the method.
+
]]>
The printer named in the property does not exist.
@@ -751,11 +751,11 @@
Creates a handle to a structure that corresponds to the printer settings.
A handle to a structure.
- method.
-
+ method.
+
]]>
@@ -790,20 +790,20 @@
Gets the names of all printers installed on the computer.
A that represents the names of all printers installed on the computer.
- property, when the selection changes. The `PopulateInstalledPrintersCombo` routine is called when the form is being initialized. The example requires that a variable named `printDoc` exists and that the specific combo box exists.
-
+ property, when the selection changes. The `PopulateInstalledPrintersCombo` routine is called when the form is being initialized. The example requires that a variable named `printDoc` exists and that the specific combo box exists.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CPP/source.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CS/source.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet5":::
+
]]>
The available printers could not be enumerated.
@@ -841,19 +841,19 @@
if designates the default printer; otherwise, .
- always returns `false` when you explicitly set the property to a string value other than `null`.
-
-
-
-## Examples
- The following example demonstrates how to use the property. To run this example, paste the following code into a form and call `PopulateInstalledPrintersCombo` from the form's constructor or event-handling method.
-
+ always returns `false` when you explicitly set the property to a string value other than `null`.
+
+
+
+## Examples
+ The following example demonstrates how to use the property. To run this example, paste the following code into a form and call `PopulateInstalledPrintersCombo` from the form's constructor or event-handling method.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Printing.PrinterSettingsEx/CS/Form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Printing.PrinterSettingsEx/VB/Form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Printing.PrinterSettingsEx/VB/Form1.vb" id="Snippet1":::
+
]]>
@@ -971,11 +971,11 @@
if the printer is a plotter; if the printer is a raster.
-
@@ -1012,28 +1012,28 @@
if the property designates a valid printer; otherwise, .
- property after setting the to safely determine if the printer is valid.
-
-
-
-## Examples
- The following code example specifies the target printer by setting the property, and if the is `true`, prints the document on the specified printer. The example has three prerequisites:
-
-- A variable named `filePath` has been set to the path of the file to print.
-
-- A method named `pd_PrintPage`, which handles the event, has been defined.
-
-- A variable named `printer` has been set to the printer's name.
-
- Use the , , and namespaces for this example.
-
+ property after setting the to safely determine if the printer is valid.
+
+
+
+## Examples
+ The following code example specifies the target printer by setting the property, and if the is `true`, prints the document on the specified printer. The example has three prerequisites:
+
+- A variable named `filePath` has been set to the path of the file to print.
+
+- A method named `pd_PrintPage`, which handles the event, has been defined.
+
+- A variable named `printer` has been set to the printer's name.
+
+ Use the , , and namespaces for this example.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Classic PrinterSettings Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Classic PrinterSettings Example/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrinterSettings Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrinterSettings Example/VB/source.vb" id="Snippet1":::
+
]]>
@@ -1069,11 +1069,11 @@
Gets the angle, in degrees, that the portrait orientation is rotated to produce the landscape orientation.
The angle, in degrees, that the portrait orientation is rotated to produce the landscape orientation.
- property to `true` to print a page in landscape format.
-
+ property to `true` to print a page in landscape format.
+
]]>
@@ -1110,11 +1110,11 @@
Gets the maximum number of copies that the printer enables the user to print at a time.
The maximum number of copies that the printer enables the user to print at a time.
- property to the number of copies to print. Use the property to determine if your printer supports printing multiple copies at a time, because some printers do not.
-
+ property to the number of copies to print. Use the property to determine if your printer supports printing multiple copies at a time, because some printers do not.
+
]]>
@@ -1156,11 +1156,11 @@
Gets or sets the maximum or that can be selected in a .
The maximum or that can be selected in a .
- and properties are used by the when the user selects a print range. The property must be set to `true` to enable the user to specify a print range. When setting the or values programmatically, ensure that they are within the range defined by the and properties, or an exception is thrown when displaying the .
-
+ and properties are used by the when the user selects a print range. The property must be set to `true` to enable the user to specify a print range. When setting the or values programmatically, ensure that they are within the range defined by the and properties, or an exception is thrown when displaying the .
+
]]>
The value of the property is less than zero.
@@ -1206,11 +1206,11 @@
Gets or sets the minimum or that can be selected in a .
The minimum or that can be selected in a .
- and properties are used by the when the user selects a print range. The property must be set to `true` to enable the user to specify a print range. When setting the or values programmatically, ensure that they are within the range defined by the and properties, or an exception is thrown when displaying the .
-
+ and properties are used by the when the user selects a print range. The property must be set to `true` to enable the user to specify a print range. When setting the or values programmatically, ensure that they are within the range defined by the and properties, or an exception is thrown when displaying the .
+
]]>
The value of the property is less than zero.
@@ -1250,24 +1250,24 @@
Gets the paper sizes that are supported by this printer.
A that represents the paper sizes that are supported by this printer.
- contains instances that represent the paper sizes through the property, which contains one of the values.
-
- Typically, you set a page's paper size through the property to a valid available through the collection.
-
- To specify a custom paper size, see the constructor.
-
-
-
-## Examples
- The following code example populates the `comboPaperSize` combo box with the printer's supported paper sizes. In addition, a custom paper size is created and added to the combo box. The is identified as the property that provides the display string for the item being added through the property of the combo box. The example requires that a variable named `printDoc` exists and that the specific combo box exists.
-
+ contains instances that represent the paper sizes through the property, which contains one of the values.
+
+ Typically, you set a page's paper size through the property to a valid available through the collection.
+
+ To specify a custom paper size, see the constructor.
+
+
+
+## Examples
+ The following code example populates the `comboPaperSize` combo box with the printer's supported paper sizes. In addition, a custom paper size is created and added to the combo box. The is identified as the property that provides the display string for the item being added through the property of the combo box. The example requires that a variable named `printDoc` exists and that the specific combo box exists.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet1":::
+
]]>
@@ -1308,22 +1308,22 @@
Gets the paper source trays that are available on the printer.
A that represents the paper source trays that are available on this printer.
- contains instances that represent the paper source trays through the property, which contains one of the values.
-
- Typically, you set a page's paper source through the property to a valid available through the collection.
-
-
-
-## Examples
- The following code example populates the `comboPaperSource` combo box with the printer's supported paper sources. The is identified as the property that provides the display string for the item being added through the property of the combo box. The example requires that a variable named `printDoc` exists and that the specific combo box exists.
-
+ contains instances that represent the paper source trays through the property, which contains one of the values.
+
+ Typically, you set a page's paper source through the property to a valid available through the collection.
+
+
+
+## Examples
+ The following code example populates the `comboPaperSource` combo box with the printer's supported paper sources. The is identified as the property that provides the display string for the item being added through the property of the combo box. The example requires that a variable named `printDoc` exists and that the specific combo box exists.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CPP/source.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CS/source.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet2":::
+
]]>
@@ -1364,30 +1364,30 @@
Gets or sets the name of the printer to use.
The name of the printer to use.
- to determine if the printer name is recognized as a valid printer on the system.
-
- You can also use the property to get a list of printers installed on the system.
-
-
-
-## Examples
- The following code example specifies the target printer by setting the property, and if the is `true`, prints the document on the specified printer. The example has three prerequisites:
-
-- A variable named `filePath` has been set to the path of the file to print.
-
-- A method named `pd_PrintPage`, which handles the event, has been defined.
-
-- A variable named `printer` has been set to the printer's name.
-
- Use the , , and namespaces for this example.
-
+ to determine if the printer name is recognized as a valid printer on the system.
+
+ You can also use the property to get a list of printers installed on the system.
+
+
+
+## Examples
+ The following code example specifies the target printer by setting the property, and if the is `true`, prints the document on the specified printer. The example has three prerequisites:
+
+- A variable named `filePath` has been set to the path of the file to print.
+
+- A method named `pd_PrintPage`, which handles the event, has been defined.
+
+- A variable named `printer` has been set to the printer's name.
+
+ Use the , , and namespaces for this example.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Classic PrinterSettings Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Classic PrinterSettings Example/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrinterSettings Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PrinterSettings Example/VB/source.vb" id="Snippet1":::
+
]]>
@@ -1426,24 +1426,24 @@
Gets all the resolutions that are supported by this printer.
A that represents the resolutions that are supported by this printer.
- contains instances that represent the printer resolutions supported through the property, which contains one of the values.
-
- Typically, you set a page's paper source through the property to a valid available through the collection.
-
- If is `Custom`, then use the and properties to determine the custom printer resolution in the horizontal and vertical directions, respectively.
-
-
-
-## Examples
- The following code example populates the `comboPrintResolution` combo box with the supported resolutions. The example requires that a variable named `printDoc` exists and that the specific combo box exists.
-
+ contains instances that represent the printer resolutions supported through the property, which contains one of the values.
+
+ Typically, you set a page's paper source through the property to a valid available through the collection.
+
+ If is `Custom`, then use the and properties to determine the custom printer resolution in the horizontal and vertical directions, respectively.
+
+
+
+## Examples
+ The following code example populates the `comboPrintResolution` combo box with the supported resolutions. The example requires that a variable named `printDoc` exists and that the specific combo box exists.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CPP/source.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CS/source.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet3":::
+
]]>
@@ -1520,15 +1520,15 @@
Gets or sets the page numbers that the user has specified to be printed.
One of the values.
- property is used by the .when the user selects a print range. The default is `AllPages`. To enable the user to specify a range of pages to print, the property must be set to `true`. To enable the user to specify the selected pages to print, the property must be set to `true`.
-
- During the printing process, in the event, view the to determine what should be printed. If is , use the and properties to determine what pages should be printed. If is , then specify output only for the selected pages.
-
- The , and can also be set programmatically, though the implementation is the same.
-
+ property is used by the .when the user selects a print range. The default is `AllPages`. To enable the user to specify a range of pages to print, the property must be set to `true`. To enable the user to specify the selected pages to print, the property must be set to `true`.
+
+ During the printing process, in the event, view the to determine what should be printed. If is , use the and properties to determine what pages should be printed. If is , then specify output only for the selected pages.
+
+ The , and can also be set programmatically, though the implementation is the same.
+
]]>
The value of the property is not one of the values.
@@ -1580,14 +1580,14 @@
if the printing output is sent to a file; otherwise, . The default is .
- property is used by the when the user selects the **Print to file** option. In such a case, the output port is set to "FILE," causing the Windows printing subsystem to prompt the user for a file name when the method is called.
-
+ property is used by the when the user selects the **Print to file** option. In such a case, the output port is set to "FILE," causing the Windows printing subsystem to prompt the user for a file name when the method is called.
+
> [!NOTE]
-> The property is only used by the and cannot be set programmatically. The `Print to file` option only appears on the when the property is set to `true`.
-
+> The property is only used by the and cannot be set programmatically. The `Print to file` option only appears on the when the property is set to `true`.
+
]]>
@@ -1626,11 +1626,11 @@
The handle to a Win32 structure.
Copies the relevant information out of the given handle and into the .
- to a for a different printer is not supported.
-
+ to a for a different printer is not supported.
+
]]>
The printer handle is not valid.
@@ -1703,22 +1703,22 @@
if this printer supports color; otherwise, .
- to `true`.
-
-
-
-## Examples
- The following code example prints a document with the first page in color, if the printer supports it. The example requires that a variable named `printDoc` has been created, and the and events are handled.
-
- Use the and namespaces for this example.
-
+ to `true`.
+
+
+
+## Examples
+ The following code example prints a document with the first page in color, if the printer supports it. The example requires that a variable named `printDoc` has been created, and the and events are handled.
+
+ Use the and namespaces for this example.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CPP/source.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/CS/source.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/PaperSource and PaperSize Example with Resolution/VB/source.vb" id="Snippet6":::
+
]]>
@@ -1760,15 +1760,15 @@
Gets or sets the number of the last page to print.
The number of the last page to print.
- and properties are used by the when the user selects a print range. The property must be set to `true` to enable the user to specify a print range. In addition, the also requires the and to be specified and the value to be within that range.
-
- During the printing process, in the event, view the to determine what should be printed. If is , use the and properties to determine what pages should be printed. If is , then specify output only for the selected pages.
-
- The , and can also be set programmatically, though the implementation is the same.
-
+ and properties are used by the when the user selects a print range. The property must be set to `true` to enable the user to specify a print range. In addition, the also requires the and to be specified and the value to be within that range.
+
+ During the printing process, in the event, view the to determine what should be printed. If is , use the and properties to determine what pages should be printed. If is , then specify output only for the selected pages.
+
+ The , and can also be set programmatically, though the implementation is the same.
+
]]>
The value of the property is less than zero.
diff --git a/xml/System.Drawing.Text/FontCollection.xml b/xml/System.Drawing.Text/FontCollection.xml
index 8ef70008208..e37b5994c31 100644
--- a/xml/System.Drawing.Text/FontCollection.xml
+++ b/xml/System.Drawing.Text/FontCollection.xml
@@ -31,11 +31,13 @@
Provides a base class for installed and private font collections.
- allows you to get a list of the font families contained in the collection with its property. For additional information on fonts and text, including example code, see [Using Fonts and Text](/dotnet/framework/winforms/advanced/using-fonts-and-text).
-
+ allows you to get a list of the font families contained in the collection with its property. For additional information on fonts and text, including example code, see [Using Fonts and Text](/dotnet/framework/winforms/advanced/using-fonts-and-text).
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
]]>
Using Fonts and Text
@@ -84,14 +86,14 @@
Releases all resources used by this .
- when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
-
+ when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
+
> [!NOTE]
-> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
-
+> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
+
]]>
@@ -130,19 +132,19 @@
to release both managed and unmanaged resources; to release only unmanaged resources.
Releases the unmanaged resources used by the and optionally releases the managed resources.
- method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the `disposing` parameter set to `true`. invokes `Dispose` with `disposing` set to `false`.
-
- When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object.
-
+ method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the `disposing` parameter set to `true`. invokes `Dispose` with `disposing` set to `false`.
+
+ When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object.
+
]]>
- can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
-
+ can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
+
For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://docs.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)).
diff --git a/xml/System.Drawing.Text/InstalledFontCollection.xml b/xml/System.Drawing.Text/InstalledFontCollection.xml
index f10c237dcbc..5cb7ee2a415 100644
--- a/xml/System.Drawing.Text/InstalledFontCollection.xml
+++ b/xml/System.Drawing.Text/InstalledFontCollection.xml
@@ -27,23 +27,23 @@
Represents the fonts installed on the system. This class cannot be inherited.
- allows you to get a list of fonts families that are installed on the computer running the application with its property. For additional information on fonts and text, including example code, see [Using Fonts and Text](/dotnet/framework/winforms/advanced/using-fonts-and-text).
-
- Do not use the class to install a font to Windows. Instead use the GDI `AddFontResource` function. An object sees only fonts that are installed in Windows before the object is created.
-
-
-
-## Examples
- The following example shows how to get a list of fonts that support the regular .
-
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler.
-
+ allows you to get a list of fonts families that are installed on the computer running the application with its property. For additional information on fonts and text, including example code, see [Using Fonts and Text](/dotnet/framework/winforms/advanced/using-fonts-and-text).
+
+ Do not use the class to install a font to Windows. Instead use the GDI `AddFontResource` function. An object sees only fonts that are installed in Windows before the object is created.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+## Examples
+ The following example shows how to get a list of fonts that support the regular .
+
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Misc3/CS/Form1.cs" id="Snippetinstalledfonts":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippetinstalledfonts":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippetinstalledfonts":::
+
]]>
Using Fonts and Text
diff --git a/xml/System.Drawing.Text/PrivateFontCollection.xml b/xml/System.Drawing.Text/PrivateFontCollection.xml
index b5964463540..bd253231c5a 100644
--- a/xml/System.Drawing.Text/PrivateFontCollection.xml
+++ b/xml/System.Drawing.Text/PrivateFontCollection.xml
@@ -33,11 +33,13 @@
Provides a collection of font families built from font files that are provided by the client application.
- class allows applications to install a private version of an existing font without the requirement to replace the system version of the font. For example, GDI+ can create a private version of the Arial font in addition to the Arial font that the system uses. can also be used to install fonts that do not exist in the operating system. This is a temporary font install that does not affect the system-installed collection. To see the installed collection, use the class.
-
+ class allows applications to install a private version of an existing font without the requirement to replace the system version of the font. For example, GDI+ can create a private version of the Arial font in addition to the Arial font that the system uses. can also be used to install fonts that do not exist in the operating system. This is a temporary font install that does not affect the system-installed collection. To see the installed collection, use the class.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
]]>
Using Fonts and Text
@@ -104,11 +106,11 @@
A that contains the file name of the font to add.
Adds a font from the specified file to this .
- is not supported on operating systems before Windows 2000. When using a private font on operating systems before Windows 2000, the default font, typically Microsoft Sans Serif, will be substituted.
-
+ is not supported on operating systems before Windows 2000. When using a private font on operating systems before Windows 2000, the default font, typically Microsoft Sans Serif, will be substituted.
+
]]>
The specified font is not supported or the font file cannot be found.
@@ -150,11 +152,11 @@
The memory length of the font to add.
Adds a font contained in system memory to this .
- method, passing `true`, to set GDI+ rendering on the application, or on individual controls by setting the control's property to `true`. Some controls cannot be rendered with GDI+.
-
+ method, passing `true`, to set GDI+ rendering on the application, or on individual controls by setting the control's property to `true`. Some controls cannot be rendered with GDI+.
+
]]>
diff --git a/xml/System.Drawing/Bitmap.xml b/xml/System.Drawing/Bitmap.xml
index 468c4d4dd1d..7d367d749ba 100644
--- a/xml/System.Drawing/Bitmap.xml
+++ b/xml/System.Drawing/Bitmap.xml
@@ -54,34 +54,34 @@
Encapsulates a GDI+ bitmap, which consists of the pixel data for a graphics image and its attributes. A is an object used to work with images defined by pixel data.
- constructors and save them to a stream or to the file system with the method. Images are drawn to the screen or to memory by using the method of the object. For a list of topics about working with image files, see [Working with Images, Bitmaps, Icons, and Metafiles](/dotnet/framework/winforms/advanced/working-with-images-bitmaps-icons-and-metafiles).
-
+ constructors and save them to a stream or to the file system with the method. Images are drawn to the screen or to memory by using the method of the object. For a list of topics about working with image files, see [Working with Images, Bitmaps, Icons, and Metafiles](/dotnet/desktop/winforms/advanced/images-bitmaps-and-metafiles).
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
> [!NOTE]
-> The class is not accessible across application domains. For example, if you create a dynamic and create several brushes, pens, and bitmaps in that domain, then pass these objects back to the main application domain, you can successfully use the pens and brushes. However, if you call the method to draw the marshaled , you receive the following exception.
->
-> Remoting cannot find field "native image" on type "System.Drawing.Image".
-
-
-
-## Examples
- The following code example demonstrates how to construct a new from a file, using the and methods to recolor the image. It also uses the , , and properties.
-
- This example is designed to be used with a Windows Forms that contains a , , and named `Label1`, `PictureBox1`, and `Button1`, respectively. Paste the code into the form and associate the `Button1_Click` method with the button's event.
-
+> The class is not accessible across application domains. For example, if you create a dynamic and create several brushes, pens, and bitmaps in that domain, then pass these objects back to the main application domain, you can successfully use the pens and brushes. However, if you call the method to draw the marshaled , you receive the following exception:
+>
+> **Remoting cannot find field "native image" on type "System.Drawing.Image".**
+
+## Examples
+ The following code example demonstrates how to construct a new from a file, using the and methods to recolor the image. It also uses the , , and properties.
+
+ This example is designed to be used with a Windows Forms that contains a , , and named `Label1`, `PictureBox1`, and `Button1`, respectively. Paste the code into the form and associate the `Button1_Click` method with the button's event.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet1":::
+
]]>
Images, Bitmaps, and Metafiles
- Working with Images, Bitmaps, Icons, and Metafiles
+ Working with Images, Bitmaps, Icons, and Metafiles
@@ -155,33 +155,33 @@
The data stream used to load the image.
Initializes a new instance of the class from the specified data stream.
- .
-
- Due to a limitation of the GDI+ decoder, an is thrown if you construct a bitmap from a .png image file with a single dimension greater than 65,535 pixels.
-
-
-
-## Examples
- The following code example demonstrates how to load a bitmap from a stream.
-
- This example is designed to be used with Windows Forms. Create a form that contains a named `PictureBox1`. Paste the code into the form and call the `InitializeStreamBitmap` method from the form's constructor or event-handling method.
-
+ .
+
+ Due to a limitation of the GDI+ decoder, an is thrown if you construct a bitmap from a .png image file with a single dimension greater than 65,535 pixels.
+
+
+
+## Examples
+ The following code example demonstrates how to load a bitmap from a stream.
+
+ This example is designed to be used with Windows Forms. Create a form that contains a named `PictureBox1`. Paste the code into the form and call the `InitializeStreamBitmap` method from the form's constructor or event-handling method.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BitmapMembers/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BitmapMembers/VB/form1.vb" id="Snippet2":::
+
]]>
- does not contain image data or is .
-
- -or-
-
+ does not contain image data or is .
+
+ -or-
+
contains a PNG image file with a single dimension greater than 65,535 pixels.
- Types of Bitmaps
+ Types of Bitmaps
@@ -214,15 +214,15 @@
The bitmap file name and path.
Initializes a new instance of the class from the specified file.
- is disposed.
-
+ is disposed.
+
]]>
The specified file is not found.
- Types of Bitmaps
+ Types of Bitmaps
@@ -298,11 +298,11 @@
The height, in pixels, of the new .
Initializes a new instance of the class with the specified size.
- with a enumeration value of .
-
+ with a enumeration value of .
+
]]>
The operation failed.
@@ -341,22 +341,22 @@
to use color correction for this ; otherwise, .
Initializes a new instance of the class from the specified data stream.
- .
-
- Due to a limitation of the GDI+ decoder, an is thrown if you construct a bitmap from a .png image file with a single dimension greater than 65,535 pixels.
-
+ .
+
+ Due to a limitation of the GDI+ decoder, an is thrown if you construct a bitmap from a .png image file with a single dimension greater than 65,535 pixels.
+
]]>
- does not contain image data or is .
-
- -or-
-
+ does not contain image data or is .
+
+ -or-
+
contains a PNG image file with a single dimension greater than 65,535 pixels.
- Types of Bitmaps
+ Types of Bitmaps
@@ -392,25 +392,25 @@
to use color correction for this ; otherwise, .
Initializes a new instance of the class from the specified file.
- is disposed.
-
-
-
-## Examples
- The following code example demonstrates how to construct a new bitmap from a file. The example uses the and methods to recolor the image. It also uses the property.
-
- This example is designed to be used with a Windows Form that contains a , and named `Label1`, `PictureBox1` and `Button1`, respectively. Paste the code into the form and associate the `Button1_Click` method with the button's event.
-
+ is disposed.
+
+
+
+## Examples
+ The following code example demonstrates how to construct a new bitmap from a file. The example uses the and methods to recolor the image. It also uses the property.
+
+ This example is designed to be used with a Windows Form that contains a , and named `Label1`, `PictureBox1` and `Button1`, respectively. Paste the code into the form and associate the `Button1_Click` method with the button's event.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet1":::
+
]]>
- Types of Bitmaps
+ Types of Bitmaps
@@ -445,23 +445,23 @@
The name of the resource.
Initializes a new instance of the class from a specified resource.
- type and `Button.bmp` to this constructor and it will look for a resource named `System.Windows.Forms.Button.bmp`.
-
-
-
-## Examples
- The following code example demonstrates how to construct a bitmap from a type, and how to use the method. To run this example, paste the code into a Windows Form. Handle the form's event and call the `ConstructFromResourceSaveAsGif` method, passing `e` as
-
+ type and `Button.bmp` to this constructor and it will look for a resource named `System.Windows.Forms.Button.bmp`.
+
+
+
+## Examples
+ The following code example demonstrates how to construct a bitmap from a type, and how to use the method. To run this example, paste the code into a Windows Form. Handle the form's event and call the `ConstructFromResourceSaveAsGif` method, passing `e` as
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.BmpCtorAndSave/cpp/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.BmpCtorAndSave/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BmpCtorAndSave/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BmpCtorAndSave/VB/form1.vb" id="Snippet1":::
+
]]>
- Types of Bitmaps
+ Types of Bitmaps
@@ -535,11 +535,11 @@
The object that specifies the resolution for the new .
Initializes a new instance of the class with the specified size and with the resolution of the specified object.
- that this method creates takes its horizontal and vertical resolution from the and properties of `g`, respectively.
-
+ that this method creates takes its horizontal and vertical resolution from the and properties of `g`, respectively.
+
]]>
@@ -621,19 +621,19 @@
Pointer to an array of bytes that contains the pixel data.
Initializes a new instance of the class with the specified size, pixel format, and pixel data.
- is released.
-
-
-
-## Examples
- The following code example shows how to use the constructor. This example is designed to be used with Windows Forms and requires a parameter, which is a parameter of the event.
-
+ is released.
+
+
+
+## Examples
+ The following code example shows how to use the constructor. This example is designed to be used with Windows Forms and requires a parameter, which is a parameter of the event.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippetconstructor":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippetconstructor":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippetconstructor":::
+
]]>
A value is specified whose name does not start with *Format*. For example, specifying will cause an , but will not.
@@ -684,29 +684,29 @@
Creates a copy of the section of this defined by structure and with a specified enumeration.
The new that this method creates.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a from a file.
-
-- Clones a portion of that .
-
-- Draws the cloned portion to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a from a file.
+
+- Clones a portion of that .
+
+- Draws the cloned portion to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet1":::
+
]]>
is outside of the source bitmap bounds.
- The height or width of is 0.
-
- -or-
-
+ The height or width of is 0.
+
+ -or-
+
A value is specified whose name does not start with *Format*. For example, specifying will cause an , but will not.
@@ -746,21 +746,21 @@
Creates a copy of the section of this defined with a specified enumeration.
The that this method creates.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a from a file.
-
-- Clones a portion of that .
-
-- Draws the cloned portion to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a from a file.
+
+- Clones a portion of that .
+
+- Draws the cloned portion to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -802,21 +802,21 @@
Creates a from a Windows handle to an icon.
The that this method creates.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Gets the handle to an existing icon image.
-
-- Creates a from the handle.
-
-- Draws the to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Gets the handle to an existing icon image.
+
+- Creates a from the handle.
+
+- Draws the to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -857,11 +857,11 @@
Creates a from the specified Windows resource.
The that this method creates.
- requires security permission to call unmanaged code. For a managed alternative for creating a bitmap from an embedded resource, see . works only with bitmaps that are named resources in a DLL.
-
+ requires security permission to call unmanaged code. For a managed alternative for creating a bitmap from an embedded resource, see . works only with bitmaps that are named resources in a DLL.
+
]]>
@@ -912,20 +912,20 @@
Creates a GDI bitmap object from this .
A handle to the GDI bitmap object that this method creates.
- method.
-
+ method.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CPP/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CS/form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet4":::
+
]]>
The height or width of the bitmap is greater than .
@@ -972,20 +972,20 @@
Creates a GDI bitmap object from this .
A handle to the GDI bitmap object that this method creates.
- .method.
-
+ .method.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet5":::
+
]]>
The height or width of the bitmap is greater than .
@@ -1029,28 +1029,28 @@
Returns the handle to an icon.
A Windows handle to an icon with the same image as the .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Draws that object to the screen.
-
-- Gets an icon handle for the .
-
-- Sets the attribute of the form to an icon created from the handle.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Draws that object to the screen.
+
+- Gets an icon handle for the .
+
+- Sets the attribute of the form to an icon created from the handle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CPP/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CS/form1.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet6":::
+
]]>
The operation failed.
@@ -1092,22 +1092,22 @@
Gets the color of the specified pixel in this .
A structure that represents the color of the specified pixel.
- `e`, which is a parameter of the event handler. The code gets the color of a pixel in a bitmap, and then fills a rectangle with that color.
-
+ `e`, which is a parameter of the event handler. The code gets the color of a pixel in a bitmap, and then fills a rectangle with that color.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CPP/form1.cpp" id="Snippet7":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CS/form1.cs" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet7":::
+
]]>
- is less than 0, or greater than or equal to .
-
- -or-
-
+ is less than 0, or greater than or equal to .
+
+ -or-
+
is less than 0, or greater than or equal to .
The operation failed.
@@ -1159,30 +1159,30 @@
Locks a into system memory.
A that contains information about this lock operation.
- method to lock an existing bitmap in system memory so that it can be changed programmatically. You can change the color of an image with the method, although the method offers better performance for large-scale changes.
-
- The specifies the attributes of the , such as size, pixel format, the starting address of the pixel data in memory, and length of each scan line (stride).
-
- When calling this method, you should use a member of the enumeration that contains a specific bits-per-pixel (BPP) value. Using values such as and will throw an . Also, passing the incorrect pixel format for a bitmap will throw an .
-
-
-
-## Examples
- The following code example demonstrates how to use the , , , and properties; the and methods; and the enumeration. This example is designed to be used with Windows Forms. This example is not designed to work correctly with all pixel formats, but to provide an example of how to use the method. To run this example, paste it into a form and handle the form's event by calling the `LockUnlockBitsExample` method, passing `e` as .
-
+ method to lock an existing bitmap in system memory so that it can be changed programmatically. You can change the color of an image with the method, although the method offers better performance for large-scale changes.
+
+ The specifies the attributes of the , such as size, pixel format, the starting address of the pixel data in memory, and length of each scan line (stride).
+
+ When calling this method, you should use a member of the enumeration that contains a specific bits-per-pixel (BPP) value. Using values such as and will throw an . Also, passing the incorrect pixel format for a bitmap will throw an .
+
+
+
+## Examples
+ The following code example demonstrates how to use the , , , and properties; the and methods; and the enumeration. This example is designed to be used with Windows Forms. This example is not designed to work correctly with all pixel formats, but to provide an example of how to use the method. To run this example, paste it into a form and handle the form's event by calling the `LockUnlockBitsExample` method, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BitmapMembers/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BitmapMembers/VB/form1.vb" id="Snippet5":::
+
]]>
- The is not a specific bits-per-pixel value.
-
- -or-
-
+ The is not a specific bits-per-pixel value.
+
+ -or-
+
The incorrect is passed in for a bitmap.
The operation failed.
@@ -1226,22 +1226,22 @@
Locks a into system memory.
A that contains information about the lock operation.
- method to lock an existing bitmap in system memory so that it can be changed programmatically. You can change the color of an image with the method, although the method offers better performance for large-scale changes.
-
- When calling this method, you should use a member of the enumeration that contains a specific bits-per-pixel (BPP) value. Using values, such as and , will throw an . Also, passing the incorrect pixel format for a bitmap will throw an .
-
- This version of the method is intended to be used with a `flags` value of .
-
+ method to lock an existing bitmap in system memory so that it can be changed programmatically. You can change the color of an image with the method, although the method offers better performance for large-scale changes.
+
+ When calling this method, you should use a member of the enumeration that contains a specific bits-per-pixel (BPP) value. Using values, such as and , will throw an . Also, passing the incorrect pixel format for a bitmap will throw an .
+
+ This version of the method is intended to be used with a `flags` value of .
+
]]>
- value is not a specific bits-per-pixel value.
-
- -or-
-
+ value is not a specific bits-per-pixel value.
+
+ -or-
+
The incorrect is passed in for a bitmap.
The operation failed.
@@ -1285,22 +1285,22 @@
Makes the default transparent color transparent for this .
- . If no transparent color is specified by the system, is the transparent color.
-
- When you call , the bitmap will be converted to the format, as this format supports an alpha channel.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code makes the system default transparent color transparent for `myBitmap`, and then draws the to the screen.
-
+ . If no transparent color is specified by the system, is the transparent color.
+
+ When you call , the bitmap will be converted to the format, as this format supports an alpha channel.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code makes the system default transparent color transparent for `myBitmap`, and then draws the to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CPP/form1.cpp" id="Snippet8":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CS/form1.cs" id="Snippet8":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet8":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet8":::
+
]]>
The image format of the is an icon format.
@@ -1340,26 +1340,26 @@
The structure that represents the color to make transparent.
Makes the specified color transparent for this .
- , the bitmap will be converted to the format, as this format supports an alpha channel.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Gets the color of a pixel in a .
-
-- Makes that color transparent for the bitmap.
-
-- Draws the to the screen.
-
+ , the bitmap will be converted to the format, as this format supports an alpha channel.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Gets the color of a pixel in a .
+
+- Makes that color transparent for the bitmap.
+
+- Draws the to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CPP/form1.cpp" id="Snippet9":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CS/form1.cs" id="Snippet9":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet9":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet9":::
+
]]>
The image format of the is an icon format.
@@ -1403,26 +1403,26 @@
A structure that represents the color to assign to the specified pixel.
Sets the color of the specified pixel in this .
- method to set the color of an individual pixel in an image programmatically. You can also change an image programmatically by using the method. Typically for large-scale changes, the method offers better performance.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Sets the color of each pixel in the bitmap to black.
-
-- Draws the bitmap.
-
+ method to set the color of an individual pixel in an image programmatically. You can also change an image programmatically by using the method. Typically for large-scale changes, the method offers better performance.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Sets the color of each pixel in the bitmap to black.
+
+- Draws the bitmap.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CPP/form1.cpp" id="Snippet10":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CS/form1.cs" id="Snippet10":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet10":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet10":::
+
]]>
The operation failed.
@@ -1463,19 +1463,19 @@
The vertical resolution, in dots per inch, of the .
Sets the resolution for this .
- method.
-
+ method.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Misc3/CS/Form1.cs" id="Snippetsetresolution":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippetsetresolution":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippetsetresolution":::
+
]]>
The operation failed.
@@ -1514,20 +1514,20 @@
A that specifies information about the lock operation.
Unlocks this from system memory.
- specifies the attributes of the , such as size, pixel format, the starting address of the pixel data in memory, and length of each scan line (stride).
-
-
-
-## Examples
- The following code example demonstrates how to use the , , , and properties; the and methods; and the enumeration. This example is not designed to work correctly with all pixel formats, but to provide an example of how to use the method. This example is designed to be used with Windows Forms. To run this example, paste it into a form and handle the form's event by calling the `LockUnlockBitsExample` method, passing `e` as .
-
+ specifies the attributes of the , such as size, pixel format, the starting address of the pixel data in memory, and length of each scan line (stride).
+
+
+
+## Examples
+ The following code example demonstrates how to use the , , , and properties; the and methods; and the enumeration. This example is not designed to work correctly with all pixel formats, but to provide an example of how to use the method. This example is designed to be used with Windows Forms. To run this example, paste it into a form and handle the form's event by calling the `LockUnlockBitsExample` method, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BitmapMembers/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BitmapMembers/VB/form1.vb" id="Snippet5":::
+
]]>
The operation failed.
diff --git a/xml/System.Drawing/Brush.xml b/xml/System.Drawing/Brush.xml
index 470f9a7f2a0..fd7d3cf39d8 100644
--- a/xml/System.Drawing/Brush.xml
+++ b/xml/System.Drawing/Brush.xml
@@ -34,11 +34,13 @@
Defines objects used to fill the interiors of graphical shapes such as rectangles, ellipses, pies, polygons, and paths.
- , such as , , and .
-
+ , such as , , and .
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
]]>
@@ -157,16 +159,16 @@
Releases all resources used by this object.
- allows the resources used by this object to be reallocated for other purposes.
-
- Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
-
+ allows the resources used by this object to be reallocated for other purposes.
+
+ Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
+
> [!NOTE]
-> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
-
+> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
+
]]>
@@ -205,19 +207,19 @@
to release both managed and unmanaged resources; to release only unmanaged resources.
Releases the unmanaged resources used by the and optionally releases the managed resources.
- method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the `disposing` parameter set to `true`. invokes `Dispose` with `disposing` set to `false`.
-
- When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object.
-
+ method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the `disposing` parameter set to `true`. invokes `Dispose` with `disposing` set to `false`.
+
+ When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object.
+
]]>
- can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
-
+ can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
+
For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://docs.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)).
diff --git a/xml/System.Drawing/Brushes.xml b/xml/System.Drawing/Brushes.xml
index 0f0b2dc014e..c56cdf283af 100644
--- a/xml/System.Drawing/Brushes.xml
+++ b/xml/System.Drawing/Brushes.xml
@@ -31,20 +31,20 @@
Brushes for all the standard colors. This class cannot be inherited.
- class contains `static` read-only properties that return a object of the color indicated by the property name. You typically do not have to explicitly dispose of the brush returned by a property in this class, unless it is used to construct a new brush. For more information about the colors represented by the brushes in this class, see [Colors by Name](https://go.microsoft.com/fwlink/?LinkId=92332).
-
-
-
-## Examples
- The following code example demonstrates the how to use a member of the class to fill a . This example should be used with a Windows Form. Paste this code into a form and call this method when handling the form's event, passing `e` as .
-
+ class contains `static` read-only properties that return a object of the color indicated by the property name. You typically do not have to explicitly dispose of the brush returned by a property in this class, unless it is used to construct a new brush. For more information about the colors represented by the brushes in this class, see [Colors by Name](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value).
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+## Examples
+ The following code example demonstrates the how to use a member of the class to fill a . This example should be used with a Windows Form. Paste this code into a form and call this method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.RectanglesAndPoints/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.RectanglesAndPoints/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.RectanglesAndPoints/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.RectanglesAndPoints/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -79,11 +79,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -118,11 +118,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -157,11 +157,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -196,11 +196,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -235,11 +235,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -274,11 +274,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -313,11 +313,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -352,11 +352,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -391,11 +391,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -430,11 +430,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -469,11 +469,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -508,11 +508,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -547,11 +547,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -586,11 +586,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -625,11 +625,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -664,11 +664,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -703,11 +703,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -742,11 +742,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -781,11 +781,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -820,11 +820,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -859,11 +859,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -898,11 +898,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -937,11 +937,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -976,11 +976,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1015,11 +1015,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1054,11 +1054,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1093,11 +1093,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1132,11 +1132,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1171,11 +1171,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1210,11 +1210,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1249,11 +1249,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1288,11 +1288,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1327,11 +1327,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1366,11 +1366,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1405,11 +1405,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1444,11 +1444,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1483,11 +1483,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1522,11 +1522,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1561,11 +1561,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1600,11 +1600,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1639,11 +1639,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1678,11 +1678,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1717,11 +1717,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1756,11 +1756,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1795,11 +1795,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1834,11 +1834,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1873,11 +1873,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1912,11 +1912,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1951,11 +1951,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -1990,11 +1990,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2029,11 +2029,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2068,11 +2068,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2107,11 +2107,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2146,11 +2146,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2185,11 +2185,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2224,11 +2224,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2263,11 +2263,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2302,11 +2302,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2341,11 +2341,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2380,11 +2380,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2419,11 +2419,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2458,11 +2458,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2497,11 +2497,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2536,11 +2536,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2575,11 +2575,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2614,11 +2614,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2653,11 +2653,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2692,11 +2692,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2731,11 +2731,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2770,11 +2770,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2809,11 +2809,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2848,11 +2848,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2887,11 +2887,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2926,11 +2926,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -2965,11 +2965,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3004,11 +3004,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3043,11 +3043,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3082,11 +3082,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3121,11 +3121,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3160,11 +3160,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3199,11 +3199,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3238,11 +3238,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3277,11 +3277,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3316,11 +3316,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3355,11 +3355,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3394,11 +3394,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3433,11 +3433,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3472,11 +3472,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3511,11 +3511,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3550,13 +3550,13 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3591,11 +3591,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3630,11 +3630,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3669,11 +3669,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3708,11 +3708,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3747,11 +3747,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3786,11 +3786,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3825,11 +3825,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3864,11 +3864,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3903,11 +3903,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3942,11 +3942,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -3981,11 +3981,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4020,11 +4020,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4059,11 +4059,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4098,11 +4098,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4137,11 +4137,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4176,11 +4176,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4215,11 +4215,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4254,11 +4254,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4293,11 +4293,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4332,11 +4332,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4371,11 +4371,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4410,11 +4410,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4449,11 +4449,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4488,11 +4488,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4527,11 +4527,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4566,11 +4566,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4605,11 +4605,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4644,11 +4644,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4683,11 +4683,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4722,11 +4722,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4761,11 +4761,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4800,11 +4800,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4839,11 +4839,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4878,11 +4878,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4917,11 +4917,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4956,11 +4956,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -4995,11 +4995,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -5034,11 +5034,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -5073,11 +5073,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -5112,11 +5112,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -5151,11 +5151,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -5190,11 +5190,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -5229,11 +5229,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -5268,11 +5268,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -5307,11 +5307,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -5346,11 +5346,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -5385,11 +5385,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -5424,11 +5424,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -5463,11 +5463,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -5502,11 +5502,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
@@ -5541,11 +5541,11 @@
Gets a system-defined object.
A object set to a system-defined color.
-
diff --git a/xml/System.Drawing/BufferedGraphics.xml b/xml/System.Drawing/BufferedGraphics.xml
index 76e37d571a8..0e17b427a14 100644
--- a/xml/System.Drawing/BufferedGraphics.xml
+++ b/xml/System.Drawing/BufferedGraphics.xml
@@ -30,41 +30,41 @@
Provides a graphics buffer for double buffering.
- class allows you to implement custom double buffering for your graphics. It provides a wrapper for a graphics buffer, along with methods that you can use to write to the buffer and render its contents to an output device.
-
- Graphics that use double buffering can reduce or eliminate flicker that is caused by redrawing a display surface. When you use double buffering, updated graphics are first drawn to a buffer in memory, and the contents of this buffer are then quickly written to some or all of the displayed surface. This relatively brief overwrite of the displayed graphics typically reduces or eliminates the flicker that sometimes occurs when graphics are updated.
-
+ class allows you to implement custom double buffering for your graphics. It provides a wrapper for a graphics buffer, along with methods that you can use to write to the buffer and render its contents to an output device.
+
+ Graphics that use double buffering can reduce or eliminate flicker that is caused by redrawing a display surface. When you use double buffering, updated graphics are first drawn to a buffer in memory, and the contents of this buffer are then quickly written to some or all of the displayed surface. This relatively brief overwrite of the displayed graphics typically reduces or eliminates the flicker that sometimes occurs when graphics are updated.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
> [!NOTE]
-> The simplest way to use double buffering is to set the control style flag on a control using the method. Setting the flag for a control redirects all painting for the control through a default graphics buffer, without requiring any additional code. This flag is set to `true` by default.
-
- The class has no public constructor and must be created by the for an application domain using its method. You can retrieve the for the current application domain from the static property.
-
- The property can be used for drawing to the graphics buffer. This property provides access to the object that draws to the graphics buffer allocated for this object.
-
- The method with no arguments draws the contents of the graphics buffer to the surface specified when the buffer was allocated. Other overloads of the method allow you to specify a object or an object that points to a device context to which to draw the contents of the graphics buffer.
-
- For more information about drawing double-buffered graphics, see [Double Buffered Graphics](/dotnet/framework/winforms/advanced/double-buffered-graphics).
-
-
-
-## Examples
- The following code example demonstrates using a object to draw graphics using several types of buffering implementations. Clicking the form alternately starts and stops a timer that causes draw updates. The draw updates allow you to observe the effect of double buffering. Right-clicking the form cycles through the following drawing modes:
-
-- Drawing directly to the for a .
-
-- Drawing by overriding the method using the control style.
-
-- Drawing by overriding the method for the form method without using the control style.
-
- In each mode, text is drawn that identifies the current mode and describes the behavior that occurs when each mouse button is pressed.
-
+> The simplest way to use double buffering is to set the control style flag on a control using the method. Setting the flag for a control redirects all painting for the control through a default graphics buffer, without requiring any additional code. This flag is set to `true` by default.
+
+ The class has no public constructor and must be created by the for an application domain using its method. You can retrieve the for the current application domain from the static property.
+
+ The property can be used for drawing to the graphics buffer. This property provides access to the object that draws to the graphics buffer allocated for this object.
+
+ The method with no arguments draws the contents of the graphics buffer to the surface specified when the buffer was allocated. Other overloads of the method allow you to specify a object or an object that points to a device context to which to draw the contents of the graphics buffer.
+
+ For more information about drawing double-buffered graphics, see [Double Buffered Graphics](/dotnet/framework/winforms/advanced/double-buffered-graphics).
+
+## Examples
+ The following code example demonstrates using a object to draw graphics using several types of buffering implementations. Clicking the form alternately starts and stops a timer that causes draw updates. The draw updates allow you to observe the effect of double buffering. Right-clicking the form cycles through the following drawing modes:
+
+- Drawing directly to the for a .
+
+- Drawing by overriding the method using the control style.
+
+- Drawing by overriding the method for the form method without using the control style.
+
+ In each mode, text is drawn that identifies the current mode and describes the behavior that occurs when each mouse button is pressed.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/BufferedGraphicsExample/CPP/bufferingtest.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/BufferedGraphicsExample/CS/bufferingtest.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/BufferedGraphicsExample/VB/bufferingtest.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/BufferedGraphicsExample/VB/bufferingtest.vb" id="Snippet1":::
+
]]>
The class is not thread safe. When accessing a graphics buffer from separate threads, it is important to use a thread-access control mechanism to prevent conflicts.
@@ -109,14 +109,14 @@
Releases all resources used by the object.
- when you are finished using the object. The method leaves the object in an unusable state. After calling , you must release all references to the object so the garbage collector can reclaim the memory that the object was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
-
+ when you are finished using the object. The method leaves the object in an unusable state. After calling , you must release all references to the object so the garbage collector can reclaim the memory that the object was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
+
> [!NOTE]
-> Always call before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
-
+> Always call before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
+
]]>
Double Buffered Graphics
@@ -188,11 +188,11 @@
Gets a object that outputs to the graphics buffer.
A object that outputs to the graphics buffer.
- object that draws to the graphics buffer allocated for this object.
-
+ object that draws to the graphics buffer allocated for this object.
+
]]>
@@ -237,11 +237,11 @@
Writes the contents of the graphics buffer to the default device.
- method of the used to create this object.
-
+ method of the used to create this object.
+
]]>
Double Buffered Graphics
@@ -280,20 +280,20 @@
A object to which to write the contents of the graphics buffer.
Writes the contents of the graphics buffer to the specified object.
- object.
-
-
-
-## Examples
- The following code example demonstrates rendering the contents of the graphics buffer to a specified object. This code is part of a larger example provided for the class.
-
+ object.
+
+
+
+## Examples
+ The following code example demonstrates rendering the contents of the graphics buffer to a specified object. This code is part of a larger example provided for the class.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/BufferingExamples/CPP/bufferingexamples.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/BufferingExamples/CS/bufferingexamples.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/BufferingExamples/VB/bufferingexamples.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/BufferingExamples/VB/bufferingexamples.vb" id="Snippet5":::
+
]]>
@@ -332,20 +332,20 @@
An that points to the device context to which to write the contents of the graphics buffer.
Writes the contents of the graphics buffer to the device context associated with the specified handle.
- handle.
-
-
-
-## Examples
- The following code example demonstrates how to render the contents of the graphics buffer `grafx` to a specified device context. This code is part of a larger example provided for the class.
-
+ handle.
+
+
+
+## Examples
+ The following code example demonstrates how to render the contents of the graphics buffer `grafx` to a specified device context. This code is part of a larger example provided for the class.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/BufferingExamples/CPP/bufferingexamples.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/BufferingExamples/CS/bufferingexamples.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/BufferingExamples/VB/bufferingexamples.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/BufferingExamples/VB/bufferingexamples.vb" id="Snippet6":::
+
]]>
diff --git a/xml/System.Drawing/BufferedGraphicsContext.xml b/xml/System.Drawing/BufferedGraphicsContext.xml
index 1f9100a1de8..a5ccc5acbd2 100644
--- a/xml/System.Drawing/BufferedGraphicsContext.xml
+++ b/xml/System.Drawing/BufferedGraphicsContext.xml
@@ -30,29 +30,29 @@
Provides methods for creating graphics buffers that can be used for double buffering.
- class allows you to implement custom double buffering for your graphics. Graphics that use double buffering can reduce or eliminate flicker that is caused by redrawing a display surface.
-
+ class allows you to implement custom double buffering for your graphics. Graphics that use double buffering can reduce or eliminate flicker that is caused by redrawing a display surface.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
> [!NOTE]
-> The simplest way to use double buffering is to set the control style flag on a control using the method. Setting the control styles flag for a control redirects all painting for the control through a default graphics buffer, without requiring any additional code. This flag is set to `true` by default.
-
- The class provides methods for creating and configuring a graphics buffer. The method creates a , which is a wrapper for a graphics buffer that also provides methods you can use to write to the buffer and render its contents to an output device.
-
- You can retrieve the for the current application domain from the static property. For graphically intensive applications such as animation, you can create a dedicated using the constructor, but for most applications the property will be sufficient.
-
- For more information on drawing buffered graphics and custom buffering implementations, see [Double Buffered Graphics](/dotnet/framework/winforms/advanced/double-buffered-graphics) and [How to: Manually Manage Buffered Graphics](/dotnet/framework/winforms/advanced/how-to-manually-manage-buffered-graphics).
-
-
-
-## Examples
- The following code example demonstrates how to acquire the for the current application domain. This code is part of a larger example provided for the class.
-
+> The simplest way to use double buffering is to set the control style flag on a control using the method. Setting the control styles flag for a control redirects all painting for the control through a default graphics buffer, without requiring any additional code. This flag is set to `true` by default.
+
+ The class provides methods for creating and configuring a graphics buffer. The method creates a , which is a wrapper for a graphics buffer that also provides methods you can use to write to the buffer and render its contents to an output device.
+
+ You can retrieve the for the current application domain from the static property. For graphically intensive applications such as animation, you can create a dedicated using the constructor, but for most applications the property will be sufficient.
+
+ For more information on drawing buffered graphics and custom buffering implementations, see [Double Buffered Graphics](/dotnet/framework/winforms/advanced/double-buffered-graphics) and [How to: Manually Manage Buffered Graphics](/dotnet/framework/winforms/advanced/how-to-manually-manage-buffered-graphics).
+
+## Examples
+ The following code example demonstrates how to acquire the for the current application domain. This code is part of a larger example provided for the class.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/BufferingExamples/CPP/bufferingexamples.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/BufferingExamples/CS/bufferingexamples.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/BufferingExamples/VB/bufferingexamples.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/BufferingExamples/VB/bufferingexamples.vb" id="Snippet1":::
+
]]>
@@ -86,16 +86,16 @@
Initializes a new instance of the class.
- instead of the default instance provided by the . This allows you to create and manage graphics buffers individually.
-
+ instead of the default instance provided by the . This allows you to create and manage graphics buffers individually.
+
> [!NOTE]
-> You should always call when you finish using a dedicated .
-
- For more information about dedicated graphics buffers, see [How to: Manually Manage Buffered Graphics](/dotnet/framework/winforms/advanced/how-to-manually-manage-buffered-graphics).
-
+> You should always call when you finish using a dedicated .
+
+ For more information about dedicated graphics buffers, see [How to: Manually Manage Buffered Graphics](/dotnet/framework/winforms/advanced/how-to-manually-manage-buffered-graphics).
+
]]>
Double Buffered Graphics
@@ -146,20 +146,20 @@
Creates a graphics buffer of the specified size using the pixel format of the specified .
A that can be used to draw to a buffer of the specified dimensions.
- method with a rectangle whose size exceeds the value of the property, a temporary is created to allocate the buffer and provide a temporary context for the buffer. The new is distinct from the for the application domain and it is disposed automatically when the returned by the method is disposed.
-
-
-
-## Examples
- The following code example demonstrates creating a graphics buffer using the method. This code is part of a larger example provided for the class.
-
+ method with a rectangle whose size exceeds the value of the property, a temporary is created to allocate the buffer and provide a temporary context for the buffer. The new is distinct from the for the application domain and it is disposed automatically when the returned by the method is disposed.
+
+
+
+## Examples
+ The following code example demonstrates creating a graphics buffer using the method. This code is part of a larger example provided for the class.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/BufferingExamples/CPP/bufferingexamples.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/BufferingExamples/CS/bufferingexamples.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/BufferingExamples/VB/bufferingexamples.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/BufferingExamples/VB/bufferingexamples.vb" id="Snippet3":::
+
]]>
@@ -203,20 +203,20 @@
Creates a graphics buffer of the specified size using the pixel format of the specified .
A that can be used to draw to a buffer of the specified dimensions.
- method with a rectangle whose size exceeds the value of the property, a temporary is created to allocate the buffer and provide a temporary context for the buffer. The new is distinct from the for the application domain and it is disposed automatically when the returned by the method is disposed.
-
-
-
-## Examples
- The following code example demonstrates creating a graphics buffer using the method. This code is part of a larger example provided for the class.
-
+ method with a rectangle whose size exceeds the value of the property, a temporary is created to allocate the buffer and provide a temporary context for the buffer. The new is distinct from the for the application domain and it is disposed automatically when the returned by the method is disposed.
+
+
+
+## Examples
+ The following code example demonstrates creating a graphics buffer using the method. This code is part of a larger example provided for the class.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/BufferingExamples/CPP/bufferingexamples.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/BufferingExamples/CS/bufferingexamples.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/BufferingExamples/VB/bufferingexamples.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/BufferingExamples/VB/bufferingexamples.vb" id="Snippet4":::
+
]]>
@@ -257,14 +257,14 @@
Releases all resources used by the .
- when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
-
+ when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
+
> [!NOTE]
-> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the method of the .
-
+> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the method of the .
+
]]>
Double Buffered Graphics
@@ -330,11 +330,11 @@
Disposes of the current graphics buffer, if a buffer has been allocated and has not yet been disposed.
-
Double Buffered Graphics
@@ -375,20 +375,20 @@
Gets or sets the maximum size of the buffer to use.
A indicating the maximum size of the buffer dimensions.
- size will be used temporarily and then discarded when the object is released.
-
-
-
-## Examples
- The following example demonstrates setting the maximum size for the buffer for a . This code is part of a larger example provided for the class.
-
+ size will be used temporarily and then discarded when the object is released.
+
+
+
+## Examples
+ The following example demonstrates setting the maximum size for the buffer for a . This code is part of a larger example provided for the class.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/BufferingExamples/CPP/bufferingexamples.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/BufferingExamples/CS/bufferingexamples.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/BufferingExamples/VB/bufferingexamples.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/BufferingExamples/VB/bufferingexamples.vb" id="Snippet2":::
+
]]>
The height or width of the size is less than or equal to zero.
diff --git a/xml/System.Drawing/Font.xml b/xml/System.Drawing/Font.xml
index 78e99650d0e..ba56121bd7f 100644
--- a/xml/System.Drawing/Font.xml
+++ b/xml/System.Drawing/Font.xml
@@ -73,20 +73,20 @@
Defines a particular format for text, including font face, size, and style attributes. This class cannot be inherited.
- constructor and the , , and properties. This example is designed to be used with a Windows Form that contains a named `ComboBox1` that is populated with the strings "Bigger" and "Smaller" and a named `Label1`. Paste the following code into the form and associate the `ComboBox1_SelectedIndexChanged` method with the event of the control.
-
+ constructor and the , , and properties. This example is designed to be used with a Windows Form that contains a named `ComboBox1` that is populated with the strings "Bigger" and "Smaller" and a named `Label1`. Paste the following code into the form and associate the `ComboBox1_SelectedIndexChanged` method with the event of the control.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.FontsExample/cpp/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.FontsExample/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.FontsExample/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.FontsExample/VB/form1.vb" id="Snippet1":::
+
]]>
Using Fonts and Text
@@ -133,20 +133,20 @@
The to apply to the new . Multiple values of the enumeration can be combined with the operator.
Initializes a new that uses the specified existing and enumeration.
- operator, the constructor, and the property. This example is designed to be used with a Windows Form that contains a button named `Button2`. Paste the following code into your form and associate the `Button2_Click` method with the button's event.
-
+ operator, the constructor, and the property. This example is designed to be used with a Windows Form that contains a button named `Button2`. Paste the following code into your form and associate the `Button2_Click` method with the button's event.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.CharacterRangeExample/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.CharacterRangeExample/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.CharacterRangeExample/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.CharacterRangeExample/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -183,11 +183,11 @@
The em-size, in points, of the new font.
Initializes a new using a specified size.
- property set to and its property set to .
-
+ property set to and its property set to .
+
]]>
@@ -226,19 +226,19 @@
The em-size, in points, of the new font.
Initializes a new using a specified size.
- property set to and its property set to . Windows Forms applications support TrueType fonts and have limited support for OpenType fonts. If the `familyName` parameter specifies a font that is not installed on the machine running the application or is not supported, Microsoft Sans Serif will be substituted.
-
-
-
-## Examples
- The following code example demonstrates how to use the constructor. This example is designed to be used with a Windows Form and requires a `e`, which is a parameter of the event.
-
+ property set to and its property set to . Windows Forms applications support TrueType fonts and have limited support for OpenType fonts. If the `familyName` parameter specifies a font that is not installed on the machine running the application or is not supported, Microsoft Sans Serif will be substituted.
+
+
+
+## Examples
+ The following code example demonstrates how to use the constructor. This example is designed to be used with a Windows Form and requires a `e`, which is a parameter of the event.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Misc3/CS/Form1.cs" id="Snippetconstructfontwithstring":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippetconstructfontwithstring":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippetconstructfontwithstring":::
+
]]>
@@ -279,20 +279,20 @@
The of the new font.
Initializes a new using a specified size and style.
- property set to .
-
-
-
-## Examples
- The following code example demonstrates how to set the property of a button to a new, bold-style . This example is designed to be used with a Windows Form that contains a button named `Button1`. Paste the following code into your form and associate the `Button1_Click` method with the button's event.
-
+ property set to .
+
+
+
+## Examples
+ The following code example demonstrates how to set the property of a button to a new, bold-style . This example is designed to be used with a Windows Form that contains a button named `Button1`. Paste the following code into your form and associate the `Button1_Click` method with the button's event.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet11":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet11":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet11":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet11":::
+
]]>
@@ -335,11 +335,11 @@
The of the new font.
Initializes a new using a specified size and unit. Sets the style to .
- property set to .
-
+ property set to .
+
]]>
@@ -382,11 +382,11 @@
The of the new font.
Initializes a new using a specified size and style.
- property set to . Windows Forms applications support TrueType fonts and have limited support for OpenType fonts. If the `familyName` parameter specifies a font that is not installed on the machine running the application or is not supported, Microsoft Sans Serif will be substituted.
-
+ property set to . Windows Forms applications support TrueType fonts and have limited support for OpenType fonts. If the `familyName` parameter specifies a font that is not installed on the machine running the application or is not supported, Microsoft Sans Serif will be substituted.
+
]]>
@@ -427,11 +427,11 @@
The of the new font.
Initializes a new using a specified size and unit. The style is set to .
- property set to .
-
+ property set to .
+
]]>
@@ -516,20 +516,20 @@
The of the new font.
Initializes a new using a specified size, style, and unit.
- constructor. This example is designed to be used with Windows Forms. To run this example, paste this code into a form that contains a button named `Button2`, and associate the `Button2_Click` method with the event of the button.
-
+ constructor. This example is designed to be used with Windows Forms. To run this example, paste this code into a form that contains a button named `Button2`, and associate the `Button2_Click` method with the event of the button.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.FontsExample/cpp/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.FontsExample/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.FontsExample/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.FontsExample/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -571,16 +571,16 @@
The em-size of the new font in the units specified by the parameter.
The of the new font.
The of the new font.
- A that specifies a
-
+ A that specifies a
+
GDI character set to use for the new font.
Initializes a new using a specified size, style, unit, and character set.
-
@@ -627,11 +627,11 @@
A that specifies a GDI character set to use for this font.
Initializes a new using a specified size, style, unit, and character set.
-
@@ -675,17 +675,17 @@
The em-size of the new font in the units specified by the parameter.
The of the new font.
The of the new font.
- A that specifies a
-
+ A that specifies a
+
GDI character set to use for this font.
A Boolean value indicating whether the new font is derived from a GDI vertical font.
Initializes a new using a specified size, style, unit, and character set.
-
@@ -734,11 +734,11 @@
A Boolean value indicating whether the new is derived from a GDI vertical font.
Initializes a new using the specified size, style, unit, and character set.
-
@@ -783,15 +783,15 @@
if this is bold; otherwise, .
- operator, the constructor, and the property. This example is designed to be used with a Windows Form that contains a button named `Button2`. Paste the following code into your form and associate the `Button2_Click` method with the button's event.
-
+ operator, the constructor, and the property. This example is designed to be used with a Windows Form that contains a button named `Button2`. Paste the following code into your form and associate the `Button2_Click` method with the button's event.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.CharacterRangeExample/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.CharacterRangeExample/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.CharacterRangeExample/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.CharacterRangeExample/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -830,15 +830,15 @@
Creates an exact copy of this .
The this method creates, cast as an .
- `e`, which is a parameter of the event handler. The code clones a and draws text with that font.
-
+ `e`, which is a parameter of the event handler. The code clones a and draws text with that font.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -876,16 +876,16 @@
Releases all resources used by this .
- allows the resources used by this to be reallocated for other purposes.
-
- Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
-
+ allows the resources used by this to be reallocated for other purposes.
+
+ Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
+
> [!NOTE]
-> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
-
+> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
+
]]>
@@ -926,15 +926,15 @@
if the parameter is a and has the same , , , , , and property values as this ; otherwise, .
- `e`, which is a parameter of the event handler. The code creates two objects and then tests whether they are equivalent.
-
+ `e`, which is a parameter of the event handler. The code creates two objects and then tests whether they are equivalent.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -1011,11 +1011,11 @@
Gets the associated with this .
The associated with this .
- represents a group of fonts that have a similar font face, but may have different sizes and styles (for example, Arial, Times New Roman, and Verdana).
-
+ represents a group of fonts that have a similar font face, but may have different sizes and styles (for example, Arial, Times New Roman, and Verdana).
+
]]>
@@ -1054,11 +1054,11 @@
Creates a from the specified Windows handle to a device context.
The this method creates.
- object because the `hdc` handle does not have a font selected.
-
+ object because the `hdc` handle does not have a font selected.
+
]]>
The font for the specified device context is not a TrueType font.
@@ -1098,21 +1098,21 @@
Creates a from the specified Windows handle.
The this method creates.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Gets a handle to a GDI font.
-
-- Creates a from that handle.
-
-- Draws text to the screen, using the new .
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Gets a handle to a GDI font.
+
+- Creates a from that handle.
+
+- Draws text to the screen, using the new .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -1162,11 +1162,11 @@
Creates a from the specified GDI logical font (LOGFONT) structure.
The that this method creates.
-
@@ -1207,11 +1207,11 @@
Creates a from the specified GDI logical font (LOGFONT) structure.
The that this method creates.
-
The font is not a TrueType font.
@@ -1257,34 +1257,34 @@
Gets a byte value that specifies the GDI character set that this uses.
A byte value that specifies the GDI character set that this uses. The default is 1.
- constructor. This property takes a value from the list defined in the Windows SDK header file WinGDI.h. The character sets and byte values are listed in the following table.
-
-|Character set|Value|
-|-------------------|-----------|
-|ANSI|0|
-|DEFAULT|1|
-|SYMBOL|2|
-|SHIFTJIS|128|
-|HANGEUL|129|
-|HANGUL|129|
-|GB2312|134|
-|CHINESEBIG5|136|
-|OEM|255|
-|JOHAB|130|
-|HEBREW|177|
-|ARABIC|178|
-|GREEK|161|
-|TURKISH|162|
-|VIETNAMESE|163|
-|THAI|222|
-|EASTEUROPE|238|
-|RUSSIAN|204|
-|MAC|77|
-|BALTIC|186|
-
+ constructor. This property takes a value from the list defined in the Windows SDK header file WinGDI.h. The character sets and byte values are listed in the following table.
+
+|Character set|Value|
+|-------------------|-----------|
+|ANSI|0|
+|DEFAULT|1|
+|SYMBOL|2|
+|SHIFTJIS|128|
+|HANGEUL|129|
+|HANGUL|129|
+|GB2312|134|
+|CHINESEBIG5|136|
+|OEM|255|
+|JOHAB|130|
+|HEBREW|177|
+|ARABIC|178|
+|GREEK|161|
+|TURKISH|162|
+|VIETNAMESE|163|
+|THAI|222|
+|EASTEUROPE|238|
+|RUSSIAN|204|
+|MAC|77|
+|BALTIC|186|
+
]]>
@@ -1330,15 +1330,15 @@
if this is derived from a GDI vertical font; otherwise, .
- only returns `true` if this font was created from a classic GDI
-
- font definition, like a LOGFONT or HFONT.
-
+ only returns `true` if this font was created from a classic GDI
+
+ font definition, like a LOGFONT or HFONT.
+
]]>
@@ -1374,21 +1374,21 @@
Gets the hash code for this .
The hash code for this .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Gets the hash code for that font.
-
-- Displays a message box with the value of the hash code.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Gets the hash code for that font.
+
+- Displays a message box with the value of the hash code.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/CPP/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/CS/form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/VB/form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/VB/form1.vb" id="Snippet4":::
+
]]>
@@ -1433,15 +1433,15 @@
Returns the line spacing, in pixels, of this font.
The line spacing, in pixels, of this font.
- is the vertical distance between the base lines of two consecutive lines of text. Thus, the line spacing includes the blank space between lines along with the height of the character itself.
-
- If the property of the font is set to anything other than , the height (in pixels) is calculated using the vertical resolution of the screen display. For example, suppose the font unit is inches and the font size is 0.3. Also suppose that for the corresponding font family, the em-height is 2048 and the line spacing is 2355. For a screen display that has a vertical resolution of 96 dots per inch, you can calculate the height as follows:
-
- 2355*(0.3/2048)\*96 = 33.11719
-
+ is the vertical distance between the base lines of two consecutive lines of text. Thus, the line spacing includes the blank space between lines along with the height of the character itself.
+
+ If the property of the font is set to anything other than , the height (in pixels) is calculated using the vertical resolution of the screen display. For example, suppose the font unit is inches and the font size is 0.3. Also suppose that for the corresponding font family, the em-height is 2048 and the line spacing is 2355. For a screen display that has a vertical resolution of 96 dots per inch, you can calculate the height as follows:
+
+ 2355*(0.3/2048)\*96 = 33.11719
+
]]>
@@ -1480,36 +1480,36 @@
Returns the line spacing, in the current unit of a specified , of this font.
The line spacing, in pixels, of this font.
- is the vertical distance between the base lines of two consecutive lines of text. Thus, the line spacing includes the blank space between lines along with the height of the character itself.
-
- If the property of the font is set to anything other than , the height, in pixels, is calculated using the vertical resolution of the specified object. For example, suppose the font unit is inches and the font size is 0.3. Also suppose that for the corresponding font family, the em-height is 2048 and the line spacing is 2355. If the object has a property value of and a property value of 96 dots per inch, the height is calculated as follows:
-
- 2355*(0.3/2048)\*96 = 33.1171875
-
- Continuing with the same example, suppose the property of the object is set to rather than . Then (using 1 inch = 25.4 millimeters) the height, in millimeters, is calculated as follows:
-
- 2355*(0.3/2048)25.4 = 8.762256
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Draws a line of text to the screen, using the new .
-
-- Gets the height of the font.
-
-- Draws a second line of text directly below the first line.
-
+ is the vertical distance between the base lines of two consecutive lines of text. Thus, the line spacing includes the blank space between lines along with the height of the character itself.
+
+ If the property of the font is set to anything other than , the height, in pixels, is calculated using the vertical resolution of the specified object. For example, suppose the font unit is inches and the font size is 0.3. Also suppose that for the corresponding font family, the em-height is 2048 and the line spacing is 2355. If the object has a property value of and a property value of 96 dots per inch, the height is calculated as follows:
+
+ 2355*(0.3/2048)\*96 = 33.1171875
+
+ Continuing with the same example, suppose the property of the object is set to rather than . Then (using 1 inch = 25.4 millimeters) the height, in millimeters, is calculated as follows:
+
+ 2355*(0.3/2048)25.4 = 8.762256
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Draws a line of text to the screen, using the new .
+
+- Gets the height of the font.
+
+- Draws a second line of text directly below the first line.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/VB/form1.vb" id="Snippet5":::
+
]]>
@@ -1551,13 +1551,13 @@
Returns the height, in pixels, of this when drawn to a device with the specified vertical resolution.
The height, in pixels, of this .
- property of the font is set to anything other than , the height (in pixels) is calculated using the vertical resolution of the screen display. For example, suppose the font unit is inches and the font size is 0.3. Also suppose that for the corresponding font family, the em-height is 2048 and the line spacing is 2355. If the specified vertical resolution is 96 dots per inch, the height is calculated as follows:
-
- 2355*(0.3/2048)\*96 = 33.1171875
-
+ property of the font is set to anything other than , the height (in pixels) is calculated using the vertical resolution of the screen display. For example, suppose the font unit is inches and the font size is 0.3. Also suppose that for the corresponding font family, the em-height is 2048 and the line spacing is 2355. If the specified vertical resolution is 96 dots per inch, the height is calculated as follows:
+
+ 2355*(0.3/2048)\*96 = 33.1171875
+
]]>
How To: Obtain Font Metrics
@@ -1603,17 +1603,17 @@
Gets the line spacing of this font.
The line spacing, in pixels, of this font.
- property of the font is set to anything other than , the height (in pixels) is calculated using the vertical resolution of the screen display. For example, suppose the font unit is inches and the font size is 0.3. Also suppose that for the corresponding font family, the em-height is 2048 and the line spacing is 2355. For a screen display that has a vertical resolution of 96 dots per inch, you can calculate the height as follows:
-
- 2355*(0.3/2048)\*96 = 33.11719
-
- The value returned by the method would be 33.11719, and the value returned by the property would be 34. The property is the value returned by , rounded up to the nearest integer.
-
+ property of the font is set to anything other than , the height (in pixels) is calculated using the vertical resolution of the screen display. For example, suppose the font unit is inches and the font size is 0.3. Also suppose that for the corresponding font family, the em-height is 2048 and the line spacing is 2355. For a screen display that has a vertical resolution of 96 dots per inch, you can calculate the height as follows:
+
+ 2355*(0.3/2048)\*96 = 33.11719
+
+ The value returned by the method would be 33.11719, and the value returned by the property would be 34. The property is the value returned by , rounded up to the nearest integer.
+
]]>
How To: Obtain Font Metrics
@@ -1655,11 +1655,11 @@
if the font is a member of ; otherwise, . The default is .
- property could return `true`, even if the font is not actually a system font. To avoid this situation, if you are using system fonts in your application, you should track user preference changes by handling the or event.
-
+ property could return `true`, even if the font is not actually a system font. To avoid this situation, if you are using system fonts in your application, you should track user preference changes by handling the or event.
+
]]>
@@ -1760,15 +1760,15 @@
Gets the face name of this .
A string representation of the face name of this .
- constructor and the , , , , and properties. This example is designed to be used with a Windows Form that contains a named `ComboBox1` that is populated with the strings "Bigger" and "Smaller". Paste the following code into the form and associate the `ComboBox1_SelectedIndexChanged` method with the event of the control.
-
+ constructor and the , , , , and properties. This example is designed to be used with a Windows Form that contains a named `ComboBox1` that is populated with the strings "Bigger" and "Smaller". Paste the following code into the form and associate the `ComboBox1_SelectedIndexChanged` method with the event of the control.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.FontsExample/cpp/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.FontsExample/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.FontsExample/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.FontsExample/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -1813,11 +1813,11 @@
Gets the name of the font originally specified.
The string representing the name of the font originally specified.
-
@@ -1858,15 +1858,15 @@
Gets the em-size of this measured in the units specified by the property.
The em-size of this .
- constructor and the , , and properties. This example is designed to be used with a Windows Form that contains a named `ComboBox1` that is populated with the strings "Bigger" and "Smaller". Paste the following code into the form and associate the `ComboBox1_SelectedIndexChanged` method with the event of the control.
-
+ constructor and the , , and properties. This example is designed to be used with a Windows Form that contains a named `ComboBox1` that is populated with the strings "Bigger" and "Smaller". Paste the following code into the form and associate the `ComboBox1_SelectedIndexChanged` method with the event of the control.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.FontsExample/cpp/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.FontsExample/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.FontsExample/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.FontsExample/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -1907,15 +1907,15 @@
Gets the em-size, in points, of this .
The em-size, in points, of this .
- constructor and the , , and properties. This example is designed to be used with a Windows Form that contains a named `ComboBox1` that is populated with the strings "Bigger" and "Smaller". Paste the following code into the form and associate the `ComboBox1_SelectedIndexChanged` method with the event of the control.
-
+ constructor and the , , and properties. This example is designed to be used with a Windows Form that contains a named `ComboBox1` that is populated with the strings "Bigger" and "Smaller". Paste the following code into the form and associate the `ComboBox1_SelectedIndexChanged` method with the event of the control.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.FontsExample/cpp/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.FontsExample/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.FontsExample/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.FontsExample/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -1999,15 +1999,15 @@
Gets style information for this .
A enumeration that contains style information for this .
- property of a button to a new bold font using the enumeration. This example is designed to be used with Windows Forms. Create a form containing a button named `Button1` and paste the following code into it. Associate the `Button1_Click` method with the button's event.
-
+ property of a button to a new bold font using the enumeration. This example is designed to be used with Windows Forms. Create a form containing a button named `Button1` and paste the following code into it. Associate the `Button1_Click` method with the button's event.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet11":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet11":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet11":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet11":::
+
]]>
@@ -2091,11 +2091,11 @@
Gets the name of the system font if the property returns .
The name of the system font, if returns ; otherwise, an empty string ("").
- property will be one of the members of the , converted to a string.
-
+ property will be one of the members of the , converted to a string.
+
]]>
@@ -2131,20 +2131,20 @@
Returns a handle to this .
A Windows handle to this .
- and then gets a handle to that . The example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler.
-
+ and then gets a handle to that . The example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/CPP/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/CS/form1.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/VB/form1.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/VB/form1.vb" id="Snippet6":::
+
]]>
The operation was unsuccessful.
@@ -2192,11 +2192,11 @@
An to represent the structure that this method creates.
Creates a GDI logical font (LOGFONT) structure from this .
-
@@ -2236,11 +2236,11 @@
A that provides additional information for the structure.
Creates a GDI logical font (LOGFONT) structure from this .
-
@@ -2278,28 +2278,28 @@
Returns a human-readable string representation of this .
A string that represents this .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Gets a string that represents the font.
-
-- Displays the string in a message box.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Gets a string that represents the font.
+
+- Displays the string in a message box.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/CPP/form1.cpp" id="Snippet7":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/CS/form1.cs" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/VB/form1.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontsExamples/VB/form1.vb" id="Snippet7":::
+
]]>
@@ -2383,15 +2383,15 @@
Gets the unit of measure for this .
A that represents the unit of measure for this .
- constructor and the , , and properties. This example is designed to be used with a Windows Form that contains a named `ComboBox1` that is populated with the strings "Bigger" and "Smaller". Paste the following code into the form and associate the `ComboBox1_SelectedIndexChanged` method with the event of the control.
-
+ constructor and the , , and properties. This example is designed to be used with a Windows Form that contains a named `ComboBox1` that is populated with the strings "Bigger" and "Smaller". Paste the following code into the form and associate the `ComboBox1_SelectedIndexChanged` method with the event of the control.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.FontsExample/cpp/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.FontsExample/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.FontsExample/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.FontsExample/VB/form1.vb" id="Snippet1":::
+
]]>
diff --git a/xml/System.Drawing/FontConverter.xml b/xml/System.Drawing/FontConverter.xml
index 198a0065cc5..3828aee911a 100644
--- a/xml/System.Drawing/FontConverter.xml
+++ b/xml/System.Drawing/FontConverter.xml
@@ -33,20 +33,20 @@
Converts objects from one data type to another.
- class through the class by calling the method.
-
-
-
-## Examples
- The following code example demonstrates how to use the to convert a to and from a string. This example is designed to be used with Windows Forms. Paste this code into a form and call the `ShowFontStringConversion` method when handling the form's event, passing e as .
-
+ class through the class by calling the method.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+## Examples
+ The following code example demonstrates how to use the to convert a to and from a string. This example is designed to be used with Windows Forms. Paste this code into a form and call the `ShowFontStringConversion` method when handling the form's event, passing e as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Converters/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Converters/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Converters/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Converters/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -86,11 +86,11 @@
Initializes a new object.
- object through the method.
-
+ object through the method.
+
]]>
@@ -175,11 +175,11 @@
Gets a value indicating whether this converter can convert an object to the given destination type using the context.
This method returns if this converter can perform the conversion; otherwise, .
-
@@ -271,11 +271,11 @@
Converts the specified object to another type.
The converted object.
- method of the object if the object is valid and if the destination type is string.
-
+ method of the object if the object is valid and if the destination type is string.
+
]]>
The conversion was not successful.
@@ -318,8 +318,8 @@
A type descriptor through which additional context can be provided.
A dictionary of new property values. The dictionary contains a series of name-value pairs, one for each property returned from the method.
Creates an object of this type by using a specified set of property values for the object.
- The newly created object, or if the object could not be created. The default implementation returns .
-
+ The newly created object, or if the object could not be created. The default implementation returns .
+
useful for creating non-changeable objects that have changeable properties.
To be added.
@@ -431,8 +431,8 @@
The value of the object to get the properties for.
An array of objects that describe the properties.
Retrieves the set of properties for this type. By default, a type does not have any properties to return.
- The set of properties that should be exposed for this data type. If no properties should be exposed, this may return . The default implementation always returns .
-
+ The set of properties that should be exposed for this data type. If no properties should be exposed, this may return . The default implementation always returns .
+
An easy implementation of this method can call the method for the correct data type.
To be added.
diff --git a/xml/System.Drawing/FontFamily.xml b/xml/System.Drawing/FontFamily.xml
index 63c4799412d..da2eb03e5e0 100644
--- a/xml/System.Drawing/FontFamily.xml
+++ b/xml/System.Drawing/FontFamily.xml
@@ -31,15 +31,19 @@
Defines a group of type faces having a similar basic design and certain variations in styles. This class cannot be inherited.
- property of the class. This example is designed to be used with a Windows Form. To run this example, add a named `listBox1` to a form and call the `PopulateListBoxWithFonts` method from the form's constructor.
-
+ property of the class. This example is designed to be used with a Windows Form. To run this example, add a named `listBox1` to a form and call the `PopulateListBoxWithFonts` method from the form's constructor.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet1":::
+
]]>
Using Fonts and Text
@@ -116,22 +120,22 @@
The name of the new .
Initializes a new with the specified name.
-
- is an empty string ("").
-
- -or-
-
- specifies a font that is not installed on the computer running the application.
-
- -or-
-
+ is an empty string ("").
+
+ -or-
+
+ specifies a font that is not installed on the computer running the application.
+
+ -or-
+
specifies a font that is not a TrueType font.
@@ -169,14 +173,14 @@
Initializes a new in the specified with the specified name.
To be added.
- is an empty string ("").
-
- -or-
-
- specifies a font that is not installed on the computer running the application.
-
- -or-
-
+ is an empty string ("").
+
+ -or-
+
+ specifies a font that is not installed on the computer running the application.
+
+ -or-
+
specifies a font that is not a TrueType font.
@@ -213,16 +217,16 @@
Releases all resources used by this .
- allows the resources used by this to be reallocated for other purposes.
-
- Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
-
+ allows the resources used by this to be reallocated for other purposes.
+
+ Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
+
> [!NOTE]
-> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
-
+> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
+
]]>
@@ -263,21 +267,21 @@
if is a and is identical to this ; otherwise, .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates two objects.
-
-- Tests whether they are equivalent.
-
-- Displays the result of the test in a message box.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates two objects.
+
+- Tests whether they are equivalent.
+
+- Displays the result of the test in a message box.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -312,15 +316,15 @@
Returns an array that contains all the objects associated with the current graphics context.
An array of objects associated with the current graphics context.
- property of the class. This example is designed to be used with a Windows Form. To run this example, add a named `listBox1` to a form and call the `PopulateListBoxWithFonts` method from the form's constructor.
-
+ property of the class. This example is designed to be used with a Windows Form. To run this example, add a named `listBox1` to a form and call the `PopulateListBoxWithFonts` method from the form's constructor.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -487,21 +491,21 @@
Returns the cell ascent, in design units, of the of the specified style.
The cell ascent for this that uses the specified .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Gets the cell ascent for that font family.
-
-- Draws the value of the cell ascent to the screen as text.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Gets the cell ascent for that font family.
+
+- Draws the value of the cell ascent to the screen as text.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet2":::
+
]]>
How To: Obtain Font Metrics
@@ -541,21 +545,21 @@
Returns the cell descent, in design units, of the of the specified style.
The cell descent metric for this that uses the specified .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Gets the cell descent for that font family.
-
-- Draws the value of the cell descent to the screen as text.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Gets the cell descent for that font family.
+
+- Draws the value of the cell descent to the screen as text.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet3":::
+
]]>
How To: Obtain Font Metrics
@@ -595,26 +599,26 @@
Gets the height, in font design units, of the em square for the specified style.
The height of the em square.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Gets the em square height for that font family.
-
-- Draws the value of the em height to the screen as text.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Gets the em square height for that font family.
+
+- Draws the value of the em height to the screen as text.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CPP/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CS/form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet4":::
+
]]>
How To: Obtain Font Metrics
@@ -695,21 +699,21 @@
Gets a hash code for this .
The hash code for this .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Gets the hash code for the font family.
-
-- Draws the value of the hash code to the screen as text.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Gets the hash code for the font family.
+
+- Draws the value of the hash code to the screen as text.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CPP/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CS/form1.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet6":::
+
]]>
@@ -748,21 +752,21 @@
Returns the line spacing, in design units, of the of the specified style. The line spacing is the vertical distance between the base lines of two consecutive lines of text.
The distance between two consecutive lines of text.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Gets the line spacing for the font family.
-
-- Draws the value of the line spacing to the screen as text.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Gets the line spacing for the font family.
+
+- Draws the value of the line spacing to the screen as text.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CPP/form1.cpp" id="Snippet7":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CS/form1.cs" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet7":::
+
]]>
How To: Obtain Font Metrics
@@ -802,26 +806,26 @@
Returns the name, in the specified language, of this .
A that represents the name, in the specified language, of this .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Gets the name of the font family.
-
-- Draws the name of the font family to the screen as text.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Gets the name of the font family.
+
+- Draws the name of the font family to the screen as text.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CPP/form1.cpp" id="Snippet8":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CS/form1.cs" id="Snippet8":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet8":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet8":::
+
]]>
@@ -861,21 +865,21 @@
if the specified is available; otherwise, .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Tests whether the font family is available in an italic font.
-
-- If it is, draws text to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Tests whether the font family is available in an italic font.
+
+- If it is, draws text to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CPP/form1.cpp" id="Snippet9":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CS/form1.cs" id="Snippet9":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet9":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet9":::
+
]]>
@@ -910,15 +914,15 @@
Gets the name of this .
A that represents the name of this .
- property of the class. This example is designed to be used with a Windows Form. To run this example, add a named `listBox1` to a form, and call the `PopulateListBoxWithFonts` method from the form's constructor.
-
+ property of the class. This example is designed to be used with a Windows Form. To run this example, add a named `listBox1` to a form, and call the `PopulateListBoxWithFonts` method from the form's constructor.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -954,15 +958,15 @@
Converts this to a human-readable string representation.
The string that represents this .
- `e`, which is a parameter of the event handler. The code creates a and draws a string representation of the font family to the screen.
-
+ `e`, which is a parameter of the event handler. The code creates a and draws a string representation of the font family to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CPP/form1.cpp" id="Snippet10":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/CS/form1.cs" id="Snippet10":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet10":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicFontFamilyExamples/VB/form1.vb" id="Snippet10":::
+
]]>
diff --git a/xml/System.Drawing/Graphics.xml b/xml/System.Drawing/Graphics.xml
index 0335dc33301..ce2f972bab8 100644
--- a/xml/System.Drawing/Graphics.xml
+++ b/xml/System.Drawing/Graphics.xml
@@ -46,34 +46,34 @@
Encapsulates a GDI+ drawing surface. This class cannot be inherited.
- class provides methods for drawing objects to the display device. A is associated with a specific device context.
-
- You can obtain a object by calling the method on an object that inherits from , or by handling a control's event and accessing the property of the class. You can also create a object from an image by using the method. For more information about creating a object, see [How to: Create Graphics Objects for Drawing](/dotnet/framework/winforms/advanced/how-to-create-graphics-objects-for-drawing).
-
- You can draw many different shapes and lines by using a object. For more information about how to draw lines and shapes, see the specific `Draw`*GraphicalElement* method for the line or shape you want to draw. These methods include , , , , and . For more information about how to draw lines and shapes, see [Using a Pen to Draw Lines and Shapes](/dotnet/framework/winforms/advanced/using-a-pen-to-draw-lines-and-shapes) and [Using a Brush to Fill Shapes](/dotnet/framework/winforms/advanced/using-a-brush-to-fill-shapes).
-
- You can also draw images and icons by using the and methods, respectively. To perform a bit-block transfer of color data from the screen to the drawing surface of the object, see . For more information about how to draw images with a object, see [Working with Images, Bitmaps, Icons, and Metafiles](/dotnet/framework/winforms/advanced/working-with-images-bitmaps-icons-and-metafiles).
-
- In addition, you can manipulate the coordinate system used by the object. For more information on the coordinate system and how to manipulate it, see [Coordinate Systems and Transformations](/dotnet/framework/winforms/advanced/coordinate-systems-and-transformations).
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms and requires a object. The object is named `e` and is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file. The file is named SampImag.jpg and is located in the folder of the example.
-
-- Creates a point at which to draw the upper-left corner of the image.
-
-- Draws the unscaled image to the screen by using a object.
-
+ class provides methods for drawing objects to the display device. A is associated with a specific device context.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+ You can obtain a object by calling the method on an object that inherits from , or by handling a control's event and accessing the property of the class. You can also create a object from an image by using the method. For more information about creating a object, see [How to: Create Graphics Objects for Drawing](/dotnet/framework/winforms/advanced/how-to-create-graphics-objects-for-drawing).
+
+ You can draw many different shapes and lines by using a object. For more information about how to draw lines and shapes, see the specific `Draw`*GraphicalElement* method for the line or shape you want to draw. These methods include , , , , and . For more information about how to draw lines and shapes, see [Using a Pen to Draw Lines and Shapes](/dotnet/framework/winforms/advanced/using-a-pen-to-draw-lines-and-shapes) and [Using a Brush to Fill Shapes](/dotnet/framework/winforms/advanced/using-a-brush-to-fill-shapes).
+
+ You can also draw images and icons by using the and methods, respectively. To perform a bit-block transfer of color data from the screen to the drawing surface of the object, see . For more information about how to draw images with a object, see [Working with Images, Bitmaps, Icons, and Metafiles](/dotnet/desktop/winforms/advanced/images-bitmaps-and-metafiles).
+
+ In addition, you can manipulate the coordinate system used by the object. For more information on the coordinate system and how to manipulate it, see [Coordinate Systems and Transformations](/dotnet/framework/winforms/advanced/coordinate-systems-and-transformations).
+
+## Examples
+ The following code example is designed for use with Windows Forms and requires a object. The object is named `e` and is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file. The file is named SampImag.jpg and is located in the folder of the example.
+
+- Creates a point at which to draw the upper-left corner of the image.
+
+- Draws the unscaled image to the screen by using a object.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet40":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet40":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet40":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet40":::
+
]]>
How to: Create Graphics Objects for Drawing
@@ -114,44 +114,44 @@
Array of bytes that contains the comment.
Adds a comment to the current .
- is associated with a .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler, as well as `thisForm`, the for the example. The code performs the following actions:
-
-- Creates a temporary for creating the metafile and gets an `hdc`, a handle to its device context.
-
-- Creates a new metafile using the `hdc`.
-
-- Creates a for display of the metafile from the .
-
-- Draws a rectangle to the metafile.
-
-- Adds a comment to the metafile.
-
-- Disposes the for the metafile-which closes the metafile.
-
-- Disposes the metafile.
-
-- Releases the temporary `hdc`.
-
-- Disposes the temporary .
-
-- Creates a second metafile from the previously created file.
-
-- Draws the metafile to the screen.
-
-- Disposes the metafile.
-
+ is associated with a .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler, as well as `thisForm`, the for the example. The code performs the following actions:
+
+- Creates a temporary for creating the metafile and gets an `hdc`, a handle to its device context.
+
+- Creates a new metafile using the `hdc`.
+
+- Creates a for display of the metafile from the .
+
+- Draws a rectangle to the metafile.
+
+- Adds a comment to the metafile.
+
+- Disposes the for the metafile-which closes the metafile.
+
+- Disposes the metafile.
+
+- Releases the temporary `hdc`.
+
+- Disposes the temporary .
+
+- Creates a second metafile from the previously created file.
+
+- Draws the metafile to the screen.
+
+- Disposes the metafile.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -196,42 +196,42 @@
Saves a graphics container with the current state of this and opens and uses a new graphics container.
This method returns a that represents the state of this at the time of the method call.
- method to create nested graphics containers. Graphics containers retain graphics state, such as transformation, clipping region, and rendering properties.
-
- When you call the method of a , an information block that holds the state of the is put on a stack. The method returns a that identifies that information block. When you pass the identifying object to the method, the information block is removed from the stack and is used to restore the to the state it was in at the time of the method call.
-
- Containers can be nested; that is, you can call the method several times before you call the method. Each time you call the method, an information block is put on the stack, and you receive a for the information block. When you pass one of those objects to the method, the is returned to the state it was in at the time of the method call that returned that particular . The information block placed on the stack by that method call is removed from the stack, and all information blocks placed on that stack after that method call are also removed.
-
- Calls to the method place information blocks on the same stack as calls to the method. Just as an method call is paired with a method call, a method call is paired with a method call.
-
- When you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack. Likewise, when you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack.
-
- The graphics state established by the method includes the rendering qualities of the default graphics state; any rendering-quality state changes existing when the method is called are reset to the default values.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Opens a new graphics container and saves the old container.
-
-- Translates the world coordinates in the container.
-
-- Fills a red rectangle in the (translated coordinates of the) new container.
-
-- Closes the new container and restores the saved container.
-
-- Fills a green rectangle (to the untranslated coordinates) of the saved container.
-
- The result is a green rectangle that overlies a red rectangle of the same size.
-
+ method to create nested graphics containers. Graphics containers retain graphics state, such as transformation, clipping region, and rendering properties.
+
+ When you call the method of a , an information block that holds the state of the is put on a stack. The method returns a that identifies that information block. When you pass the identifying object to the method, the information block is removed from the stack and is used to restore the to the state it was in at the time of the method call.
+
+ Containers can be nested; that is, you can call the method several times before you call the method. Each time you call the method, an information block is put on the stack, and you receive a for the information block. When you pass one of those objects to the method, the is returned to the state it was in at the time of the method call that returned that particular . The information block placed on the stack by that method call is removed from the stack, and all information blocks placed on that stack after that method call are also removed.
+
+ Calls to the method place information blocks on the same stack as calls to the method. Just as an method call is paired with a method call, a method call is paired with a method call.
+
+ When you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack. Likewise, when you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack.
+
+ The graphics state established by the method includes the rendering qualities of the default graphics state; any rendering-quality state changes existing when the method is called are reset to the default values.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Opens a new graphics container and saves the old container.
+
+- Translates the world coordinates in the container.
+
+- Fills a red rectangle in the (translated coordinates of the) new container.
+
+- Closes the new container and restores the saved container.
+
+- Fills a green rectangle (to the untranslated coordinates) of the saved container.
+
+ The result is a green rectangle that overlies a red rectangle of the same size.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -276,44 +276,44 @@
Saves a graphics container with the current state of this and opens and uses a new graphics container with the specified scale transformation.
This method returns a that represents the state of this at the time of the method call.
- method to create nested graphics containers. Graphics containers retain graphics state, such as transformation, clipping region, and rendering properties.
-
- When you call the method of a , an information block that holds the state of the is put on a stack. The method returns a that identifies that information block. When you pass the identifying object to the method, the information block is removed from the stack and is used to restore the to the state it was in at the time of the method call.
-
- Containers can be nested; that is, you can call the method several times before you call the method. Each time you call the method, an information block is put on the stack, and you receive a for the information block. When you pass one of those objects to the method, the is returned to the state it was in at the time of the method call that returned that particular . The information block placed on the stack by that method call is removed from the stack, and all information blocks placed on that stack after that method call are also removed.
-
- Calls to the method place information blocks on the same stack as calls to the method. Just as an method call is paired with a method call, a method call is paired with a method call.
-
- When you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack. Likewise, when you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack.
-
- This method specifies a scale transformation for the new graphics container with the `dstrect` and `srcrect` parameters. The scale is equal to the transformation that, when applied to `srcrect`, results in `dstrect`.
-
- The graphics state established by the method includes the rendering qualities of the default graphics state; any rendering-quality state changes existing when the method is called are reset to the default values.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates two rectangles to specify a scale transformation for the new container.
-
-- Opens the new graphics container and saves the old container.
-
-- Fills a red rectangle in the (scaled coordinates of the) new container.
-
-- Closes the new container and restores the saved container.
-
-- Fills a green rectangle (to the unscaled coordinates) of the saved container.
-
- The result is a green rectangle that overlies a smaller red rectangle.
-
+ method to create nested graphics containers. Graphics containers retain graphics state, such as transformation, clipping region, and rendering properties.
+
+ When you call the method of a , an information block that holds the state of the is put on a stack. The method returns a that identifies that information block. When you pass the identifying object to the method, the information block is removed from the stack and is used to restore the to the state it was in at the time of the method call.
+
+ Containers can be nested; that is, you can call the method several times before you call the method. Each time you call the method, an information block is put on the stack, and you receive a for the information block. When you pass one of those objects to the method, the is returned to the state it was in at the time of the method call that returned that particular . The information block placed on the stack by that method call is removed from the stack, and all information blocks placed on that stack after that method call are also removed.
+
+ Calls to the method place information blocks on the same stack as calls to the method. Just as an method call is paired with a method call, a method call is paired with a method call.
+
+ When you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack. Likewise, when you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack.
+
+ This method specifies a scale transformation for the new graphics container with the `dstrect` and `srcrect` parameters. The scale is equal to the transformation that, when applied to `srcrect`, results in `dstrect`.
+
+ The graphics state established by the method includes the rendering qualities of the default graphics state; any rendering-quality state changes existing when the method is called are reset to the default values.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates two rectangles to specify a scale transformation for the new container.
+
+- Opens the new graphics container and saves the old container.
+
+- Fills a red rectangle in the (scaled coordinates of the) new container.
+
+- Closes the new container and restores the saved container.
+
+- Fills a green rectangle (to the unscaled coordinates) of the saved container.
+
+ The result is a green rectangle that overlies a smaller red rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -358,44 +358,44 @@
Saves a graphics container with the current state of this and opens and uses a new graphics container with the specified scale transformation.
This method returns a that represents the state of this at the time of the method call.
- method to create nested graphics containers. Graphics containers retain graphics state, such as transformation, clipping region, and rendering properties.
-
- When you call the method of a , an information block that holds the state of the is put on a stack. The method returns a that identifies that information block. When you pass the identifying object to the method, the information block is removed from the stack and is used to restore the to the state it was in at the time of the method call.
-
- Containers can be nested; that is, you can call the method several times before you call the method. Each time you call the method, an information block is put on the stack, and you receive a for the information block. When you pass one of those objects to the method, the is returned to the state it was in at the time of the method call that returned that particular . The information block placed on the stack by that method call is removed from the stack, and all information blocks placed on that stack after that method call are also removed.
-
- Calls to the method place information blocks on the same stack as calls to the method. Just as an method call is paired with a method call, a method call is paired with a method call.
-
- When you call the method, all information blocks placed on the stack (by the `Save` method or by the method) after the corresponding call to the method are removed from the stack. Likewise, when you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack.
-
- This method specifies a scale transformation for the new graphics container with the `dstrect` and `srcrect` parameters. The scale is equal to the transformation that, when applied to `srcrect`, results in `dstrect`.
-
- The graphics state established by the method includes the rendering qualities of the default graphics state; any rendering-quality state changes existing when the method is called are reset to the default values.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates two rectangles to specify a scale transformation for the new container.
-
-- Opens the new graphics container and saves the old container.
-
-- Fills a red rectangle in the (scaled coordinates of the) new container.
-
-- Closes the new container and restores the saved container.
-
-- Fills a green rectangle (to the unscaled coordinates) of the saved container.
-
- The result is a green rectangle that overlies a smaller red rectangle.
-
+ method to create nested graphics containers. Graphics containers retain graphics state, such as transformation, clipping region, and rendering properties.
+
+ When you call the method of a , an information block that holds the state of the is put on a stack. The method returns a that identifies that information block. When you pass the identifying object to the method, the information block is removed from the stack and is used to restore the to the state it was in at the time of the method call.
+
+ Containers can be nested; that is, you can call the method several times before you call the method. Each time you call the method, an information block is put on the stack, and you receive a for the information block. When you pass one of those objects to the method, the is returned to the state it was in at the time of the method call that returned that particular . The information block placed on the stack by that method call is removed from the stack, and all information blocks placed on that stack after that method call are also removed.
+
+ Calls to the method place information blocks on the same stack as calls to the method. Just as an method call is paired with a method call, a method call is paired with a method call.
+
+ When you call the method, all information blocks placed on the stack (by the `Save` method or by the method) after the corresponding call to the method are removed from the stack. Likewise, when you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack.
+
+ This method specifies a scale transformation for the new graphics container with the `dstrect` and `srcrect` parameters. The scale is equal to the transformation that, when applied to `srcrect`, results in `dstrect`.
+
+ The graphics state established by the method includes the rendering qualities of the default graphics state; any rendering-quality state changes existing when the method is called are reset to the default values.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates two rectangles to specify a scale transformation for the new container.
+
+- Opens the new graphics container and saves the old container.
+
+- Fills a red rectangle in the (scaled coordinates of the) new container.
+
+- Closes the new container and restores the saved container.
+
+- Fills a green rectangle (to the unscaled coordinates) of the saved container.
+
+ The result is a green rectangle that overlies a smaller red rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet4":::
+
]]>
@@ -434,20 +434,20 @@
structure that represents the background color of the drawing surface.
Clears the entire drawing surface and fills it with the specified background color.
- method clears the state of the graphics object and should not be called when the graphics object cannot be updated. For example, if the method is called on a secure desktop in a terminal server session, an may occur, leaving the object in an inconsistent state.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code clears the drawing surface of the and sets the background color to the system-defined teal color.
-
+ method clears the state of the graphics object and should not be called when the graphics object cannot be updated. For example, if the method is called on a secure desktop in a terminal server session, an may occur, leaving the object in an inconsistent state.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code clears the drawing surface of the and sets the background color to the system-defined teal color.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet5":::
+
]]>
@@ -488,20 +488,20 @@
Gets or sets a that limits the drawing region of this .
A that limits the portion of this that is currently available for drawing.
- object returned by the property does not affect subsequent drawing with the object. To change the clip region, replace the property value with a new object. To determine whether the clipping region is infinite, retrieve the property and call its method.
-
-
-
-## Examples
- The following code example demonstrates the use of the property. This example is designed to be used with Windows Forms. Paste the code into a form and call the `SetAndFillClip` method when handling the form's event, passing `e` as .
-
+ object returned by the property does not affect subsequent drawing with the object. To change the clip region, replace the property value with a new object. To determine whether the clipping region is infinite, retrieve the property and call its method.
+
+
+
+## Examples
+ The following code example demonstrates the use of the property. This example is designed to be used with Windows Forms. Paste the code into a form and call the `SetAndFillClip` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/CPP/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/CS/form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/VB/form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/VB/form1.vb" id="Snippet4":::
+
]]>
@@ -536,13 +536,13 @@
Gets a structure that bounds the clipping region of this .
A structure that represents a bounding rectangle for the clipping region of this .
- property. The default unit is pixels. A is typically associated with a control and the origin of the rectangle will be relative to the client area of that control.
-
- If the clipping region is infinite, the property returns a meaningless large rectangle. To determine whether the clipping region is infinite, retrieve the property and call its method.
-
+ property. The default unit is pixels. A is typically associated with a control and the origin of the rectangle will be relative to the client area of that control.
+
+ If the clipping region is infinite, the property returns a meaningless large rectangle. To determine whether the clipping region is infinite, retrieve the property and call its method.
+
]]>
@@ -577,14 +577,14 @@
Gets a value that specifies how composited images are drawn to this .
This property specifies a member of the enumeration. The default is .
- [!NOTE]
-> You should not use a property value of when the property is set to . An exception could occur or the image may not render correctly.
-
+> You should not use a property value of when the property is set to . An exception could occur or the image may not render correctly.
+
]]>
@@ -619,11 +619,11 @@
Gets or sets the rendering quality of composited images drawn to this .
This property specifies a member of the enumeration. The default is .
-
@@ -673,19 +673,19 @@
The size of the area to be transferred.
Performs a bit-block transfer of color data, corresponding to a rectangle of pixels, from the screen to the drawing surface of the .
- methods are useful for layering one image on top of another. To specify how the source and destination colors are blended, use one of the methods that takes a parameter.
-
-
-
-## Examples
- The following example demonstrates how to use the method. To run this example, paste it into a Windows Form. Handle the form's event and call the `CopyPixels1` method from the event-handling method, passing `e` as .
-
+ methods are useful for layering one image on top of another. To specify how the source and destination colors are blended, use one of the methods that takes a parameter.
+
+
+
+## Examples
+ The following example demonstrates how to use the method. To run this example, paste it into a Windows Form. Handle the form's event and call the `CopyPixels1` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet4":::
+
]]>
The operation failed.
@@ -731,19 +731,19 @@
One of the values.
Performs a bit-block transfer of color data, corresponding to a rectangle of pixels, from the screen to the drawing surface of the .
- methods are useful for layering one image on top of another. The `copyPixelOperation` parameter allows you to specify if and how the source colors should be blended with the colors in the destination area.
-
-
-
-## Examples
- The following example demonstrates how to use the method. To run this example, paste it into a Windows Form. Handle the form's event and call the `CopyPixels2` method from the event-handling method, passing `e` as .
-
+ methods are useful for layering one image on top of another. The `copyPixelOperation` parameter allows you to specify if and how the source colors should be blended with the colors in the destination area.
+
+
+
+## Examples
+ The following example demonstrates how to use the method. To run this example, paste it into a Windows Form. Handle the form's event and call the `CopyPixels2` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet5":::
+
]]>
@@ -799,19 +799,19 @@
The size of the area to be transferred.
Performs a bit-block transfer of the color data, corresponding to a rectangle of pixels, from the screen to the drawing surface of the .
- methods are useful for layering one image on top of another. To specify how the source and destination colors are blended, use one of the methods that takes a parameter.
-
-
-
-## Examples
- The following code example demonstrates how to use the for printing a copy of the current form.
-
+ methods are useful for layering one image on top of another. To specify how the source and destination colors are blended, use one of the methods that takes a parameter.
+
+
+
+## Examples
+ The following code example demonstrates how to use the for printing a copy of the current form.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Graphics.CopyFromScreen/CS/Form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Graphics.CopyFromScreen/VB/Form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Graphics.CopyFromScreen/VB/Form1.vb" id="Snippet1":::
+
]]>
The operation failed.
@@ -861,19 +861,19 @@
One of the values.
Performs a bit-block transfer of the color data, corresponding to a rectangle of pixels, from the screen to the drawing surface of the .
- methods are useful for layering one image on top of another. The `copyPixelOperation` parameter allows you to specify if and how the source colors should be blended with the colors in the destination area.
-
-
-
-## Examples
- The following example demonstrates how to use the method. To run this example, paste it into a Windows Form. Handle the form's event and call the `CopyPixels4` method from the event-handling method, passing `e` as .
-
+ methods are useful for layering one image on top of another. The `copyPixelOperation` parameter allows you to specify if and how the source colors should be blended with the colors in the destination area.
+
+
+
+## Examples
+ The following example demonstrates how to use the method. To run this example, paste it into a Windows Form. Handle the form's event and call the `CopyPixels4` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet7":::
+
]]>
@@ -916,30 +916,30 @@
Releases all resources used by this .
- allows the resources used by this to be reallocated for other purposes.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an from a graphics file SampImag.jpg in the example directory.
-
-- Creates a from the .
-
-- Alters the image by filling a rectangle within it.
-
-- Draws the to the screen.
-
-- Releases the created .
-
+ allows the resources used by this to be reallocated for other purposes.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an from a graphics file SampImag.jpg in the example directory.
+
+- Creates a from the .
+
+- Alters the image by filling a rectangle within it.
+
+- Draws the to the screen.
+
+- Releases the created .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet6":::
+
]]>
@@ -974,22 +974,22 @@
Gets the horizontal resolution of this .
The value, in dots per inch, for the horizontal resolution supported by this .
- and properties. This example is designed for use with a Windows Form. To run this example, paste it into a form that contains a named listBox1 and call this method from the form's constructor.
-
+ and properties. This example is designed for use with a Windows Form. To run this example, paste it into a form that contains a named listBox1 and call this method from the form's constructor.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet4":::
+
]]>
High DPI
@@ -1025,22 +1025,22 @@
Gets the vertical resolution of this .
The value, in dots per inch, for the vertical resolution supported by this .
- and properties. This example is designed for use with a Windows Form. To run this example, paste it into a form that contains a named listBox1 and call this method from the form's constructor.
-
+ and properties. This example is designed for use with a Windows Form. To run this example, paste it into a form that contains a named listBox1 and call this method from the form's constructor.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet4":::
+
]]>
High DPI
@@ -1096,30 +1096,30 @@
Angle in degrees measured clockwise from the parameter to ending point of the arc.
Draws an arc representing a portion of an ellipse specified by a structure.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates a rectangle to bound an ellipse.
-
-- Defines the start (45 degrees) and sweep (270 degrees) angles.
-
-- Draws the elliptical arc to the screen.
-
- The result is a partial ellipse missing a segment between + and - 45 degrees of the x axis.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates a rectangle to bound an ellipse.
+
+- Defines the start (45 degrees) and sweep (270 degrees) angles.
+
+- Draws the elliptical arc to the screen.
+
+ The result is a partial ellipse missing a segment between + and - 45 degrees of the x axis.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet7":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet7":::
+
]]>
@@ -1167,30 +1167,30 @@
Angle in degrees measured clockwise from the parameter to ending point of the arc.
Draws an arc representing a portion of an ellipse specified by a structure.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates a rectangle to bound an ellipse.
-
-- Defines the start (45 degrees) and sweep (270 degrees) angles.
-
-- Draws the elliptical arc to the screen.
-
- The result is a partial ellipse missing a segment between + and - 45 degrees of the x axis.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates a rectangle to bound an ellipse.
+
+- Defines the start (45 degrees) and sweep (270 degrees) angles.
+
+- Draws the elliptical arc to the screen.
+
+ The result is a partial ellipse missing a segment between + and - 45 degrees of the x axis.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet8":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet8":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet8":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet8":::
+
]]>
@@ -1243,30 +1243,30 @@
Angle in degrees measured clockwise from the parameter to ending point of the arc.
Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates the position and size of a rectangle to bound an ellipse.
-
-- Defines the start (45 degrees) and sweep (270 degrees) angles.
-
-- Draws the elliptical arc to the screen.
-
- The result is a partial ellipse missing a segment between + and - 45 degrees of the x axis.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates the position and size of a rectangle to bound an ellipse.
+
+- Defines the start (45 degrees) and sweep (270 degrees) angles.
+
+- Draws the elliptical arc to the screen.
+
+ The result is a partial ellipse missing a segment between + and - 45 degrees of the x axis.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet9":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet9":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet9":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet9":::
+
]]>
@@ -1319,30 +1319,30 @@
Angle in degrees measured clockwise from the parameter to ending point of the arc.
Draws an arc representing a portion of an ellipse specified by a pair of coordinates, a width, and a height.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates the position and size of a rectangle to bound an ellipse.
-
-- Defines the start (45 degrees) and sweep (270 degrees) angles.
-
-- Draws the elliptical arc to the screen.
-
- The result is a partial ellipse missing a segment between + and - 45 degrees of the x axis.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates the position and size of a rectangle to bound an ellipse.
+
+- Defines the start (45 degrees) and sweep (270 degrees) angles.
+
+- Draws the elliptical arc to the screen.
+
+ The result is a partial ellipse missing a segment between + and - 45 degrees of the x axis.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet10":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet10":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet10":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet10":::
+
]]>
@@ -1404,26 +1404,26 @@
structure that represents the ending point of the curve.
Draws a Bézier spline defined by four structures.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates the start, end, and two control points for the curve.
-
-- Draws the Bézier curve to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates the start, end, and two control points for the curve.
+
+- Draws the Bézier curve to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet11":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet11":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet11":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet11":::
+
]]>
@@ -1476,26 +1476,26 @@
structure that represents the ending point of the curve.
Draws a Bézier spline defined by four structures.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates the start, end, and two control points for the curve.
-
-- Draws the Bézier curve to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates the start, end, and two control points for the curve.
+
+- Draws the Bézier curve to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet12":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet12":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet12":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet12":::
+
]]>
@@ -1552,26 +1552,26 @@
The y-coordinate of the ending point of the curve.
Draws a Bézier spline defined by four ordered pairs of coordinates that represent points.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates the coordinates of the start, end, and two control points for the curve.
-
-- Draws the Bézier curve to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates the coordinates of the start, end, and two control points for the curve.
+
+- Draws the Bézier curve to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet13":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet13":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet13":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet13":::
+
]]>
@@ -1623,33 +1623,33 @@
Array of structures that represent the points that determine the curve. The number of points in the array should be a multiple of 3 plus 1, such as 4, 7, or 10.
Draws a series of Bézier splines from an array of structures.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates the start, end, and two control points for a first curve and endpoint and two control points for a second curve.
-
-- Draws the successive Bézier curves to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates the start, end, and two control points for a first curve and endpoint and two control points for a second curve.
+
+- Draws the successive Bézier curves to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet14":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet14":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet14":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet14":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -1689,33 +1689,33 @@
Array of structures that represent the points that determine the curve. The number of points in the array should be a multiple of 3 plus 1, such as 4, 7, or 10.
Draws a series of Bézier splines from an array of structures.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates the start, end, and two control points for a first curve and endpoint and two control points for a second curve.
-
-- Draws the successive Bézier curves to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates the start, end, and two control points for a first curve and endpoint and two control points for a second curve.
+
+- Draws the successive Bézier curves to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet15":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet15":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet15":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet15":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -1764,41 +1764,41 @@
Array of structures that define the spline.
Draws a closed cardinal spline defined by an array of structures.
- structures.
-
- This method uses a default tension of 0.5.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates red and green pens.
-
-- Creates seven points to define a curve.
-
-- Draws seven red straight lines between the seven points to form a closed polygon.
-
-- Draws a green closed curve through the seven points.
-
- The method uses a default tension of 0.5.
-
+ structures.
+
+ This method uses a default tension of 0.5.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates red and green pens.
+
+- Creates seven points to define a curve.
+
+- Draws seven red straight lines between the seven points to form a closed polygon.
+
+- Draws a green closed curve through the seven points.
+
+ The method uses a default tension of 0.5.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet16":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet16":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet16":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet16":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -1838,41 +1838,41 @@
Array of structures that define the spline.
Draws a closed cardinal spline defined by an array of structures.
- structures.
-
- This method uses a default tension of 0.5.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates red and green pens.
-
-- Creates seven points to define a curve.
-
-- Draws seven red straight lines between the seven points to form a closed polygon.
-
-- Draws a green closed curve through the seven points.
-
- The method uses a default tension of 0.5.
-
+ structures.
+
+ This method uses a default tension of 0.5.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates red and green pens.
+
+- Creates seven points to define a curve.
+
+- Draws seven red straight lines between the seven points to form a closed polygon.
+
+- Draws a green closed curve through the seven points.
+
+ The method uses a default tension of 0.5.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet18":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet18":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet18":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet18":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -1916,43 +1916,43 @@
Member of the enumeration that determines how the curve is filled. This parameter is required but ignored.
Draws a closed cardinal spline defined by an array of structures using a specified tension.
- structures.
-
- The `tension` parameter determines the shape of the spline. If the value of the `tension` parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the `tension` parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates red and green pens.
-
-- Creates seven points to define the curve.
-
-- Draws seven red straight lines between the seven points to form a polygon.
-
-- Creates tension and fill mode settings.
-
-- Draws a green closed curve through the seven points.
-
- The method uses a tension of 1.0 and sets the fill mode to `FillMode.Alternate`.
-
+ structures.
+
+ The `tension` parameter determines the shape of the spline. If the value of the `tension` parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the `tension` parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates red and green pens.
+
+- Creates seven points to define the curve.
+
+- Draws seven red straight lines between the seven points to form a polygon.
+
+- Creates tension and fill mode settings.
+
+- Draws a green closed curve through the seven points.
+
+ The method uses a tension of 1.0 and sets the fill mode to `FillMode.Alternate`.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet17":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet17":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet17":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet17":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -1996,43 +1996,43 @@
Member of the enumeration that determines how the curve is filled. This parameter is required but is ignored.
Draws a closed cardinal spline defined by an array of structures using a specified tension.
- structures.
-
- The `tension` parameter determines the shape of the spline. If the value of the `tension` parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the `tension` parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates red and green pens.
-
-- Creates seven points to define the curve.
-
-- Draws seven red straight lines between the seven points to form a polygon.
-
-- Creates tension and fill mode settings.
-
-- Draws a green closed curve through the seven points.
-
- The method uses a tension of 1.0 and sets the fill mode to `FillMode.Alternate`.
-
+ structures.
+
+ The `tension` parameter determines the shape of the spline. If the value of the `tension` parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the `tension` parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates red and green pens.
+
+- Creates seven points to define the curve.
+
+- Draws seven red straight lines between the seven points to form a polygon.
+
+- Creates tension and fill mode settings.
+
+- Draws a green closed curve through the seven points.
+
+ The method uses a tension of 1.0 and sets the fill mode to `FillMode.Alternate`.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet19":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet19":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet19":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet19":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -2081,41 +2081,41 @@
Array of structures that define the spline.
Draws a cardinal spline through a specified array of structures.
- structures for a curve to be drawn.
-
- This method uses a default tension of 0.5.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates red and green pens.
-
-- Creates seven points to define a curve.
-
-- Draws six red straight lines between the seven points to form an incomplete polygon.
-
-- Draws an open green curve through the seven points.
-
- The method uses a default tension of 0.5.
-
+ structures for a curve to be drawn.
+
+ This method uses a default tension of 0.5.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates red and green pens.
+
+- Creates seven points to define a curve.
+
+- Draws six red straight lines between the seven points to form an incomplete polygon.
+
+- Draws an open green curve through the seven points.
+
+ The method uses a default tension of 0.5.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet20":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet20":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet20":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet20":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -2155,41 +2155,41 @@
Array of structures that define the spline.
Draws a cardinal spline through a specified array of structures.
- structures for a curve to be drawn.
-
- This method uses a default tension of 0.5.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates red and green pens.
-
-- Creates seven points to define a curve.
-
-- Draws six red straight lines between the seven points to form an incomplete polygon.
-
-- Draws an open green curve through the seven points.
-
- The method uses a default tension of 0.5.
-
+ structures for a curve to be drawn.
+
+ This method uses a default tension of 0.5.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates red and green pens.
+
+- Creates seven points to define a curve.
+
+- Draws six red straight lines between the seven points to form an incomplete polygon.
+
+- Draws an open green curve through the seven points.
+
+ The method uses a default tension of 0.5.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet23":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet23":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet23":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet23":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -2231,43 +2231,43 @@
Value greater than or equal to 0.0F that specifies the tension of the curve.
Draws a cardinal spline through a specified array of structures using a specified tension.
- structures for a curve to be drawn.
-
- The `tension` parameter determines the shape of the spline. If the value of the `tension` parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the `tension` parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates red and green pens.
-
-- Creates seven points to define the curve.
-
-- Draws six red straight lines between the seven points to form an incomplete polygon.
-
-- Creates a tension setting.
-
-- Draws an open green closed curve through the seven points.
-
- The method uses a tension of 1.0.
-
+ structures for a curve to be drawn.
+
+ The `tension` parameter determines the shape of the spline. If the value of the `tension` parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the `tension` parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates red and green pens.
+
+- Creates seven points to define the curve.
+
+- Draws six red straight lines between the seven points to form an incomplete polygon.
+
+- Creates a tension setting.
+
+- Draws an open green closed curve through the seven points.
+
+ The method uses a tension of 1.0.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet22":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet22":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet22":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet22":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -2309,43 +2309,43 @@
Value greater than or equal to 0.0F that specifies the tension of the curve.
Draws a cardinal spline through a specified array of structures using a specified tension.
- structures for a curve to be drawn.
-
- The `tension` parameter determines the shape of the spline. If the value of the `tension` parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the `tension` parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates red and green pens.
-
-- Creates seven points to define the curve.
-
-- Draws six red straight lines between the seven points to form an incomplete polygon.
-
-- Creates a tension setting.
-
-- Draws an open green closed curve through the seven points.
-
- The method uses a tension of 1.0.
-
+ structures for a curve to be drawn.
+
+ The `tension` parameter determines the shape of the spline. If the value of the `tension` parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the `tension` parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates red and green pens.
+
+- Creates seven points to define the curve.
+
+- Draws six red straight lines between the seven points to form an incomplete polygon.
+
+- Creates a tension setting.
+
+- Draws an open green closed curve through the seven points.
+
+ The method uses a tension of 1.0.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet26":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet26":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet26":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet26":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -2395,47 +2395,47 @@
Number of segments after the starting point to include in the curve.
Draws a cardinal spline through a specified array of structures. The drawing begins offset from the beginning of the array.
- structures for a curve to be drawn.
-
- The value of the `offset` parameter specifies the number of elements to skip in the array. The first element after the skipped elements represents the starting point of the curve.
-
- The value of the `numberOfSegments` parameter specifies the number of segments, after the starting point, to draw in the curve. The value of the `numberOfSegments` parameter must be at least 1. The value of the `offset` parameter plus the value of the `numberOfSegments` parameter must be less than the number of elements in the array of the `points` parameter.
-
- This method uses a default tension of 0.5.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates red and green pens.
-
-- Creates seven points to define a curve.
-
-- Draws six red straight lines between the seven points to form an incomplete polygon.
-
-- Defines the starting point offset and number of segments.
-
-- Draws an open green curve (starting at the third point) through the last five points.
-
- The method uses a default tension of 0.5.
-
+ structures for a curve to be drawn.
+
+ The value of the `offset` parameter specifies the number of elements to skip in the array. The first element after the skipped elements represents the starting point of the curve.
+
+ The value of the `numberOfSegments` parameter specifies the number of segments, after the starting point, to draw in the curve. The value of the `numberOfSegments` parameter must be at least 1. The value of the `offset` parameter plus the value of the `numberOfSegments` parameter must be less than the number of elements in the array of the `points` parameter.
+
+ This method uses a default tension of 0.5.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates red and green pens.
+
+- Creates seven points to define a curve.
+
+- Draws six red straight lines between the seven points to form an incomplete polygon.
+
+- Defines the starting point offset and number of segments.
+
+- Draws an open green curve (starting at the third point) through the last five points.
+
+ The method uses a default tension of 0.5.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet24":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet24":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet24":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet24":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -2481,49 +2481,49 @@
Value greater than or equal to 0.0F that specifies the tension of the curve.
Draws a cardinal spline through a specified array of structures using a specified tension.
- structures for a curve to be drawn.
-
- The value of the `offset` parameter specifies the number of elements to skip in the array. The first element after the skipped elements represents the starting point of the curve.
-
- The value of the `numberOfSegments` parameter specifies the number of segments, after the starting point, to draw in the curve. The value of the `numberOfSegments` parameter must be at least 1. The value of the `offset` parameter plus the value of the `numberOfSegments` parameter must be less than the number of elements in the array of the `points` parameter.
-
- The `tension` parameter determines the shape of the spline. If the value of the `tension` parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the `tension` parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates red and green pens.
-
-- Creates seven points to define a curve.
-
-- Draws six red straight lines between the seven points to form an incomplete polygon.
-
-- Defines the starting point offset and number of segments.
-
-- Defines the tension.
-
-- Draws an open green curve (starting at the third point) through the last five points.
-
- The method sets the tension to 1.0.
-
+ structures for a curve to be drawn.
+
+ The value of the `offset` parameter specifies the number of elements to skip in the array. The first element after the skipped elements represents the starting point of the curve.
+
+ The value of the `numberOfSegments` parameter specifies the number of segments, after the starting point, to draw in the curve. The value of the `numberOfSegments` parameter must be at least 1. The value of the `offset` parameter plus the value of the `numberOfSegments` parameter must be less than the number of elements in the array of the `points` parameter.
+
+ The `tension` parameter determines the shape of the spline. If the value of the `tension` parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the `tension` parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates red and green pens.
+
+- Creates seven points to define a curve.
+
+- Draws six red straight lines between the seven points to form an incomplete polygon.
+
+- Defines the starting point offset and number of segments.
+
+- Defines the tension.
+
+- Draws an open green curve (starting at the third point) through the last five points.
+
+ The method sets the tension to 1.0.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet21":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet21":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet21":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet21":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -2569,49 +2569,49 @@
Value greater than or equal to 0.0F that specifies the tension of the curve.
Draws a cardinal spline through a specified array of structures using a specified tension. The drawing begins offset from the beginning of the array.
- structures for curve to be drawn.
-
- The value of the `offset` parameter specifies the number of elements to skip in the array. The first element after the skipped elements represents the starting point of the curve.
-
- The value of the `numberOfSegments` parameter specifies the number of segments, after the starting point, to draw in the curve. The value of the `numberOfSegments` parameter must be at least 1. The value of the `offset` parameter plus the value of the `numberOfSegments` parameter must be less than the number of elements in the array of the `points` parameter.
-
- The `tension` parameter determines the shape of the spline. If the value of the `tension` parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the `tension` parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates red and green pens.
-
-- Creates seven points to define a curve.
-
-- Draws six red straight lines between the seven points to form an incomplete polygon.
-
-- Defines the starting point offset and number of segments.
-
-- Defines the tension.
-
-- Draws an open green curve (starting at the third point) through the last five points.
-
- The method sets the tension to 1.0.
-
+ structures for curve to be drawn.
+
+ The value of the `offset` parameter specifies the number of elements to skip in the array. The first element after the skipped elements represents the starting point of the curve.
+
+ The value of the `numberOfSegments` parameter specifies the number of segments, after the starting point, to draw in the curve. The value of the `numberOfSegments` parameter must be at least 1. The value of the `offset` parameter plus the value of the `numberOfSegments` parameter must be less than the number of elements in the array of the `points` parameter.
+
+ The `tension` parameter determines the shape of the spline. If the value of the `tension` parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the `tension` parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates red and green pens.
+
+- Creates seven points to define a curve.
+
+- Draws six red straight lines between the seven points to form an incomplete polygon.
+
+- Defines the starting point offset and number of segments.
+
+- Defines the tension.
+
+- Draws an open green curve (starting at the third point) through the last five points.
+
+ The method sets the tension to 1.0.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet25":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet25":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet25":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet25":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -2661,26 +2661,26 @@
structure that defines the boundaries of the ellipse.
Draws an ellipse specified by a bounding structure.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates a rectangle to bound an ellipse.
-
-- Draws the ellipse to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates a rectangle to bound an ellipse.
+
+- Draws the ellipse to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet27":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet27":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet27":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet27":::
+
]]>
@@ -2724,26 +2724,26 @@
structure that defines the boundaries of the ellipse.
Draws an ellipse defined by a bounding .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates a rectangle to bound an ellipse.
-
-- Draws the ellipse to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates a rectangle to bound an ellipse.
+
+- Draws the ellipse to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet28":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet28":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet28":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet28":::
+
]]>
@@ -2792,26 +2792,26 @@
Height of the bounding rectangle that defines the ellipse.
Draws an ellipse defined by a bounding rectangle specified by coordinates for the upper-left corner of the rectangle, a height, and a width.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates the position and size of a rectangle to bound an ellipse.
-
-- Draws the ellipse to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates the position and size of a rectangle to bound an ellipse.
+
+- Draws the ellipse to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet29":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet29":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet29":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet29":::
+
]]>
@@ -2860,26 +2860,26 @@
Height of the bounding rectangle that defines the ellipse.
Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates the position and size of a rectangle to bound an ellipse.
-
-- Draws the ellipse to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates the position and size of a rectangle to bound an ellipse.
+
+- Draws the ellipse to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet30":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet30":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet30":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet30":::
+
]]>
@@ -2932,23 +2932,23 @@
structure that specifies the location and size of the resulting image on the display surface. The image contained in the parameter is scaled to the dimensions of this rectangular area.
Draws the image represented by the specified within the area specified by a structure.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an icon from a standard Windows icon file SampIcon.ico in the example folder.
-
-- Creates a rectangle in which to draw the icon.
-
-- Draws the icon to the screen.
-
- The position of the rectangle locates the icon on the screen, and the size of the rectangle determines the scaling of the drawn icon.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an icon from a standard Windows icon file SampIcon.ico in the example folder.
+
+- Creates a rectangle in which to draw the icon.
+
+- Draws the icon to the screen.
+
+ The position of the rectangle locates the icon on the screen, and the size of the rectangle determines the scaling of the drawn icon.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet31":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet31":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet31":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet31":::
+
]]>
@@ -2993,23 +2993,23 @@
The y-coordinate of the upper-left corner of the drawn image.
Draws the image represented by the specified at the specified coordinates.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an icon from a standard Windows icon file SampIcon.ico in the example folder.
-
-- Creates the coordinates of the upper-left corner at which to draw the icon.
-
-- Draws the icon to the screen.
-
- The drawn icon is unscaled.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an icon from a standard Windows icon file SampIcon.ico in the example folder.
+
+- Creates the coordinates of the upper-left corner at which to draw the icon.
+
+- Draws the icon to the screen.
+
+ The drawn icon is unscaled.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet32":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet32":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet32":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet32":::
+
]]>
@@ -3053,23 +3053,23 @@
structure that specifies the location and size of the resulting image. The image is not scaled to fit this rectangle, but retains its original size. If the image is larger than the rectangle, it is clipped to fit inside it.
Draws the image represented by the specified without scaling the image.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an icon from a standard Windows icon file SampIcon.ico in the example folder.
-
-- Creates a rectangle in which to draw the icon.
-
-- Draws the icon to the screen.
-
- The position of the rectangle locates the icon on the screen, and the drawn icon is unscaled and unclipped.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an icon from a standard Windows icon file SampIcon.ico in the example folder.
+
+- Creates a rectangle in which to draw the icon.
+
+- Draws the icon to the screen.
+
+ The position of the rectangle locates the icon on the screen, and the drawn icon is unscaled and unclipped.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet33":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet33":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet33":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet33":::
+
]]>
@@ -3122,28 +3122,28 @@
structure that represents the location of the upper-left corner of the drawn image.
Draws the specified , using its original physical size, at the specified location.
- stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
-
- This method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call this method to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates a point at which to draw the upper-left corner of the image.
-
-- Draws the unscaled image to the screen.
-
+ stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
+
+ This method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call this method to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates a point at which to draw the upper-left corner of the image.
+
+- Draws the unscaled image to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet34":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet34":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet34":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet34":::
+
]]>
@@ -3187,30 +3187,30 @@
Array of three structures that define a parallelogram.
Draws the specified at the specified location and with the specified shape and size.
- structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
-
- The image represented by the `image` parameter is scaled and sheared to fit the shape of the parallelogram specified by the `destPoints` parameters.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates points that define a parallelogram in which to draw the image.
-
-- Draws the image to the screen.
-
- The position of the parallelogram locates the image on the screen, and the size of the original image and the size and shape of the parallelogram determines the scaling and shearing of the drawn image.
-
+ structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
+
+ The image represented by the `image` parameter is scaled and sheared to fit the shape of the parallelogram specified by the `destPoints` parameters.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates points that define a parallelogram in which to draw the image.
+
+- Draws the image to the screen.
+
+ The position of the parallelogram locates the image on the screen, and the size of the original image and the size and shape of the parallelogram determines the scaling and shearing of the drawn image.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet35":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet35":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet35":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet35":::
+
]]>
@@ -3255,28 +3255,28 @@
structure that represents the upper-left corner of the drawn image.
Draws the specified , using its original physical size, at the specified location.
- stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
-
- This method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call this method to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates a point at which to draw the upper-left corner of the image.
-
-- Draws the unscaled image to the screen.
-
+ stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
+
+ This method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call this method to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates a point at which to draw the upper-left corner of the image.
+
+- Draws the unscaled image to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet40":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet40":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet40":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet40":::
+
]]>
@@ -3320,30 +3320,30 @@
Array of three structures that define a parallelogram.
Draws the specified at the specified location and with the specified shape and size.
- structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
-
- The image represented by the `image` object is scaled and sheared to fit the shape of the parallelogram specified by the `destPoints` parameter.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates points that define a parallelogram in which to draw the image.
-
-- Draws the image to the screen.
-
- The position of the parallelogram locates the image on the screen, and the size of the original image and the size and shape of the parallelogram determines the scaling and shearing of the drawn image.
-
+ structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
+
+ The image represented by the `image` object is scaled and sheared to fit the shape of the parallelogram specified by the `destPoints` parameter.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates points that define a parallelogram in which to draw the image.
+
+- Draws the image to the screen.
+
+ The position of the parallelogram locates the image on the screen, and the size of the original image and the size and shape of the parallelogram determines the scaling and shearing of the drawn image.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet41":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet41":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet41":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet41":::
+
]]>
@@ -3388,28 +3388,28 @@
structure that specifies the location and size of the drawn image.
Draws the specified at the specified location and with the specified size.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates a rectangle in which to draw the image.
-
-- Draws the image to the screen.
-
- The position of the rectangle locates the image on the screen, and the size of the original image and the size of the rectangle determines the scaling of the drawn image.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates a rectangle in which to draw the image.
+
+- Draws the image to the screen.
+
+ The position of the rectangle locates the image on the screen, and the size of the original image and the size of the rectangle determines the scaling of the drawn image.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet46":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet46":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet46":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet46":::
+
]]>
@@ -3454,28 +3454,28 @@
structure that specifies the location and size of the drawn image.
Draws the specified at the specified location and with the specified size.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates a rectangle in which to draw the image.
-
-- Draws the image to the screen.
-
- The position of the rectangle locates the image on the screen, and the original size of the image and the size of the rectangle determines the scaling of the drawn image.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates a rectangle in which to draw the image.
+
+- Draws the image to the screen.
+
+ The position of the rectangle locates the image on the screen, and the original size of the image and the size of the rectangle determines the scaling of the drawn image.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet56":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet56":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet56":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet56":::
+
]]>
@@ -3521,28 +3521,28 @@
The y-coordinate of the upper-left corner of the drawn image.
Draws the specified image, using its original physical size, at the location specified by a coordinate pair.
- stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
-
- The method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example SampImag.jpg in the folder of the example.
-
-- Creates the coordinates of a point at which to draw the upper-left corner of the image.
-
-- Draws the unscaled image.
-
+ stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
+
+ The method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example SampImag.jpg in the folder of the example.
+
+- Creates the coordinates of a point at which to draw the upper-left corner of the image.
+
+- Draws the unscaled image.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet58":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet58":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet58":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet58":::
+
]]>
@@ -3588,28 +3588,28 @@
The y-coordinate of the upper-left corner of the drawn image.
Draws the specified , using its original physical size, at the specified location.
- stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
-
- This method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call this method to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates the coordinates of a point at which to draw the upper-left corner of the image.
-
-- Draws the unscaled image to the screen.
-
+ stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
+
+ This method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call this method to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates the coordinates of a point at which to draw the upper-left corner of the image.
+
+- Draws the unscaled image to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet61":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet61":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet61":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet61":::
+
]]>
@@ -3664,34 +3664,34 @@
Member of the enumeration that specifies the units of measure used by the parameter.
Draws the specified portion of the specified at the specified location and with the specified size.
- structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
-
- The `srcRect` parameter specifies a rectangular portion of the `image` object to draw. This portion is scaled and sheared to fit inside the parallelogram specified by the `destPoints` parameter.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates points that define a parallelogram in which to draw the image.
-
-- Creates a rectangle to select the portion of the image to draw.
-
-- Sets the graphics drawing unit to pixel.
-
-- Draws the image to the screen.
-
- The position of the parallelogram locates the image on the screen, and the size of the rectangle and the size and shape of the parallelogram determines the scaling and shearing of the drawn image.
-
+ structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
+
+ The `srcRect` parameter specifies a rectangular portion of the `image` object to draw. This portion is scaled and sheared to fit inside the parallelogram specified by the `destPoints` parameter.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates points that define a parallelogram in which to draw the image.
+
+- Creates a rectangle to select the portion of the image to draw.
+
+- Sets the graphics drawing unit to pixel.
+
+- Draws the image to the screen.
+
+ The position of the parallelogram locates the image on the screen, and the size of the rectangle and the size and shape of the parallelogram determines the scaling and shearing of the drawn image.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet36":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet36":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet36":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet36":::
+
]]>
@@ -3740,34 +3740,34 @@
Member of the enumeration that specifies the units of measure used by the parameter.
Draws the specified portion of the specified at the specified location and with the specified size.
- structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
-
- The `srcRect` parameter specifies a rectangular portion of the `image` object to draw. This portion is scaled and sheared to fit inside the parallelogram specified by the `destPoints` parameter.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates points that define a destination parallelogram in which to draw the image.
-
-- Creates a source rectangle from which to extract a portion of the image.
-
-- Sets the unit of measure of the source rectangle to pixels.
-
-- Draws the image to the screen.
-
- The position of the destination parallelogram locates the image on the screen, the size of the source rectangle and the size and shape of the destination parallelogram determines the scaling and shearing of the drawn image, and the size of the rectangle determines what portion of the original image is drawn to the screen.
-
+ structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
+
+ The `srcRect` parameter specifies a rectangular portion of the `image` object to draw. This portion is scaled and sheared to fit inside the parallelogram specified by the `destPoints` parameter.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates points that define a destination parallelogram in which to draw the image.
+
+- Creates a source rectangle from which to extract a portion of the image.
+
+- Sets the unit of measure of the source rectangle to pixels.
+
+- Draws the image to the screen.
+
+ The position of the destination parallelogram locates the image on the screen, the size of the source rectangle and the size and shape of the destination parallelogram determines the scaling and shearing of the drawn image, and the size of the rectangle determines what portion of the original image is drawn to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet42":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet42":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet42":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet42":::
+
]]>
@@ -3817,32 +3817,32 @@
Member of the enumeration that specifies the units of measure used by the parameter.
Draws the specified portion of the specified at the specified location and with the specified size.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates a destination rectangle in which to draw the image.
-
-- Creates a source rectangle from which to extract a portion of the image.
-
-- Sets the unit of measure of the source rectangle to pixels.
-
-- Draws the image to the screen.
-
- The position of the destination rectangle locates the image on the screen, the sizes of the source and destination rectangles determine the scaling of the drawn image, and the size of the source rectangle determines what portion of the original image is drawn to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates a destination rectangle in which to draw the image.
+
+- Creates a source rectangle from which to extract a portion of the image.
+
+- Sets the unit of measure of the source rectangle to pixels.
+
+- Draws the image to the screen.
+
+ The position of the destination rectangle locates the image on the screen, the sizes of the source and destination rectangles determine the scaling of the drawn image, and the size of the source rectangle determines what portion of the original image is drawn to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet47":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet47":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet47":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet47":::
+
]]>
@@ -3892,32 +3892,32 @@
Member of the enumeration that specifies the units of measure used by the parameter.
Draws the specified portion of the specified at the specified location and with the specified size.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates a destination rectangle in which to draw the image.
-
-- Creates a source rectangle from which to extract a portion of the image.
-
-- Sets the unit of measure of the source rectangle to pixels.
-
-- Draws the image to the screen.
-
- The position of the destination rectangle locates the image on the screen, the sizes of the source and destination rectangles determine the scaling of the drawn image, and the size of the source rectangle determines what portion of the original image is drawn to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates a destination rectangle in which to draw the image.
+
+- Creates a source rectangle from which to extract a portion of the image.
+
+- Sets the unit of measure of the source rectangle to pixels.
+
+- Draws the image to the screen.
+
+ The position of the destination rectangle locates the image on the screen, the sizes of the source and destination rectangles determine the scaling of the drawn image, and the size of the source rectangle determines what portion of the original image is drawn to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet57":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet57":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet57":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet57":::
+
]]>
@@ -3976,40 +3976,40 @@
that specifies recoloring and gamma information for the object.
Draws the specified portion of the specified at the specified location.
- structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
-
- The `srcRect` parameter specifies a rectangular portion of the`image` object to draw. This portion is scaled and sheared to fit inside the parallelogram specified by the `destPoints` parameter.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates points that define a parallelogram in which to draw the image.
-
-- Creates a rectangle to select the portion of the image to draw.
-
-- Sets the graphics drawing unit to pixel.
-
-- Draws the original image to the screen.
-
-- Creates an additional parallelogram in which to draw an adjusted image.
-
-- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
-
-- Draws the adjusted image to the screen.
-
- For the original, unadjusted parallelogram, the position locates the image on the screen, and the size of the rectangle and the size and shape of the parallelogram determines the scaling and shearing of the drawn image.
-
+ structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
+
+ The `srcRect` parameter specifies a rectangular portion of the`image` object to draw. This portion is scaled and sheared to fit inside the parallelogram specified by the `destPoints` parameter.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates points that define a parallelogram in which to draw the image.
+
+- Creates a rectangle to select the portion of the image to draw.
+
+- Sets the graphics drawing unit to pixel.
+
+- Draws the original image to the screen.
+
+- Creates an additional parallelogram in which to draw an adjusted image.
+
+- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
+
+- Draws the adjusted image to the screen.
+
+ For the original, unadjusted parallelogram, the position locates the image on the screen, and the size of the rectangle and the size and shape of the parallelogram determines the scaling and shearing of the drawn image.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet37":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet37":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet37":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet37":::
+
]]>
@@ -4068,40 +4068,40 @@
that specifies recoloring and gamma information for the object.
Draws the specified portion of the specified at the specified location and with the specified size.
- structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
-
- The `srcRect` parameter specifies a rectangular portion of the `image` object to draw. This portion is scaled and sheared to fit inside the parallelogram specified by the `destPoints` parameter.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates points that define a destination parallelogram in which to draw the image.
-
-- Creates a source rectangle from which to extract a portion of the image.
-
-- Sets the unit of measure of the source rectangle to pixels.
-
-- Draws the original image to the screen.
-
-- Creates an additional parallelogram in which to draw an adjusted image.
-
-- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
-
-- Draws the adjusted image to the screen.
-
- For the original, unadjusted destination parallelogram, the position locates the image on the screen, the size of the source rectangle and the size and shape of the destination parallelogram determines the scaling and shearing of the drawn image, and the size of the rectangle determines what portion of the original image is drawn to the screen.
-
+ structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
+
+ The `srcRect` parameter specifies a rectangular portion of the `image` object to draw. This portion is scaled and sheared to fit inside the parallelogram specified by the `destPoints` parameter.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates points that define a destination parallelogram in which to draw the image.
+
+- Creates a source rectangle from which to extract a portion of the image.
+
+- Sets the unit of measure of the source rectangle to pixels.
+
+- Draws the original image to the screen.
+
+- Creates an additional parallelogram in which to draw an adjusted image.
+
+- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
+
+- Draws the adjusted image to the screen.
+
+ For the original, unadjusted destination parallelogram, the position locates the image on the screen, the size of the source rectangle and the size and shape of the destination parallelogram determines the scaling and shearing of the drawn image, and the size of the rectangle determines what portion of the original image is drawn to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet43":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet43":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet43":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet43":::
+
]]>
@@ -4152,34 +4152,34 @@
Member of the enumeration that specifies the units of measure used by the parameter.
Draws a portion of an image at a specified location.
- stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 360 and a horizontal resolution of 72 dots per inch has a physical width of 5 inches. Similar remarks apply to pixel height and physical height.
-
- This method draws a portion of an image using its physical size, so the image portion will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image portion has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call this method to draw that image portion on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image portion will be (216/72)*96 = 288.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates the coordinates at which to draw the upper-left corner of the image.
-
-- Creates a source rectangle from which to extract a portion of the image.
-
-- Sets the unit of measure of the source rectangle to pixels.
-
-- Draws the image to the screen.
-
- The size of the source rectangle determines what portion of the unscaled original image is drawn to the screen.
-
+ stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 360 and a horizontal resolution of 72 dots per inch has a physical width of 5 inches. Similar remarks apply to pixel height and physical height.
+
+ This method draws a portion of an image using its physical size, so the image portion will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image portion has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call this method to draw that image portion on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image portion will be (216/72)*96 = 288.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates the coordinates at which to draw the upper-left corner of the image.
+
+- Creates a source rectangle from which to extract a portion of the image.
+
+- Sets the unit of measure of the source rectangle to pixels.
+
+- Draws the image to the screen.
+
+ The size of the source rectangle determines what portion of the unscaled original image is drawn to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet59":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet59":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet59":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet59":::
+
]]>
@@ -4229,28 +4229,28 @@
Height of the drawn image.
Draws the specified at the specified location and with the specified size.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates the position and size of a rectangle in which to draw the image.
-
-- Draws the image to the screen.
-
- The position of the rectangle locates the image on the screen, and the size of the original image and the size of the rectangle determines the scaling of the drawn image.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates the position and size of a rectangle in which to draw the image.
+
+- Draws the image to the screen.
+
+ The position of the rectangle locates the image on the screen, and the size of the original image and the size of the rectangle determines the scaling of the drawn image.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet60":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet60":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet60":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet60":::
+
]]>
@@ -4301,34 +4301,34 @@
Member of the enumeration that specifies the units of measure used by the parameter.
Draws a portion of an image at a specified location.
- stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 360 and a horizontal resolution of 72 dots per inch has a physical width of 5 inches. Similar remarks apply to pixel height and physical height.
-
- This method draws a portion of an image using its physical size, so the image portion will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image portion has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call this method to draw that image portion on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image portion will be (216/72)*96 = 288.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates the coordinates at which to draw the upper-left corner of the image.
-
-- Creates a source rectangle from which to extract a portion of the image.
-
-- Sets the unit of measure of the source rectangle to pixels.
-
-- Draws the image to the screen.
-
- The size of the source rectangle determines what portion of the unscaled original image is drawn to the screen.
-
+ stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 360 and a horizontal resolution of 72 dots per inch has a physical width of 5 inches. Similar remarks apply to pixel height and physical height.
+
+ This method draws a portion of an image using its physical size, so the image portion will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image portion has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call this method to draw that image portion on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image portion will be (216/72)*96 = 288.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates the coordinates at which to draw the upper-left corner of the image.
+
+- Creates a source rectangle from which to extract a portion of the image.
+
+- Sets the unit of measure of the source rectangle to pixels.
+
+- Draws the image to the screen.
+
+ The size of the source rectangle determines what portion of the unscaled original image is drawn to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet62":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet62":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet62":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet62":::
+
]]>
@@ -4378,28 +4378,28 @@
Height of the drawn image.
Draws the specified at the specified location and with the specified size.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates the position and size of a rectangle in which to draw the image.
-
-- Draws the image to the screen.
-
- The position of the rectangle locates the image on the screen, and the size of the original image and the size of the rectangle determines the scaling of the drawn image.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates the position and size of a rectangle in which to draw the image.
+
+- Draws the image to the screen.
+
+ The position of the rectangle locates the image on the screen, and the size of the original image and the size of the rectangle determines the scaling of the drawn image.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet63":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet63":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet63":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet63":::
+
]]>
@@ -4461,46 +4461,46 @@
delegate that specifies a method to call during the drawing of the image. This method is called frequently to check whether to stop execution of the method according to application-determined criteria.
Draws the specified portion of the specified at the specified location and with the specified size.
- structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
-
- The `srcRect` parameter specifies a rectangular portion of the `image` object to draw. This portion is scaled and sheared to fit inside the parallelogram specified by the `destPoints` parameter.
-
- This overload with the `callback` parameter provides the means to stop the drawing of an image once it starts according to criteria determined by the application. For example, an application could start drawing a large image and the user might scroll the image off the screen, in which case the application could stop the drawing.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code first defines a callback method for the delegate; the definition is simplistic and merely tests to see whether the method calls it with a null `callBackData` parameter. The main body of the example performs the following actions:
-
-- Creates an instance of the callback method:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates points that define a parallelogram in which to draw the image.
-
-- Creates a rectangle to select the portion of the image to draw.
-
-- Sets the graphics drawing unit to pixel.
-
-- Draws the original image to the screen.
-
-- Creates an additional parallelogram in which to draw an adjusted image.
-
-- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
-
-- Draws the adjusted image to the screen.
-
- For the original, unadjusted parallelogram, the position locates the image on the screen, and the size of the rectangle and the size and shape of the parallelogram determines the scaling and shearing of the drawn image.
-
- Because this example uses an overload that does not pass a `callBackData` parameter, the callback returns `true`, which causes the method to end, and the exception-handling code included in the example prints out the exception text rather than drawing the image.
-
+ structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
+
+ The `srcRect` parameter specifies a rectangular portion of the `image` object to draw. This portion is scaled and sheared to fit inside the parallelogram specified by the `destPoints` parameter.
+
+ This overload with the `callback` parameter provides the means to stop the drawing of an image once it starts according to criteria determined by the application. For example, an application could start drawing a large image and the user might scroll the image off the screen, in which case the application could stop the drawing.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code first defines a callback method for the delegate; the definition is simplistic and merely tests to see whether the method calls it with a null `callBackData` parameter. The main body of the example performs the following actions:
+
+- Creates an instance of the callback method:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates points that define a parallelogram in which to draw the image.
+
+- Creates a rectangle to select the portion of the image to draw.
+
+- Sets the graphics drawing unit to pixel.
+
+- Draws the original image to the screen.
+
+- Creates an additional parallelogram in which to draw an adjusted image.
+
+- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
+
+- Draws the adjusted image to the screen.
+
+ For the original, unadjusted parallelogram, the position locates the image on the screen, and the size of the rectangle and the size and shape of the parallelogram determines the scaling and shearing of the drawn image.
+
+ Because this example uses an overload that does not pass a `callBackData` parameter, the callback returns `true`, which causes the method to end, and the exception-handling code included in the example prints out the exception text rather than drawing the image.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet38":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet38":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet38":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet38":::
+
]]>
@@ -4562,46 +4562,46 @@
delegate that specifies a method to call during the drawing of the image. This method is called frequently to check whether to stop execution of the method according to application-determined criteria.
Draws the specified portion of the specified at the specified location and with the specified size.
- structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
-
- The `srcRect` parameter specifies a rectangular portion of the `image` object to draw. This portion is scaled and sheared to fit inside the parallelogram specified by the `destPoints` parameter.
-
- This overload with the `callback` parameter provides the means to stop the drawing of an image once it starts according to criteria determined by the application. For example, an application could start drawing a large image and the user might scroll the image off the screen, in which case the application could stop the drawing.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code first defines a callback method for the delegate; the definition is simplistic and merely tests to see whether the method calls it with a null `callBackData` parameter. The main body of the example performs the following actions:
-
-- Creates an instance of the callback method.
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates points that define a parallelogram in which to draw the image.
-
-- Creates a rectangle to select the portion of the image to draw.
-
-- Sets the graphics drawing unit to pixel.
-
-- Draws the original image to the screen.
-
-- Creates an additional parallelogram in which to draw an adjusted image.
-
-- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
-
-- Draws the adjusted image to the screen.
-
- For the original, unadjusted parallelogram, the position locates the image on the screen, and the size of the rectangle and the size and shape of the parallelogram determines the scaling and shearing of the drawn image.
-
- Because this example uses an overload that does not pass a `callBackData` parameter, the callback returns `true`, which causes the method to end, and the exception-handling code included in the example prints out the exception text rather than drawing the image.
-
+ structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
+
+ The `srcRect` parameter specifies a rectangular portion of the `image` object to draw. This portion is scaled and sheared to fit inside the parallelogram specified by the `destPoints` parameter.
+
+ This overload with the `callback` parameter provides the means to stop the drawing of an image once it starts according to criteria determined by the application. For example, an application could start drawing a large image and the user might scroll the image off the screen, in which case the application could stop the drawing.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code first defines a callback method for the delegate; the definition is simplistic and merely tests to see whether the method calls it with a null `callBackData` parameter. The main body of the example performs the following actions:
+
+- Creates an instance of the callback method.
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates points that define a parallelogram in which to draw the image.
+
+- Creates a rectangle to select the portion of the image to draw.
+
+- Sets the graphics drawing unit to pixel.
+
+- Draws the original image to the screen.
+
+- Creates an additional parallelogram in which to draw an adjusted image.
+
+- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
+
+- Draws the adjusted image to the screen.
+
+ For the original, unadjusted parallelogram, the position locates the image on the screen, and the size of the rectangle and the size and shape of the parallelogram determines the scaling and shearing of the drawn image.
+
+ Because this example uses an overload that does not pass a `callBackData` parameter, the callback returns `true`, which causes the method to end, and the exception-handling code included in the example prints out the exception text rather than drawing the image.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet44":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet44":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet44":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet44":::
+
]]>
@@ -4659,46 +4659,46 @@
Value specifying additional data for the delegate to use when checking whether to stop execution of the method.
Draws the specified portion of the specified at the specified location and with the specified size.
- structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
-
- The `srcRect` parameter specifies a rectangular portion of the `image` object to draw. This portion is scaled and sheared to fit inside the parallelogram specified by the `destPoints` parameter.
-
- This overload with the `callback` and `callbackData` parameters provides the means to stop the drawing of an image once it starts according to criteria and data determined by the application. For example, an application could start drawing a large image and the user might scroll the image off the screen, in which case the application could stop the drawing.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code first defines a callback method for the delegate; the definition is simplistic and merely tests to see whether the method calls it with a null `callBackData` parameter. The main body of the example performs the following actions:
-
-- Creates an instance of the callback method.
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates points that define a parallelogram in which to draw the image.
-
-- Creates a rectangle to select the portion of the image to draw.
-
-- Sets the graphics drawing unit to pixel.
-
-- Draws the original image to the screen.
-
-- Creates an additional parallelogram in which to draw an adjusted image.
-
-- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
-
-- Draws the adjusted image to the screen.
-
- For the original, unadjusted parallelogram, the position locates the image on the screen, and the size of the rectangle and the size and shape of the parallelogram determines the scaling and shearing of the drawn image.
-
- Because this example uses an overload that passes a `callBackData` parameter, the callback returns `false`, which causes the method to continue, and the example draws the adjusted image to the screen.
-
+ structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
+
+ The `srcRect` parameter specifies a rectangular portion of the `image` object to draw. This portion is scaled and sheared to fit inside the parallelogram specified by the `destPoints` parameter.
+
+ This overload with the `callback` and `callbackData` parameters provides the means to stop the drawing of an image once it starts according to criteria and data determined by the application. For example, an application could start drawing a large image and the user might scroll the image off the screen, in which case the application could stop the drawing.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code first defines a callback method for the delegate; the definition is simplistic and merely tests to see whether the method calls it with a null `callBackData` parameter. The main body of the example performs the following actions:
+
+- Creates an instance of the callback method.
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates points that define a parallelogram in which to draw the image.
+
+- Creates a rectangle to select the portion of the image to draw.
+
+- Sets the graphics drawing unit to pixel.
+
+- Draws the original image to the screen.
+
+- Creates an additional parallelogram in which to draw an adjusted image.
+
+- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
+
+- Draws the adjusted image to the screen.
+
+ For the original, unadjusted parallelogram, the position locates the image on the screen, and the size of the rectangle and the size and shape of the parallelogram determines the scaling and shearing of the drawn image.
+
+ Because this example uses an overload that passes a `callBackData` parameter, the callback returns `false`, which causes the method to continue, and the example draws the adjusted image to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet39":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet39":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet39":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet39":::
+
]]>
Images, Bitmaps, and Metafiles
@@ -4754,46 +4754,46 @@
Value specifying additional data for the delegate to use when checking whether to stop execution of the method.
Draws the specified portion of the specified at the specified location and with the specified size.
- structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
-
- The `srcRect` parameter specifies a rectangular portion of the `image` object to draw. This portion is scaled and sheared to fit inside the parallelogram specified by the `destPoints` parameter.
-
- This overload with the `callback` and `callbackData` parameters provides the means to stop the drawing of an image once it starts according to criteria and data determined by the application. For example, an application could start drawing a large image and the user might scroll the image off the screen, in which case the application could stop the drawing.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the `Pa` event handler. The code first defines a callback method for the delegate; the definition is simplistic and merely tests to see whether the method calls it with a null `callBackData` parameter. The main body of the example performs the following actions:
-
-- Creates an instance of the callback method.
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates points that define a parallelogram in which to draw the image.
-
-- Creates a rectangle to select the portion of the image to draw.
-
-- Sets the graphics drawing unit to pixel.
-
-- Draws the original image to the screen.
-
-- Creates an additional parallelogram in which to draw an adjusted image.
-
-- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
-
-- Draws the adjusted image to the screen.
-
- For the original, unadjusted parallelogram, the position locates the image on the screen, and the size of the rectangle and the size and shape of the parallelogram determines the scaling and shearing of the drawn image.
-
- Because this example uses an overload that passes a `callBackData` parameter, the callback returns `false`, which causes the method to continue, and the example draws the adjusted image to the screen.
-
+ structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram.
+
+ The `srcRect` parameter specifies a rectangular portion of the `image` object to draw. This portion is scaled and sheared to fit inside the parallelogram specified by the `destPoints` parameter.
+
+ This overload with the `callback` and `callbackData` parameters provides the means to stop the drawing of an image once it starts according to criteria and data determined by the application. For example, an application could start drawing a large image and the user might scroll the image off the screen, in which case the application could stop the drawing.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the `Pa` event handler. The code first defines a callback method for the delegate; the definition is simplistic and merely tests to see whether the method calls it with a null `callBackData` parameter. The main body of the example performs the following actions:
+
+- Creates an instance of the callback method.
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates points that define a parallelogram in which to draw the image.
+
+- Creates a rectangle to select the portion of the image to draw.
+
+- Sets the graphics drawing unit to pixel.
+
+- Draws the original image to the screen.
+
+- Creates an additional parallelogram in which to draw an adjusted image.
+
+- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
+
+- Draws the adjusted image to the screen.
+
+ For the original, unadjusted parallelogram, the position locates the image on the screen, and the size of the rectangle and the size and shape of the parallelogram determines the scaling and shearing of the drawn image.
+
+ Because this example uses an overload that passes a `callBackData` parameter, the callback returns `false`, which causes the method to continue, and the example draws the adjusted image to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet45":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet45":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet45":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet45":::
+
]]>
@@ -4854,32 +4854,32 @@
Member of the enumeration that specifies the units of measure used to determine the source rectangle.
Draws the specified portion of the specified at the specified location and with the specified size.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates a destination rectangle in which to draw the image.
-
-- Creates the coordinates of a source rectangle from which to extract a portion of the image.
-
-- Sets the unit of measure of the source rectangle to pixels.
-
-- Draws the image to the screen.
-
- The position of the destination rectangle locates the image on the screen, and the sizes of the source and destination rectangles determine the scaling of the drawn image, and the size of the source rectangle determines what portion of the original image is drawn to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates a destination rectangle in which to draw the image.
+
+- Creates the coordinates of a source rectangle from which to extract a portion of the image.
+
+- Sets the unit of measure of the source rectangle to pixels.
+
+- Draws the image to the screen.
+
+ The position of the destination rectangle locates the image on the screen, and the sizes of the source and destination rectangles determine the scaling of the drawn image, and the size of the source rectangle determines what portion of the original image is drawn to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet48":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet48":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet48":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet48":::
+
]]>
@@ -4940,32 +4940,32 @@
Member of the enumeration that specifies the units of measure used to determine the source rectangle.
Draws the specified portion of the specified at the specified location and with the specified size.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates the coordinates of a destination rectangle in which to draw the image.
-
-- Creates a source rectangle from which to extract a portion of the image.
-
-- Sets the unit of measure of the source rectangle to pixels.
-
-- Draws the image to the screen.
-
- The position of the destination rectangle locates the image on the screen, the sizes of the source and destination rectangles determine the scaling of the drawn image, and the size of the source rectangle determines what portion of the original image is drawn to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates the coordinates of a destination rectangle in which to draw the image.
+
+- Creates a source rectangle from which to extract a portion of the image.
+
+- Sets the unit of measure of the source rectangle to pixels.
+
+- Draws the image to the screen.
+
+ The position of the destination rectangle locates the image on the screen, the sizes of the source and destination rectangles determine the scaling of the drawn image, and the size of the source rectangle determines what portion of the original image is drawn to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet52":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet52":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet52":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet52":::
+
]]>
@@ -5030,38 +5030,38 @@
that specifies recoloring and gamma information for the object.
Draws the specified portion of the specified at the specified location and with the specified size.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates a destination rectangle in which to draw the image.
-
-- Creates the coordinates of a source rectangle from which to extract a portion of the image.
-
-- Sets the unit of measure of the source rectangle to pixels.
-
-- Draws the original image to the screen.
-
-- Creates an additional rectangle in which to draw an adjusted image.
-
-- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
-
-- Draws the adjusted image to the screen.
-
- For the original, unadjusted destination rectangle, the position locates the image on the screen, and the sizes of the source and destination rectangles determine the scaling of the drawn image, and the size of the source rectangle determines what portion of the original image is drawn to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates a destination rectangle in which to draw the image.
+
+- Creates the coordinates of a source rectangle from which to extract a portion of the image.
+
+- Sets the unit of measure of the source rectangle to pixels.
+
+- Draws the original image to the screen.
+
+- Creates an additional rectangle in which to draw an adjusted image.
+
+- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
+
+- Draws the adjusted image to the screen.
+
+ For the original, unadjusted destination rectangle, the position locates the image on the screen, and the sizes of the source and destination rectangles determine the scaling of the drawn image, and the size of the source rectangle determines what portion of the original image is drawn to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet49":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet49":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet49":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet49":::
+
]]>
@@ -5126,38 +5126,38 @@
that specifies recoloring and gamma information for the object.
Draws the specified portion of the specified at the specified location and with the specified size.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates a destination rectangle in which to draw the image.
-
-- Creates the coordinates of a source rectangle from which to extract a portion of the image.
-
-- Sets the unit of measure of the source rectangle to pixels.
-
-- Draws the original image to the screen.
-
-- Creates an additional rectangle in which to draw an adjusted image.
-
-- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
-
-- Draws the adjusted image to the screen.
-
- For the original, unadjusted destination rectangle, the position locates the image on the screen, and the sizes of the source and destination rectangles determine the scaling of the drawn image, and the size of the source rectangle determines what portion of the original image is drawn to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates a destination rectangle in which to draw the image.
+
+- Creates the coordinates of a source rectangle from which to extract a portion of the image.
+
+- Sets the unit of measure of the source rectangle to pixels.
+
+- Draws the original image to the screen.
+
+- Creates an additional rectangle in which to draw an adjusted image.
+
+- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
+
+- Draws the adjusted image to the screen.
+
+ For the original, unadjusted destination rectangle, the position locates the image on the screen, and the sizes of the source and destination rectangles determine the scaling of the drawn image, and the size of the source rectangle determines what portion of the original image is drawn to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet53":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet53":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet53":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet53":::
+
]]>
@@ -5219,44 +5219,44 @@
delegate that specifies a method to call during the drawing of the image. This method is called frequently to check whether to stop execution of the method according to application-determined criteria.
Draws the specified portion of the specified at the specified location and with the specified size.
- `e`, which is a parameter of the event handler. The code first defines a callback method for the delegate; the definition is simplistic and merely tests to see whether the method calls it with a null `callBackData` parameter. The main body of the example performs the following actions:
-
-- Creates an instance of the callback method.
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates points that define a destination rectangle in which to draw the image.
-
-- Creates a source rectangle to select the portion of the image to draw.
-
-- Sets the graphics drawing unit to pixel.
-
-- Draws the original image to the screen.
-
-- Creates an additional destination rectangle in which to draw an adjusted image.
-
-- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
-
-- Draws the adjusted image to the screen.
-
- For the original, unadjusted destination rectangle, the position locates the image on the screen, and the size of the source rectangle and the size and shape of the destination rectangle determines the scaling of the drawn image.
-
- Because this example uses an overload that does not pass a `callBackData` parameter, the callback returns `true`, which causes the method to end, and the exception-handling code included in the example prints out the exception text rather than drawing the image.
-
+ `e`, which is a parameter of the event handler. The code first defines a callback method for the delegate; the definition is simplistic and merely tests to see whether the method calls it with a null `callBackData` parameter. The main body of the example performs the following actions:
+
+- Creates an instance of the callback method.
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates points that define a destination rectangle in which to draw the image.
+
+- Creates a source rectangle to select the portion of the image to draw.
+
+- Sets the graphics drawing unit to pixel.
+
+- Draws the original image to the screen.
+
+- Creates an additional destination rectangle in which to draw an adjusted image.
+
+- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
+
+- Draws the adjusted image to the screen.
+
+ For the original, unadjusted destination rectangle, the position locates the image on the screen, and the size of the source rectangle and the size and shape of the destination rectangle determines the scaling of the drawn image.
+
+ Because this example uses an overload that does not pass a `callBackData` parameter, the callback returns `true`, which causes the method to end, and the exception-handling code included in the example prints out the exception text rather than drawing the image.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet50":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet50":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet50":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet50":::
+
]]>
@@ -5318,44 +5318,44 @@
delegate that specifies a method to call during the drawing of the image. This method is called frequently to check whether to stop execution of the method according to application-determined criteria.
Draws the specified portion of the specified at the specified location and with the specified size.
- `e`, which is a parameter of the event handler. The code first defines a callback method for the delegate; the definition is simplistic and merely tests to see whether the method calls it with a null `callBackData` parameter. The main body of the example performs the following actions:
-
-- Creates an instance of the callback method.
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates points that define a destination rectangle in which to draw the image.
-
-- Creates a source rectangle to select the portion of the image to draw.
-
-- Sets the graphics drawing unit to pixel.
-
-- Draws the original image to the screen.
-
-- Creates an additional destination rectangle in which to draw an adjusted image.
-
-- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
-
-- Draws the adjusted image to the screen.
-
- For the original, unadjusted destination rectangle, the position locates the image on the screen, and the size of the source rectangle and the size and shape of the destination rectangle determines the scaling of the drawn image.
-
- Because this example uses an overload that does not pass a `callBackData` parameter, the callback returns `true`, which causes the method to end, and the exception-handling code included in the example prints out the exception text rather than drawing the image.
-
+ `e`, which is a parameter of the event handler. The code first defines a callback method for the delegate; the definition is simplistic and merely tests to see whether the method calls it with a null `callBackData` parameter. The main body of the example performs the following actions:
+
+- Creates an instance of the callback method.
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates points that define a destination rectangle in which to draw the image.
+
+- Creates a source rectangle to select the portion of the image to draw.
+
+- Sets the graphics drawing unit to pixel.
+
+- Draws the original image to the screen.
+
+- Creates an additional destination rectangle in which to draw an adjusted image.
+
+- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
+
+- Draws the adjusted image to the screen.
+
+ For the original, unadjusted destination rectangle, the position locates the image on the screen, and the size of the source rectangle and the size and shape of the destination rectangle determines the scaling of the drawn image.
+
+ Because this example uses an overload that does not pass a `callBackData` parameter, the callback returns `true`, which causes the method to end, and the exception-handling code included in the example prints out the exception text rather than drawing the image.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet54":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet54":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet54":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet54":::
+
]]>
@@ -5419,44 +5419,44 @@
Value specifying additional data for the delegate to use when checking whether to stop execution of the method.
Draws the specified portion of the specified at the specified location and with the specified size.
- `e`, which is a parameter of the event handler. The code first defines a callback method for the delegate; the definition is simplistic and merely tests to see whether the method calls it with a null `callBackData` parameter. The main body of the example performs the following actions:
-
-- Creates an instance of the callback method.
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates points that define a destination rectangle in which to draw the image.
-
-- Creates a source rectangle to select the portion of the image to draw.
-
-- Sets the graphics drawing unit to pixel.
-
-- Draws the original image to the screen.
-
-- Creates an additional destination rectangle in which to draw an adjusted image.
-
-- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
-
-- Draws the adjusted image to the screen.
-
- For the original, unadjusted destination rectangle, the position locates the image on the screen, and the size of the source rectangle and the size and shape of the destination rectangle determines the scaling of the drawn image.
-
- Because this example uses an overload that passes a `callBackData` parameter, the callback returns `false`, which causes the method to continue, and the example draws the adjusted image to the screen.
-
+ `e`, which is a parameter of the event handler. The code first defines a callback method for the delegate; the definition is simplistic and merely tests to see whether the method calls it with a null `callBackData` parameter. The main body of the example performs the following actions:
+
+- Creates an instance of the callback method.
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates points that define a destination rectangle in which to draw the image.
+
+- Creates a source rectangle to select the portion of the image to draw.
+
+- Sets the graphics drawing unit to pixel.
+
+- Draws the original image to the screen.
+
+- Creates an additional destination rectangle in which to draw an adjusted image.
+
+- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
+
+- Draws the adjusted image to the screen.
+
+ For the original, unadjusted destination rectangle, the position locates the image on the screen, and the size of the source rectangle and the size and shape of the destination rectangle determines the scaling of the drawn image.
+
+ Because this example uses an overload that passes a `callBackData` parameter, the callback returns `false`, which causes the method to continue, and the example draws the adjusted image to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet51":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet51":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet51":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet51":::
+
]]>
@@ -5520,44 +5520,44 @@
Value specifying additional data for the delegate to use when checking whether to stop execution of the method.
Draws the specified portion of the specified at the specified location and with the specified size.
- `e`, which is a parameter of the event handler. The code first defines a callback method for the delegate; the definition is simplistic and merely tests to see whether the method calls it with a null `callBackData` parameter. The main body of the example performs the following actions:
-
-- Creates an instance of the callback method.
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates points that define a destination rectangle in which to draw the image.
-
-- Creates a source rectangle to select the portion of the image to draw.
-
-- Sets the graphics drawing unit to pixel.
-
-- Draws the original image to the screen.
-
-- Creates an additional destination rectangle in which to draw an adjusted image.
-
-- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
-
-- Draws the adjusted image to the screen.
-
- For the original, unadjusted destination rectangle, the position locates the image on the screen, and the size of the source rectangle and the size and shape of the destination rectangle determines the scaling of the drawn image.
-
- Because this example uses an overload that passes a `callBackData` parameter, the callback returns `false`, which causes the method to continue, and the example draws the adjusted image to the screen.
-
+ `e`, which is a parameter of the event handler. The code first defines a callback method for the delegate; the definition is simplistic and merely tests to see whether the method calls it with a null `callBackData` parameter. The main body of the example performs the following actions:
+
+- Creates an instance of the callback method.
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates points that define a destination rectangle in which to draw the image.
+
+- Creates a source rectangle to select the portion of the image to draw.
+
+- Sets the graphics drawing unit to pixel.
+
+- Draws the original image to the screen.
+
+- Creates an additional destination rectangle in which to draw an adjusted image.
+
+- Creates and sets the attributes of the adjusted image to have a larger-than-usual gamma value.
+
+- Draws the adjusted image to the screen.
+
+ For the original, unadjusted destination rectangle, the position locates the image on the screen, and the size of the source rectangle and the size and shape of the destination rectangle determines the scaling of the drawn image.
+
+ Because this example uses an overload that passes a `callBackData` parameter, the callback returns `false`, which causes the method to continue, and the example draws the adjusted image to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet55":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet55":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet55":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet55":::
+
]]>
@@ -5611,28 +5611,28 @@
structure that specifies the upper-left corner of the drawn image.
Draws a specified image using its original physical size at a specified location.
- stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
-
- The method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
-
-- Creates a point at which to draw the upper-left corner of the image.
-
-- Draws the entire image using its physical size.
-
+ stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
+
+ The method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file SampImag.jpg in the folder of the example.
+
+- Creates a point at which to draw the upper-left corner of the image.
+
+- Draws the entire image using its physical size.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet64":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet64":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet64":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet64":::
+
]]>
@@ -5676,13 +5676,13 @@
that specifies the upper-left corner of the drawn image. The X and Y properties of the rectangle specify the upper-left corner. The Width and Height properties are ignored.
Draws a specified image using its original physical size at a specified location.
- stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
-
- The method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.
-
+ stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
+
+ The method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.
+
]]>
@@ -5733,28 +5733,28 @@
The y-coordinate of the upper-left corner of the drawn image.
Draws the specified image using its original physical size at the location specified by a coordinate pair.
- stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
-
- The method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an image from a JPEG file, SampImag.jpg, in the folder of the example.
-
-- Creates a point at which to draw the upper-left corner of the image.
-
-- Draws the entire image using its physical size.
-
+ stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
+
+ The method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an image from a JPEG file, SampImag.jpg, in the folder of the example.
+
+- Creates a point at which to draw the upper-left corner of the image.
+
+- Draws the entire image using its physical size.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet65":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet65":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet65":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet65":::
+
]]>
@@ -5809,13 +5809,13 @@
Not used.
Draws a specified image using its original physical size at a specified location.
- stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
-
- The method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.
-
+ stores a value for pixel width and a value for horizontal resolution (dots per inch). The physical width, measured in inches, of an image is the pixel width divided by the horizontal resolution. For example, an image with a pixel width of 216 and a horizontal resolution of 72 dots per inch has a physical width of 3 inches. Similar remarks apply to pixel height and physical height.
+
+ The method draws an image using its physical size, so the image will have its correct size in inches regardless of the resolution (dots per inch) of the display device. For example, suppose an image has a pixel width of 216 and a horizontal resolution of 72 dots per inch. If you call to draw that image on a device that has a resolution of 96 dots per inch, the pixel width of the rendered image will be (216/72)*96 = 288.
+
]]>
@@ -5856,14 +5856,14 @@
The in which to draw the image.
Draws the specified image without scaling and clips it, if necessary, to fit in the specified rectangle.
- method. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawImageUnscaled` method from the event-handling method, passing `e` as .
-
+ method. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawImageUnscaled` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet8":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet8":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet8":::
+
]]>
@@ -5919,21 +5919,21 @@
structure that represents the second point to connect.
Draws a line connecting two structures.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates points for the endpoints of the line.
-
-- Draws the line to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates points for the endpoints of the line.
+
+- Draws the line to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet66":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet66":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet66":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet66":::
+
]]>
@@ -5981,26 +5981,26 @@
structure that represents the second point to connect.
Draws a line connecting two structures.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates points for the endpoints of the line.
-
-- Draws the line to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates points for the endpoints of the line.
+
+- Draws the line to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet67":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet67":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet67":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet67":::
+
]]>
@@ -6050,26 +6050,26 @@
The y-coordinate of the second point.
Draws a line connecting the two points specified by the coordinate pairs.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates the coordinates of the endpoints of the line.
-
-- Draws the line to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates the coordinates of the endpoints of the line.
+
+- Draws the line to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet68":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet68":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet68":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet68":::
+
]]>
@@ -6119,26 +6119,26 @@
The y-coordinate of the second point.
Draws a line connecting the two points specified by the coordinate pairs.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates the coordinates of the endpoints of the line.
-
-- Draws the line to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates the coordinates of the endpoints of the line.
+
+- Draws the line to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet69":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet69":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet69":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet69":::
+
]]>
@@ -6191,33 +6191,33 @@
Array of structures that represent the points to connect.
Draws a series of line segments that connect an array of structures.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates an array of points of segments of the line.
-
-- Draws the connected line segments to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates an array of points of segments of the line.
+
+- Draws the connected line segments to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet70":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet70":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet70":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet70":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -6257,33 +6257,33 @@
Array of structures that represent the points to connect.
Draws a series of line segments that connect an array of structures.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Code creates a black pen.
-
-- Creates an array of points of segments of the line.
-
-- Draws the connected line segments to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Code creates a black pen.
+
+- Creates an array of points of segments of the line.
+
+- Draws the connected line segments to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet71":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet71":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet71":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet71":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -6324,33 +6324,33 @@
to draw.
Draws a .
- before it is drawn.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a graphics path object and adds an ellipse to it.
-
-- Creates a black pen.
-
-- Draws the graphics path to the screen.
-
+ before it is drawn.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a graphics path object and adds an ellipse to it.
+
+- Creates a black pen.
+
+- Draws the graphics path to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet72":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet72":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet72":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet72":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -6404,30 +6404,30 @@
Angle measured in degrees clockwise from the parameter to the second side of the pie shape.
Draws a pie shape defined by an ellipse specified by a structure and two radial lines.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates a rectangle that bounds a complete ellipse.
-
-- Defines the angles at which to start drawing (relative to the x axis) and through which to draw (both in a clockwise direction).
-
-- Draws the pie segment to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates a rectangle that bounds a complete ellipse.
+
+- Defines the angles at which to start drawing (relative to the x axis) and through which to draw (both in a clockwise direction).
+
+- Draws the pie segment to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet73":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet73":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet73":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet73":::
+
]]>
@@ -6475,30 +6475,30 @@
Angle measured in degrees clockwise from the parameter to the second side of the pie shape.
Draws a pie shape defined by an ellipse specified by a structure and two radial lines.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates a rectangle that bounds a complete ellipse.
-
-- Defines the angles at which to start drawing (relative to the x axis) and through which to draw (both in a clockwise direction).
-
-- Draws the pie segment to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates a rectangle that bounds a complete ellipse.
+
+- Defines the angles at which to start drawing (relative to the x axis) and through which to draw (both in a clockwise direction).
+
+- Draws the pie segment to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet74":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet74":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet74":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet74":::
+
]]>
@@ -6551,30 +6551,30 @@
Angle measured in degrees clockwise from the parameter to the second side of the pie shape.
Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates the position and size of a rectangle that bounds a complete ellipse.
-
-- Defines the angles at which to start drawing (relative to the x axis) and through which to draw (both in a clockwise direction).
-
-- Draws the pie shape to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates the position and size of a rectangle that bounds a complete ellipse.
+
+- Defines the angles at which to start drawing (relative to the x axis) and through which to draw (both in a clockwise direction).
+
+- Draws the pie shape to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet75":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet75":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet75":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet75":::
+
]]>
@@ -6627,30 +6627,30 @@
Angle measured in degrees clockwise from the parameter to the second side of the pie shape.
Draws a pie shape defined by an ellipse specified by a coordinate pair, a width, a height, and two radial lines.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates the position and size of a rectangle that bounds a complete ellipse.
-
-- Defines the angles at which to start drawing (relative to the x axis) and through which to draw (both in a clockwise direction).
-
-- Draws the pie segment to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates the position and size of a rectangle that bounds a complete ellipse.
+
+- Defines the angles at which to start drawing (relative to the x axis) and through which to draw (both in a clockwise direction).
+
+- Draws the pie segment to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet76":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet76":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet76":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet76":::
+
]]>
@@ -6702,26 +6702,26 @@
Array of structures that represent the vertices of the polygon.
Draws a polygon defined by an array of structures.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates an array of seven points for the vertices of the polygon.
-
-- Draws the polygon to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates an array of seven points for the vertices of the polygon.
+
+- Draws the polygon to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet78":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet78":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet78":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet78":::
+
]]>
@@ -6764,33 +6764,33 @@
Array of structures that represent the vertices of the polygon.
Draws a polygon defined by an array of structures.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates an array of seven points for the vertices of the polygon.
-
-- Draws the polygon to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates an array of seven points for the vertices of the polygon.
+
+- Draws the polygon to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet77":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet77":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet77":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet77":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -6838,26 +6838,26 @@
A structure that represents the rectangle to draw.
Draws a rectangle specified by a structure.
- , see .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates a rectangle.
-
-- Draws the rectangle to the screen.
-
+ , see .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates a rectangle.
+
+- Draws the rectangle to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet79":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet79":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet79":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet79":::
+
]]>
@@ -6906,26 +6906,26 @@
Height of the rectangle to draw.
Draws a rectangle specified by a coordinate pair, a width, and a height.
- , see .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates the position and size of a rectangle.
-
-- Draws the rectangle to the screen.
-
+ , see .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates the position and size of a rectangle.
+
+- Draws the rectangle to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet80":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet80":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet80":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet80":::
+
]]>
@@ -6973,26 +6973,26 @@
The height of the rectangle to draw.
Draws a rectangle specified by a coordinate pair, a width, and a height.
- , see .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates the position and size of a rectangle.
-
-- Draws the rectangle to the screen.
-
+ , see .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates the position and size of a rectangle.
+
+- Draws the rectangle to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet81":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet81":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet81":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet81":::
+
]]>
@@ -7044,28 +7044,28 @@
Array of structures that represent the rectangles to draw.
Draws a series of rectangles specified by structures.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates an array of three rectangles.
-
-- Draws the rectangles to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates an array of three rectangles.
+
+- Draws the rectangles to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet82":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet82":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet82":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet82":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
is a zero-length array.
@@ -7107,28 +7107,28 @@
Array of structures that represent the rectangles to draw.
Draws a series of rectangles specified by structures.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a black pen.
-
-- Creates an array of three rectangles.
-
-- Draws the rectangles to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a black pen.
+
+- Creates an array of three rectangles.
+
+- Draws the rectangles to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet83":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet83":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet83":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet83":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
is a zero-length array.
@@ -7186,32 +7186,32 @@
structure that specifies the upper-left corner of the drawn text.
Draws the specified text string at the specified location with the specified and objects.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a text string to draw.
-
-- Defines the font as Arial (16pt).
-
-- Creates a solid, black brush to draw with.
-
-- Creates a point for the upper-left corner at which to draw the text.
-
-- Draws the string to the screen using the font, brush, and destination point.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a text string to draw.
+
+- Defines the font as Arial (16pt).
+
+- Creates a solid, black brush to draw with.
+
+- Creates a point for the upper-left corner at which to draw the text.
+
+- Draws the string to the screen using the font, brush, and destination point.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet84":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet84":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet84":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet84":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
Using Fonts and Text
@@ -7266,39 +7266,39 @@
structure that specifies the location of the drawn text.
Draws the specified text string in the specified rectangle with the specified and objects.
- overload that takes a .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a text string to draw.
-
-- Defines the font as Arial (16pt).
-
-- Creates a solid, black brush to draw with.
-
-- Creates a rectangle in which to draw the text.
-
-- Draws the rectangle to the screen.
-
-- Draws the string to the screen using the font, brush, and destination rectangle.
-
+ overload that takes a .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a text string to draw.
+
+- Defines the font as Arial (16pt).
+
+- Creates a solid, black brush to draw with.
+
+- Creates a rectangle in which to draw the text.
+
+- Draws the rectangle to the screen.
+
+- Draws the string to the screen using the font, brush, and destination rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet86":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet86":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet86":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet86":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
Using Fonts and Text
@@ -7350,34 +7350,34 @@
that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.
Draws the specified text string at the specified location with the specified and objects using the formatting attributes of the specified .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a text string to draw.
-
-- Defines the font as Arial (16pt).
-
-- Creates a solid, black brush to draw with.
-
-- Creates a point for the upper-left corner at which to draw the text.
-
-- Sets the format of the string to draw vertically.
-
-- Draws the string to the screen using the font, brush, destination point, and format.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a text string to draw.
+
+- Defines the font as Arial (16pt).
+
+- Creates a solid, black brush to draw with.
+
+- Creates a point for the upper-left corner at which to draw the text.
+
+- Sets the format of the string to draw vertically.
+
+- Draws the string to the screen using the font, brush, destination point, and format.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet85":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet85":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet85":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet85":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
Using Fonts and Text
@@ -7429,41 +7429,41 @@
that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.
Draws the specified text string in the specified rectangle with the specified and objects using the formatting attributes of the specified .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a text string to draw.
-
-- Defines the font as Arial (16pt).
-
-- Creates a solid, black brush to draw with.
-
-- Creates a rectangle in which to draw the text.
-
-- Draws the rectangle to the screen.
-
-- Sets the format of the string to center it within the rectangle.
-
-- Draws the string to the screen using the font, brush, and destination rectangle.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a text string to draw.
+
+- Defines the font as Arial (16pt).
+
+- Creates a solid, black brush to draw with.
+
+- Creates a rectangle in which to draw the text.
+
+- Draws the rectangle to the screen.
+
+- Sets the format of the string to center it within the rectangle.
+
+- Draws the string to the screen using the font, brush, and destination rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet87":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet87":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet87":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet87":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
Using Fonts and Text
@@ -7513,32 +7513,32 @@
The y-coordinate of the upper-left corner of the drawn text.
Draws the specified text string at the specified location with the specified and objects.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a text string to draw.
-
-- Defines the font as Arial (16pt).
-
-- Creates a solid black brush to draw with.
-
-- Creates a point for the upper-left corner at which to draw the text.
-
-- Draws the string to the screen using the font, brush, and destination point.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a text string to draw.
+
+- Defines the font as Arial (16pt).
+
+- Creates a solid black brush to draw with.
+
+- Creates a point for the upper-left corner at which to draw the text.
+
+- Draws the string to the screen using the font, brush, and destination point.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet88":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet88":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet88":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet88":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
Using Fonts and Text
@@ -7591,34 +7591,34 @@
that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.
Draws the specified text string at the specified location with the specified and objects using the formatting attributes of the specified .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a text string to draw.
-
-- Defines the font as Arial (16pt).
-
-- Creates a solid, black brush to draw with.
-
-- Creates the coordinates of a point for the upper-left corner at which to draw the text.
-
-- Sets the format of the string to draw vertically
-
-- Draws the string to the screen using the font, brush, destination point, and format.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a text string to draw.
+
+- Defines the font as Arial (16pt).
+
+- Creates a solid, black brush to draw with.
+
+- Creates the coordinates of a point for the upper-left corner at which to draw the text.
+
+- Sets the format of the string to draw vertically
+
+- Draws the string to the screen using the font, brush, destination point, and format.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet89":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet89":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet89":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet89":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
Using Fonts and Text
@@ -7658,40 +7658,40 @@
that represents the container this method restores.
Closes the current graphics container and restores the state of this to the state saved by a call to the method.
- method to create nested graphics containers. Graphics containers retain graphics state, such as transformation, clipping region, and rendering properties.
-
- When you call the method of a , an information block that holds the state of the is put on a stack. The method returns a that identifies that information block. When you pass the identifying object to the method, the information block is removed from the stack and is used to restore the to the state it was in at the time of the method call.
-
- Containers can be nested; that is, you can call the method several times before you call the method. Each time you call the method, an information block is put on the stack, and you receive a for the information block. When you pass one of those objects to the method, the is returned to the state it was in at the time of the method call that returned that particular . The information block placed on the stack by that method call is removed from the stack, and all information blocks placed on that stack after that method call are also removed.
-
- Calls to the method place information blocks on the same stack as calls to the method. Just as an method call is paired with a method call, a method call is paired with a method call.
-
- When you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack. Likewise, when you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Opens a new graphics container and saves the old container.
-
-- Translates the world coordinates in the container.
-
-- Fills a red rectangle in the (translated coordinates of the) new container.
-
-- Closes the new container and restores the saved container.
-
-- Fills a green rectangle (to the untranslated coordinates) of the saved container.
-
- The result is a green rectangle that overlies a red rectangle of the same size.
-
+ method to create nested graphics containers. Graphics containers retain graphics state, such as transformation, clipping region, and rendering properties.
+
+ When you call the method of a , an information block that holds the state of the is put on a stack. The method returns a that identifies that information block. When you pass the identifying object to the method, the information block is removed from the stack and is used to restore the to the state it was in at the time of the method call.
+
+ Containers can be nested; that is, you can call the method several times before you call the method. Each time you call the method, an information block is put on the stack, and you receive a for the information block. When you pass one of those objects to the method, the is returned to the state it was in at the time of the method call that returned that particular . The information block placed on the stack by that method call is removed from the stack, and all information blocks placed on that stack after that method call are also removed.
+
+ Calls to the method place information blocks on the same stack as calls to the method. Just as an method call is paired with a method call, a method call is paired with a method call.
+
+ When you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack. Likewise, when you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Opens a new graphics container and saves the old container.
+
+- Translates the world coordinates in the container.
+
+- Fills a red rectangle in the (translated coordinates of the) new container.
+
+- Closes the new container and restores the saved container.
+
+- Fills a green rectangle (to the untranslated coordinates) of the saved container.
+
+ The result is a green rectangle that overlies a red rectangle of the same size.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet90":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet90":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet90":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet90":::
+
]]>
@@ -7745,21 +7745,21 @@
delegate that specifies the method to which the metafile records are sent.
Sends the records in the specified , one at a time, to a callback method for display at a specified point.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
-
-
-## Examples
- The following code example creates a form that has a as one of its private members. The method calls , which calls the form's `MetafileCallback` method for each record in the metafile. The `MetafileCallback` method calls the method. Notice that the `MetafileCallback` method receives the record data as an , but the method expects the record data to be a byte array. The call to copies the record data to a byte array so that it can be passed to .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+
+
+## Examples
+ The following code example creates a form that has a as one of its private members. The method calls , which calls the form's `MetafileCallback` method for each record in the metafile. The `MetafileCallback` method calls the method. Notice that the `MetafileCallback` method receives the record data as an , but the method expects the record data to be a byte array. The call to copies the record data to a byte array so that it can be passed to .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Graphics.EnumerateMetafile/CS/Form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Graphics.EnumerateMetafile/VB/Form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Graphics.EnumerateMetafile/VB/Form1.vb" id="Snippet1":::
+
]]>
Images, Bitmaps, and Metafiles
@@ -7804,18 +7804,18 @@
delegate that specifies the method to which the metafile records are sent.
Sends the records in the specified , one at a time, to a callback method for display in a specified parallelogram.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -7861,18 +7861,18 @@
delegate that specifies the method to which the metafile records are sent.
Sends the records in the specified , one at a time, to a callback method for display at a specified point.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -7917,20 +7917,20 @@
delegate that specifies the method to which the metafile records are sent.
Sends the records in the specified , one at a time, to a callback method for display in a specified parallelogram.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -7976,18 +7976,18 @@
delegate that specifies the method to which the metafile records are sent.
Sends the records of the specified , one at a time, to a callback method for display in a specified rectangle.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -8033,18 +8033,18 @@
delegate that specifies the method to which the metafile records are sent.
Sends the records of the specified , one at a time, to a callback method for display in a specified rectangle.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -8098,18 +8098,18 @@
Internal pointer that is required, but ignored. You can pass for this parameter.
Sends the records in the specified , one at a time, to a callback method for display at a specified point.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -8162,18 +8162,18 @@
Internal pointer that is required, but ignored. You can pass for this parameter.
Sends the records in the specified , one at a time, to a callback method for display in a specified parallelogram.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
@@ -8226,18 +8226,18 @@
Internal pointer that is required, but ignored. You can pass for this parameter.
Sends the records in the specified , one at a time, to a callback method for display at a specified point.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -8284,20 +8284,20 @@
Internal pointer that is required, but ignored. You can pass for this parameter.
Sends the records in the specified , one at a time, to a callback method for display in a specified parallelogram.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -8351,18 +8351,18 @@
Internal pointer that is required, but ignored. You can pass for this parameter.
Sends the records of the specified , one at a time, to a callback method for display in a specified rectangle.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -8416,18 +8416,18 @@
Internal pointer that is required, but ignored. You can pass for this parameter.
Sends the records of the specified , one at a time, to a callback method for display in a specified rectangle.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -8479,18 +8479,18 @@
that specifies image attribute information for the drawn image.
Sends the records in the specified , one at a time, to a callback method for display at a specified point using specified image attributes.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -8541,18 +8541,18 @@
delegate that specifies the method to which the metafile records are sent.
Sends the records in a selected rectangle from a , one at a time, to a callback method for display at a specified point.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
@@ -8602,22 +8602,22 @@
that specifies image attribute information for the drawn image.
Sends the records in the specified , one at a time, to a callback method for display in a specified parallelogram using specified image attributes.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
-
- The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
+
+ The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -8667,22 +8667,22 @@
delegate that specifies the method to which the metafile records are sent.
Sends the records in a selected rectangle from a , one at a time, to a callback method for display in a specified parallelogram.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
-
- Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
+
+ Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
@@ -8733,20 +8733,20 @@
that specifies image attribute information for the drawn image.
Sends the records in the specified , one at a time, to a callback method for display at a specified point using specified image attributes.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -8797,20 +8797,20 @@
delegate that specifies the method to which the metafile records are sent.
Sends the records in a selected rectangle from a , one at a time, to a callback method for display at a specified point.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
@@ -8860,22 +8860,22 @@
that specifies image attribute information for the drawn image.
Sends the records in the specified , one at a time, to a callback method for display in a specified parallelogram using specified image attributes.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
-
- The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
+
+ The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -8925,22 +8925,22 @@
delegate that specifies the method to which the metafile records are sent.
Sends the records in a selected rectangle from a , one at a time, to a callback method for display in a specified parallelogram.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
-
- Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
+
+ Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -8992,20 +8992,20 @@
that specifies image attribute information for the drawn image.
Sends the records of the specified , one at a time, to a callback method for display in a specified rectangle using specified image attributes.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -9056,20 +9056,20 @@
delegate that specifies the method to which the metafile records are sent.
Sends the records of a selected rectangle from a , one at a time, to a callback method for display in a specified rectangle.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -9121,20 +9121,20 @@
that specifies image attribute information for the drawn image.
Sends the records of the specified , one at a time, to a callback method for display in a specified rectangle using specified image attributes.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -9185,20 +9185,20 @@
delegate that specifies the method to which the metafile records are sent.
Sends the records of a selected rectangle from a , one at a time, to a callback method for display in a specified rectangle.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -9257,18 +9257,18 @@
Internal pointer that is required, but ignored. You can pass for this parameter.
Sends the records in a selected rectangle from a , one at a time, to a callback method for display at a specified point.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -9326,22 +9326,22 @@
Internal pointer that is required, but ignored. You can pass for this parameter.
Sends the records in a selected rectangle from a , one at a time, to a callback method for display in a specified parallelogram.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
-
- Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
+
+ Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -9400,20 +9400,20 @@
Internal pointer that is required, but ignored. You can pass for this parameter.
Sends the records in a selected rectangle from a , one at a time, to a callback method for display at a specified point.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -9471,22 +9471,22 @@
Internal pointer that is required, but ignored. You can pass for this parameter.
Sends the records in a selected rectangle from a , one at a time, to a callback method for display in a specified parallelogram.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
-
- Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
+
+ Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -9545,20 +9545,20 @@
Internal pointer that is required, but ignored. You can pass for this parameter.
Sends the records of a selected rectangle from a , one at a time, to a callback method for display in a specified rectangle.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -9617,20 +9617,20 @@
Internal pointer that is required, but ignored. You can pass for this parameter.
Sends the records of a selected rectangle from a , one at a time, to a callback method for display in a specified rectangle.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -9687,18 +9687,18 @@
that specifies image attribute information for the drawn image.
Sends the records in a selected rectangle from a , one at a time, to a callback method for display at a specified point using specified image attributes.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
@@ -9753,24 +9753,24 @@
that specifies image attribute information for the drawn image.
Sends the records in a selected rectangle from a , one at a time, to a callback method for display in a specified parallelogram using specified image attributes.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
-
- Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
-
- The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
+
+ Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
+
+ The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -9827,22 +9827,22 @@
that specifies image attribute information for the drawn image.
Sends the records in a selected rectangle from a , one at a time, to a callback method for display at a specified point using specified image attributes.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
-
- The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
+
+ The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
@@ -9897,24 +9897,24 @@
that specifies image attribute information for the drawn image.
Sends the records in a selected rectangle from a , one at a time, to a callback method for display in a specified parallelogram using specified image attributes.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
-
- Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
-
- The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ The `destPoints` parameter specifies three points of a parallelogram. The three structures represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point is extrapolated from the first three to form a parallelogram. The drawn metafile is scaled and sheared to fit the parallelogram.
+
+ Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
+
+ The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -9971,22 +9971,22 @@
that specifies image attribute information for the drawn image.
Sends the records of a selected rectangle from a , one at a time, to a callback method for display in a specified rectangle using specified image attributes.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
-
- The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
+
+ The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -10043,22 +10043,22 @@
that specifies image attribute information for the drawn image.
Sends the records of a selected rectangle from a , one at a time, to a callback method for display in a specified rectangle using specified image attributes.
- method to "play back", or draw, the record.
-
- If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
-
- Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
-
- The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
-
-
-
-## Examples
- For a code example, see .
-
+ method to "play back", or draw, the record.
+
+ If the callback method calls , it must do so by calling the method of the specific that is being enumerated.
+
+ Any drawing that takes place outside of the rectangle specified by the `srcRect` parameter is ignored.
+
+ The image attributes specified by the `imageAttr` parameter replace those specified when the metafile was written.
+
+
+
+## Examples
+ For a code example, see .
+
]]>
Images, Bitmaps, and Metafiles
@@ -10107,30 +10107,30 @@
structure that specifies the rectangle to exclude from the clip region.
Updates the clip region of this to exclude the area specified by a structure.
- property of this .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a 100 pixel by 100 pixel rectangle whose upper-left corner is at the coordinate (100, 100).
-
-- Creates a region defined by the rectangle.
-
-- Sets the clipping region to exclude the rectangular region.
-
-- Fills a 300 pixel by 300 pixel rectangle whose upper-left corner is at the coordinate (0, 0) with a solid blue brush.
-
- The result is a blue rectangle with a square region toward its lower-right corner missing.
-
+ property of this .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a 100 pixel by 100 pixel rectangle whose upper-left corner is at the coordinate (100, 100).
+
+- Creates a region defined by the rectangle.
+
+- Sets the clipping region to exclude the rectangular region.
+
+- Fills a 300 pixel by 300 pixel rectangle whose upper-left corner is at the coordinate (0, 0) with a solid blue brush.
+
+ The result is a blue rectangle with a square region toward its lower-right corner missing.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet92":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet92":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet92":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet92":::
+
]]>
@@ -10169,28 +10169,28 @@
that specifies the region to exclude from the clip region.
Updates the clip region of this to exclude the area specified by a .
- property of this .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a 100 pixel by 100 pixel rectangle whose upper-left corner is at the coordinate (100, 100).
-
-- Sets the clipping region to exclude the rectangle.
-
-- Fills a 300 pixel by 300 pixel rectangle whose upper-left corner is at the coordinate (0, 0) with a solid blue brush.
-
- The result is a blue rectangle with a square area toward its lower-right corner missing.
-
+ property of this .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a 100 pixel by 100 pixel rectangle whose upper-left corner is at the coordinate (100, 100).
+
+- Sets the clipping region to exclude the rectangle.
+
+- Fills a 300 pixel by 300 pixel rectangle whose upper-left corner is at the coordinate (0, 0) with a solid blue brush.
+
+ The result is a blue rectangle with a square area toward its lower-right corner missing.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet91":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet91":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet91":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet91":::
+
]]>
@@ -10240,39 +10240,39 @@
Array of structures that define the spline.
Fills the interior of a closed cardinal spline curve defined by an array of structures.
- structures.
-
- This method uses a default tension of 0.5.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a solid red brush.
-
-- Creates an array of four points to define a spline.
-
-- Fills the curve on the screen.
-
- The curve has a default tension of 0.5.
-
+ structures.
+
+ This method uses a default tension of 0.5.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a solid red brush.
+
+- Creates an array of four points to define a spline.
+
+- Fills the curve on the screen.
+
+ The curve has a default tension of 0.5.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet93":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet93":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet93":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet93":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -10312,39 +10312,39 @@
Array of structures that define the spline.
Fills the interior of a closed cardinal spline curve defined by an array of structures.
- structures.
-
- This method uses a default tension of 0.5.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a solid red brush.
-
-- Creates an array of four points to define a spline.
-
-- Fills the curve on the screen.
-
- The curve has a default tension of 0.5.
-
+ structures.
+
+ This method uses a default tension of 0.5.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a solid red brush.
+
+- Creates an array of four points to define a spline.
+
+- Fills the curve on the screen.
+
+ The curve has a default tension of 0.5.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet96":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet96":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet96":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet96":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -10392,41 +10392,41 @@
Member of the enumeration that determines how the curve is filled.
Fills the interior of a closed cardinal spline curve defined by an array of structures using the specified fill mode.
- structures.
-
- This method uses a default tension of 0.5.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a solid red brush.
-
-- Creates an array of four points to define a spline.
-
-- Sets the fill mode to .
-
-- Fills the curve on the screen.
-
- The curve has a default tension of 0.5.
-
+ structures.
+
+ This method uses a default tension of 0.5.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a solid red brush.
+
+- Creates an array of four points to define a spline.
+
+- Sets the fill mode to .
+
+- Fills the curve on the screen.
+
+ The curve has a default tension of 0.5.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet94":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet94":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet94":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet94":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -10474,41 +10474,41 @@
Member of the enumeration that determines how the curve is filled.
Fills the interior of a closed cardinal spline curve defined by an array of structures using the specified fill mode.
- structures.
-
- This method uses a default tension of 0.5.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a solid red brush.
-
-- Creates an array of four points to define a spline.
-
-- Sets the fill mode to .
-
-- Fills the curve on the screen.
-
- The curve has a default tension of 0.5.
-
+ structures.
+
+ This method uses a default tension of 0.5.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a solid red brush.
+
+- Creates an array of four points to define a spline.
+
+- Sets the fill mode to .
+
+- Fills the curve on the screen.
+
+ The curve has a default tension of 0.5.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet97":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet97":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet97":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet97":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -10552,41 +10552,41 @@
Value greater than or equal to 0.0F that specifies the tension of the curve.
Fills the interior of a closed cardinal spline curve defined by an array of structures using the specified fill mode and tension.
- structures.
-
- The `tension` parameter determines the shape of the spline. If the value of the `tension` parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the `tension` parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a solid red brush.
-
-- Creates an array of four points to define a spline.
-
-- Sets the fill mode to .
-
-- Sets the tension to 1.0.
-
-- Fills the curve on the screen.
-
+ structures.
+
+ The `tension` parameter determines the shape of the spline. If the value of the `tension` parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the `tension` parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a solid red brush.
+
+- Creates an array of four points to define a spline.
+
+- Sets the fill mode to .
+
+- Sets the tension to 1.0.
+
+- Fills the curve on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet95":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet95":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet95":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet95":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -10629,41 +10629,41 @@
Value greater than or equal to 0.0F that specifies the tension of the curve.
Fills the interior of a closed cardinal spline curve defined by an array of structures using the specified fill mode and tension.
- structures.
-
- The `tension` parameter determines the shape of the spline. If the value of the `tension` parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the `tension` parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a solid red brush.
-
-- Creates an array of four points to define a spline.
-
-- Sets the fill mode to .
-
-- Sets the tension to 1.0.
-
-- Fills the curve on the screen.
-
+ structures.
+
+ The `tension` parameter determines the shape of the spline. If the value of the `tension` parameter is 0.0F, this method draws straight line segments to connect the points. Usually, the `tension` parameter is less than or equal to 1.0F. Values over 1.0F produce unusual results.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a solid red brush.
+
+- Creates an array of four points to define a spline.
+
+- Sets the fill mode to .
+
+- Sets the tension to 1.0.
+
+- Fills the curve on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet98":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet98":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet98":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet98":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -10713,26 +10713,26 @@
structure that represents the bounding rectangle that defines the ellipse.
Fills the interior of an ellipse defined by a bounding rectangle specified by a structure.
- . The ellipse is defined by the bounding rectangle represented by the `rect` parameter.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a solid red brush.
-
-- Creates a rectangle that bounds an ellipse.
-
-- Fills the ellipse on the screen.
-
+ . The ellipse is defined by the bounding rectangle represented by the `rect` parameter.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a solid red brush.
+
+- Creates a rectangle that bounds an ellipse.
+
+- Fills the ellipse on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet99":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet99":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet99":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet99":::
+
]]>
@@ -10776,26 +10776,26 @@
structure that represents the bounding rectangle that defines the ellipse.
Fills the interior of an ellipse defined by a bounding rectangle specified by a structure.
- . The ellipse is defined by the bounding rectangle represented by the `rect` parameter.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a solid red brush.
-
-- Creates a rectangle that bounds an ellipse.
-
-- Fills the ellipse on the screen.
-
+ . The ellipse is defined by the bounding rectangle represented by the `rect` parameter.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a solid red brush.
+
+- Creates a rectangle that bounds an ellipse.
+
+- Fills the ellipse on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet100":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet100":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet100":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet100":::
+
]]>
@@ -10844,26 +10844,26 @@
Height of the bounding rectangle that defines the ellipse.
Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
- . The ellipse is defined by the bounding rectangle represented by the `x`, `y`, `width`, and `height` parameters.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a solid red brush.
-
-- Creates the location and size of a rectangle that bounds an ellipse.
-
-- Fills the ellipse on the screen.
-
+ . The ellipse is defined by the bounding rectangle represented by the `x`, `y`, `width`, and `height` parameters.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a solid red brush.
+
+- Creates the location and size of a rectangle that bounds an ellipse.
+
+- Fills the ellipse on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet101":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet101":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet101":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet101":::
+
]]>
@@ -10912,26 +10912,26 @@
Height of the bounding rectangle that defines the ellipse.
Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
- . The ellipse is defined by the bounding rectangle represented by the `x`, `y`, `width`, and `height` parameters.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a solid red brush.
-
-- Creates the location and size of a rectangle that bounds an ellipse.
-
-- Fills the ellipse on the screen.
-
+ . The ellipse is defined by the bounding rectangle represented by the `x`, `y`, `width`, and `height` parameters.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a solid red brush.
+
+- Creates the location and size of a rectangle that bounds an ellipse.
+
+- Fills the ellipse on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet102":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet102":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet102":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet102":::
+
]]>
@@ -10975,35 +10975,35 @@
that represents the path to fill.
Fills the interior of a .
- consists of a series of line and curve segments. If the path represented by the `path` parameter is not closed, an additional segment is added from the last point to the first point to close the path.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a solid red brush.
-
-- Creates a graphics path object.
-
-- Adds an ellipse to the graphics path.
-
-- Fills the path on the screen.
-
+ consists of a series of line and curve segments. If the path represented by the `path` parameter is not closed, an additional segment is added from the last point to the first point to close the path.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a solid red brush.
+
+- Creates a graphics path object.
+
+- Adds an ellipse to the graphics path.
+
+- Fills the path on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet103":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet103":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet103":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet103":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -11057,30 +11057,30 @@
Angle in degrees measured clockwise from the parameter to the second side of the pie section.
Fills the interior of a pie section defined by an ellipse specified by a structure and two radial lines.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a solid red brush.
-
-- Creates a rectangle that bounds an ellipse.
-
-- Defines the start angle (relative to the x axis) and the sweep angle (both in a clockwise direction).
-
-- Fills the pie-shaped area of the ellipse on the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a solid red brush.
+
+- Creates a rectangle that bounds an ellipse.
+
+- Defines the start angle (relative to the x axis) and the sweep angle (both in a clockwise direction).
+
+- Fills the pie-shaped area of the ellipse on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet104":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet104":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet104":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet104":::
+
]]>
@@ -11133,30 +11133,30 @@
Angle in degrees measured clockwise from the parameter to the second side of the pie section.
Fills the interior of a pie section defined by an ellipse specified by a pair of coordinates, a width, a height, and two radial lines.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a solid red brush.
-
-- Creates the location and size of a rectangle that bounds an ellipse.
-
-- Defines the start angle (relative to the x axis) and the sweep angle (both in a clockwise direction).
-
-- Fills the pie-shaped area of the ellipse on the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a solid red brush.
+
+- Creates the location and size of a rectangle that bounds an ellipse.
+
+- Defines the start angle (relative to the x axis) and the sweep angle (both in a clockwise direction).
+
+- Fills the pie-shaped area of the ellipse on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet105":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet105":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet105":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet105":::
+
]]>
@@ -11209,30 +11209,30 @@
Angle in degrees measured clockwise from the parameter to the second side of the pie section.
Fills the interior of a pie section defined by an ellipse specified by a pair of coordinates, a width, a height, and two radial lines.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a solid red brush.
-
-- Creates the location and size of a rectangle that bounds an ellipse.
-
-- Defines the start angle (relative to the x axis) and the sweep angle (both in a clockwise direction).
-
-- Fills the pie-shaped area of the ellipse on the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a solid red brush.
+
+- Creates the location and size of a rectangle that bounds an ellipse.
+
+- Defines the start angle (relative to the x axis) and the sweep angle (both in a clockwise direction).
+
+- Fills the pie-shaped area of the ellipse on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet106":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet106":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet106":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet106":::
+
]]>
@@ -11290,33 +11290,33 @@
Array of structures that represent the vertices of the polygon to fill.
Fills the interior of a polygon defined by an array of points specified by structures.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a solid blue brush.
-
-- Creates an array of seven points to define a polygon.
-
-- Fills the polygonal area on the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a solid blue brush.
+
+- Creates an array of seven points to define a polygon.
+
+- Fills the polygonal area on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet107":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet107":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet107":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet107":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -11362,33 +11362,33 @@
Array of structures that represent the vertices of the polygon to fill.
Fills the interior of a polygon defined by an array of points specified by structures.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a solid blue brush.
-
-- Creates an array of seven points to define a polygon.
-
-- Fills the polygonal area on the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a solid blue brush.
+
+- Creates an array of seven points to define a polygon.
+
+- Fills the polygonal area on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet109":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet109":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet109":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet109":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -11430,35 +11430,35 @@
Member of the enumeration that determines the style of the fill.
Fills the interior of a polygon defined by an array of points specified by structures using the specified fill mode.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a solid blue brush.
-
-- Creates an array of seven points to define a polygon.
-
-- Sets the fill mode to .
-
-- Fills the polygonal area on the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a solid blue brush.
+
+- Creates an array of seven points to define a polygon.
+
+- Sets the fill mode to .
+
+- Fills the polygonal area on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet108":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet108":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet108":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet108":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -11500,35 +11500,35 @@
Member of the enumeration that determines the style of the fill.
Fills the interior of a polygon defined by an array of points specified by structures using the specified fill mode.
- `e`, which is a parameter of the event handler. The code performs the following action:
-
-- Creates a solid blue brush.
-
-- Creates an array of seven points to define a polygon.
-
-- Sets the fill mode to .
-
-- Fills the polygonal area on the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following action:
+
+- Creates a solid blue brush.
+
+- Creates an array of seven points to define a polygon.
+
+- Sets the fill mode to .
+
+- Fills the polygonal area on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CPP/form1.cpp" id="Snippet110":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/CS/form1.cs" id="Snippet110":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet110":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples2/VB/form1.vb" id="Snippet110":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -11578,26 +11578,26 @@
structure that represents the rectangle to fill.
Fills the interior of a rectangle specified by a structure.
- `e`, which is a parameter of the event handler. The code performs the following action:
-
-- Creates a solid blue brush.
-
-- Creates a rectangle.
-
-- Fills the rectangular area on the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following action:
+
+- Creates a solid blue brush.
+
+- Creates a rectangle.
+
+- Fills the rectangular area on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet111":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet111":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet111":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet111":::
+
]]>
@@ -11641,26 +11641,26 @@
structure that represents the rectangle to fill.
Fills the interior of a rectangle specified by a structure.
- `e`, which is a parameter of the event handler. The code performs the following action:
-
-- Creates a solid blue brush.
-
-- Creates a rectangle.
-
-- Fills the rectangular area on the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following action:
+
+- Creates a solid blue brush.
+
+- Creates a rectangle.
+
+- Fills the rectangular area on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet112":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet112":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet112":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet112":::
+
]]>
@@ -11709,26 +11709,26 @@
Height of the rectangle to fill.
Fills the interior of a rectangle specified by a pair of coordinates, a width, and a height.
- `e`, which is a parameter of the event handler. The code performs the following action:
-
-- Creates a solid blue brush.
-
-- Creates the location and size of a rectangle.
-
-- Fills the rectangular area on the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following action:
+
+- Creates a solid blue brush.
+
+- Creates the location and size of a rectangle.
+
+- Fills the rectangular area on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet113":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet113":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet113":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet113":::
+
]]>
@@ -11777,26 +11777,26 @@
Height of the rectangle to fill.
Fills the interior of a rectangle specified by a pair of coordinates, a width, and a height.
- `e`, which is a parameter of the event handler. The code performs the following action:
-
-- Creates a solid blue brush.
-
-- Creates the location and size of a rectangle.
-
-- Fills the rectangular area on the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following action:
+
+- Creates a solid blue brush.
+
+- Creates the location and size of a rectangle.
+
+- Fills the rectangular area on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet114":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet114":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet114":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet114":::
+
]]>
@@ -11848,28 +11848,28 @@
Array of structures that represent the rectangles to fill.
Fills the interiors of a series of rectangles specified by structures.
- `e`, which is a parameter of the event handler. The code performs the following action:
-
-- Creates a solid blue brush.
-
-- Creates an array of three rectangles.
-
-- Fills the three rectangular areas on the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following action:
+
+- Creates a solid blue brush.
+
+- Creates an array of three rectangles.
+
+- Fills the three rectangular areas on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet115":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet115":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet115":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet115":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
is a zero-length array.
@@ -11911,28 +11911,28 @@
Array of structures that represent the rectangles to fill.
Fills the interiors of a series of rectangles specified by structures.
- `e`, which is a parameter of the event handler. The code performs the following action:
-
-- Creates a solid blue brush.
-
-- Creates an array of three rectangles.
-
-- Fills the three rectangular areas on the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following action:
+
+- Creates a solid blue brush.
+
+- Creates an array of three rectangles.
+
+- Fills the three rectangular areas on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet116":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet116":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet116":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet116":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
is a zero-length array.
@@ -11975,35 +11975,35 @@
that represents the area to fill.
Fills the interior of a .
- is composed of rectangles and paths. If the region is not closed, an additional segment is added from the last point to the first point to close it.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following action:
-
-- Creates a solid blue brush.
-
-- Creates a rectangle.
-
-- Creates a rectangular region.
-
-- Fills the rectangular region on the screen.
-
+ is composed of rectangles and paths. If the region is not closed, an additional segment is added from the last point to the first point to close it.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following action:
+
+- Creates a solid blue brush.
+
+- Creates a rectangle.
+
+- Creates a rectangular region.
+
+- Fills the rectangular region on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet117":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet117":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet117":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet117":::
+
]]>
- is .
-
- -or-
-
+ is .
+
+ -or-
+
is .
@@ -12084,11 +12084,11 @@
Forces execution of all pending graphics operations and returns immediately without waiting for the operations to finish.
-
@@ -12126,11 +12126,11 @@
Member of the enumeration that specifies whether the method returns immediately or waits for any existing operations to finish.
Forces execution of all pending graphics operations with the method waiting or not waiting, as specified, to return before the operations finish.
- for the `intention` parameter specifies that the method return immediately after beginning the flush, while a value of specifies that the method wait before returning until any existing operations finish.
-
+ for the `intention` parameter specifies that the method return immediately after beginning the flush, while a value of specifies that the method wait before returning until any existing operations finish.
+
]]>
@@ -12184,32 +12184,32 @@
Creates a new from the specified handle to a device context.
This method returns a new for the specified device context.
- method to release the and related resources created by the method.
-
- Even if the display device has an associated ICM color profile, GDI+ will not use that profile by default. To enable ICM for a , construct the from an HDC after you pass the HDC (and ICM_ON) to the `SetICMMode` function. Then any drawing done by the will be adjusted according to the ICM profile associated with the display device. Enabling ICM will result in slower performance.
-
- The state of the device context (mapping mode, logical unit, and the like) at the time you call can affect rendering done by the .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following action:
-
-- Creates an internal pointer type variable `hdc` and sets it to the handle to the device context of the graphics object of the form.
-
-- Creates a new graphics object using `hdc`.
-
-- Draws a rectangle with the new graphics object (on the screen).
-
-- Releases the new graphics object using `hdc`.
-
+ method to release the and related resources created by the method.
+
+ Even if the display device has an associated ICM color profile, GDI+ will not use that profile by default. To enable ICM for a , construct the from an HDC after you pass the HDC (and ICM_ON) to the `SetICMMode` function. Then any drawing done by the will be adjusted according to the ICM profile associated with the display device. Enabling ICM will result in slower performance.
+
+ The state of the device context (mapping mode, logical unit, and the like) at the time you call can affect rendering done by the .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following action:
+
+- Creates an internal pointer type variable `hdc` and sets it to the handle to the device context of the graphics object of the form.
+
+- Creates a new graphics object using `hdc`.
+
+- Draws a rectangle with the new graphics object (on the screen).
+
+- Releases the new graphics object using `hdc`.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet118":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet118":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet118":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet118":::
+
]]>
@@ -12256,17 +12256,17 @@
Creates a new from the specified handle to a device context and handle to a device.
This method returns a new for the specified device context and device.
- method to release the and related resources created by the method.
-
- Even if the display device has an associated ICM color profile, GDI+ will not use that profile by default. To enable ICM for a , construct the from an HDC after you pass the HDC (and ICM_ON) to the `SetICMMode` function. Then any drawing done by the will be adjusted according to the ICM profile associated with the display device. Enabling ICM will result in slower performance.
-
- The state of the device context (mapping mode, logical unit, and the like) at the time you call can affect rendering done by the .
-
- The device handle is typically used to query specific printer capabilities.
-
+ method to release the and related resources created by the method.
+
+ Even if the display device has an associated ICM color profile, GDI+ will not use that profile by default. To enable ICM for a , construct the from an HDC after you pass the HDC (and ICM_ON) to the `SetICMMode` function. Then any drawing done by the will be adjusted according to the ICM profile associated with the display device. Enabling ICM will result in slower performance.
+
+ The state of the device context (mapping mode, logical unit, and the like) at the time you call can affect rendering done by the .
+
+ The device handle is typically used to query specific printer capabilities.
+
]]>
@@ -12311,11 +12311,11 @@
Returns a for the specified device context.
A for the specified device context.
-
@@ -12360,28 +12360,28 @@
Creates a new from the specified handle to a window.
This method returns a new for the specified window handle.
- method to release the and related resources created by the method.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler, as well as `thisForm`, the for the example. The code performs the following actions:
-
-- Creates a new internal pointer variable `hwnd` and sets it to the handle of the example's form.
-
-- Creates a new from the handle.
-
-- Draws a rectangle to the new using a red pen.
-
-- Disposes the new .
-
+ method to release the and related resources created by the method.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler, as well as `thisForm`, the for the example. The code performs the following actions:
+
+- Creates a new internal pointer variable `hwnd` and sets it to the handle of the example's form.
+
+- Creates a new from the handle.
+
+- Draws a rectangle to the new using a red pen.
+
+- Disposes the new .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet119":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet119":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet119":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet119":::
+
]]>
@@ -12426,11 +12426,11 @@
Creates a new for the specified windows handle.
A for the specified window handle.
-
@@ -12470,50 +12470,50 @@
Creates a new from the specified .
This method returns a new for the specified .
-
-
--
-
--
-
- You can save the indexed image as another format by using the method and then retrieve a object for the new image.
-
- This method also throws an exception if the image has any of the following pixel formats.
-
--
-
--
-
--
-
--
-
- You should always call the method to release the and related resources created by the method.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following action:
-
-- Creates an from a graphics file SampImag.jpg in the example folder.
-
-- Creates a from the .
-
-- Alters the image by filling a rectangle within it.
-
-- Draws the to the screen.
-
-- Releases the created .
-
+
+
+-
+
+-
+
+ You can save the indexed image as another format by using the method and then retrieve a object for the new image.
+
+ This method also throws an exception if the image has any of the following pixel formats.
+
+-
+
+-
+
+-
+
+-
+
+ You should always call the method to release the and related resources created by the method.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following action:
+
+- Creates an from a graphics file SampImag.jpg in the example folder.
+
+- Creates a from the .
+
+- Alters the image by filling a rectangle within it.
+
+- Draws the to the screen.
+
+- Releases the created .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet120":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet120":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet120":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet120":::
+
]]>
@@ -12521,7 +12521,7 @@
has an indexed pixel format or its format is undefined.
How to: Create a Bitmap at Run Time
- Working with Images, Bitmaps, Icons, and Metafiles
+ Working with Images, Bitmaps, Icons, and Metafiles
How to: Create Graphics Objects for Drawing
@@ -12569,11 +12569,11 @@
Gets the cumulative graphics context.
An representing the cumulative graphics context.
-
@@ -12671,38 +12671,38 @@
Gets a handle to the current Windows halftone palette.
Internal pointer that specifies the handle to the palette.
- method is to enable GDI+ to produce a better quality halftone when the display uses 8 bits per pixel. To display an image using the halftone palette, use the following procedure.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Defines interoperability attributes for the Windows DLL file gdi32.dll, which contains the necessary GDI functions.
-
-- Defines the `SelectPalette` and `RealizePalette` functions in that DLL as external.
-
-- Creates an image from an existing image file SampImag.jpg (which must be in the same folder as the example code file) and draws the image to the screen.
-
-- Creates internal pointer type variables and sets their values to the handle to the graphics object and to the current Windows halftone palette, respectively.
-
-- Selects and realizes the halftone palette.
-
-- Creates a new graphics object using the `hdc` parameter.
-
-- Draws the image again.
-
-- Releases the handle to the device context.
-
- The result is two renderings of the sample image: one with the 16-bit palette and one with the 8-bit palette.
-
+ method is to enable GDI+ to produce a better quality halftone when the display uses 8 bits per pixel. To display an image using the halftone palette, use the following procedure.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Defines interoperability attributes for the Windows DLL file gdi32.dll, which contains the necessary GDI functions.
+
+- Defines the `SelectPalette` and `RealizePalette` functions in that DLL as external.
+
+- Creates an image from an existing image file SampImag.jpg (which must be in the same folder as the example code file) and draws the image to the screen.
+
+- Creates internal pointer type variables and sets their values to the handle to the graphics object and to the current Windows halftone palette, respectively.
+
+- Selects and realizes the halftone palette.
+
+- Creates a new graphics object using the `hdc` parameter.
+
+- Draws the image again.
+
+- Releases the handle to the device context.
+
+ The result is two renderings of the sample image: one with the 16-bit palette and one with the 8-bit palette.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet121":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet121":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet121":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet121":::
+
]]>
@@ -12750,36 +12750,36 @@
Gets the handle to the device context associated with this .
Handle to the device context associated with this .
- method using a handle returned from the method will fail.
-
- Calls to the and methods must appear in pairs. During the scope of a and method pair, you usually make only calls to GDI functions. Calls in that scope made to GDI+ methods of the that produced the `hdc` parameter fail with an `ObjectBusy` error. Also, GDI+ ignores any state changes made to the of the `hdc` parameter in subsequent operations.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The example illustrates calling a Windows GDI function to perform the same task as a GDI+ method. The code performs the following actions:
-
-- Defines the interoperability attribute for the Windows DLL file gdi32.dll. This DLL contains the desired GDI function.
-
-- Defines the function in that DLL as external.
-
-- Creates a red pen.
-
-- With the pen, draws a rectangle to the screen using the GDI+ method.
-
-- Defines an internal pointer type variable `hdc` and sets its value to the handle to the device context of the form.
-
-- Draws a rectangle to the screen using the GDI function.
-
-- Releases the device context represented by the `hdc` parameter.
-
+ method using a handle returned from the method will fail.
+
+ Calls to the and methods must appear in pairs. During the scope of a and method pair, you usually make only calls to GDI functions. Calls in that scope made to GDI+ methods of the that produced the `hdc` parameter fail with an `ObjectBusy` error. Also, GDI+ ignores any state changes made to the of the `hdc` parameter in subsequent operations.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The example illustrates calling a Windows GDI function to perform the same task as a GDI+ method. The code performs the following actions:
+
+- Defines the interoperability attribute for the Windows DLL file gdi32.dll. This DLL contains the desired GDI function.
+
+- Defines the function in that DLL as external.
+
+- Creates a red pen.
+
+- With the pen, draws a rectangle to the screen using the GDI+ method.
+
+- Defines an internal pointer type variable `hdc` and sets its value to the handle to the device context of the form.
+
+- Draws a rectangle to the screen using the GDI function.
+
+- Releases the device context represented by the `hdc` parameter.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet122":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet122":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet122":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet122":::
+
]]>
@@ -12819,27 +12819,27 @@
Gets the nearest color to the specified structure.
A structure that represents the nearest color to the one specified with the parameter.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates an arbitrary color with ARGB coordinates (255, 165, 63, 136).
-
-- Creates a solid brush and sets its color to the specified color.
-
-- Fills an ellipse using the arbitrary color.
-
-- Creates a second color and sets its value to the nearest system ARGB color.
-
-- Fills a second ellipse with this color.
-
- The result is two ellipses: the first drawn with the arbitrary specified color and the second drawn with the system color nearest the specified color.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates an arbitrary color with ARGB coordinates (255, 165, 63, 136).
+
+- Creates a solid brush and sets its color to the specified color.
+
+- Fills an ellipse using the arbitrary color.
+
+- Creates a second color and sets its value to the nearest system ARGB color.
+
+- Fills a second ellipse with this color.
+
+ The result is two ellipses: the first drawn with the arbitrary specified color and the second drawn with the system color nearest the specified color.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet123":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet123":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet123":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet123":::
+
]]>
@@ -12874,11 +12874,11 @@
Gets or sets the interpolation mode associated with this .
One of the values.
-
@@ -12926,32 +12926,32 @@
structure to intersect with the current clip region.
Updates the clip region of this to the intersection of the current clip region and the specified structure.
- property of this the area represented by the intersection of the current clip region and the rectangle specified by the `rect` parameter.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangle with upper-left corner at (0, 0) and sets the clipping region to this rectangle.
-
-- Creates a second rectangle with upper-left corner at (100, 100) and sets the clipping region to the intersection of this rectangle and the current clipping region (the first rectangle).
-
-- Fills a large rectangle that includes both previous rectangles with a solid blue brush.
-
-- Resets the clipping region to infinite.
-
-- Draws rectangles around the two clipping regions. It uses a black pen for the first clipping rectangle and a red pen for the second clipping region.
-
- The result is that only the intersection of the two rectangles is filled with blue.
-
+ property of this the area represented by the intersection of the current clip region and the rectangle specified by the `rect` parameter.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangle with upper-left corner at (0, 0) and sets the clipping region to this rectangle.
+
+- Creates a second rectangle with upper-left corner at (100, 100) and sets the clipping region to the intersection of this rectangle and the current clipping region (the first rectangle).
+
+- Fills a large rectangle that includes both previous rectangles with a solid blue brush.
+
+- Resets the clipping region to infinite.
+
+- Draws rectangles around the two clipping regions. It uses a black pen for the first clipping rectangle and a red pen for the second clipping region.
+
+ The result is that only the intersection of the two rectangles is filled with blue.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet124":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet124":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet124":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet124":::
+
]]>
@@ -12990,32 +12990,32 @@
structure to intersect with the current clip region.
Updates the clip region of this to the intersection of the current clip region and the specified structure.
- property of this the area represented by the intersection of the current clip region and the rectangle specified by the `rect` parameter.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangle with upper-left corner at (0, 0) and sets the clipping region to this rectangle.
-
-- Creates a second rectangle with upper-left corner at (100, 100) and sets the clipping region to the intersection of this rectangle and the current clipping region (the first rectangle).
-
-- Fills a large rectangle that includes both previous rectangles with a solid blue brush.
-
-- Resets the clipping region to infinite.
-
-- Draws rectangles around the two clipping regions. It uses a black pen for the first clipping rectangle and a red pen for the second clipping region.
-
- The result is that only the intersection of the two rectangles is filled with blue.
-
+ property of this the area represented by the intersection of the current clip region and the rectangle specified by the `rect` parameter.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangle with upper-left corner at (0, 0) and sets the clipping region to this rectangle.
+
+- Creates a second rectangle with upper-left corner at (100, 100) and sets the clipping region to the intersection of this rectangle and the current clipping region (the first rectangle).
+
+- Fills a large rectangle that includes both previous rectangles with a solid blue brush.
+
+- Resets the clipping region to infinite.
+
+- Draws rectangles around the two clipping regions. It uses a black pen for the first clipping rectangle and a red pen for the second clipping region.
+
+ The result is that only the intersection of the two rectangles is filled with blue.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet125":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet125":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet125":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet125":::
+
]]>
@@ -13054,36 +13054,36 @@
to intersect with the current region.
Updates the clip region of this to the intersection of the current clip region and the specified .
- property of this the area represented by the intersection of the current clip region and the region specified by the `region` parameter.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangle with upper-left corner at (0, 0).
-
-- Creates a region and sets it to the rectangle, and sets the clipping region to this region.
-
-- Creates a second rectangle with upper-left corner at (100, 100).
-
-- Creates a region and sets it to the second rectangle, and sets the clipping region to the intersection of this region and the current clipping region (the first rectangle) using a combine mode of .
-
-- Fills a large rectangle that includes both previous regions with a solid blue brush.
-
-- Resets the clipping region to infinite.
-
-- Draws rectangles around the two clipping regions. It uses a black pen for the first clipping region and a red pen for the second clipping region.
-
- The result is that only the intersection of the two regions is filled with blue.
-
+ property of this the area represented by the intersection of the current clip region and the region specified by the `region` parameter.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangle with upper-left corner at (0, 0).
+
+- Creates a region and sets it to the rectangle, and sets the clipping region to this region.
+
+- Creates a second rectangle with upper-left corner at (100, 100).
+
+- Creates a region and sets it to the second rectangle, and sets the clipping region to the intersection of this region and the current clipping region (the first rectangle) using a combine mode of .
+
+- Fills a large rectangle that includes both previous regions with a solid blue brush.
+
+- Resets the clipping region to infinite.
+
+- Draws rectangles around the two clipping regions. It uses a black pen for the first clipping region and a red pen for the second clipping region.
+
+ The result is that only the intersection of the two regions is filled with blue.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet126":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet126":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet126":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet126":::
+
]]>
@@ -13166,23 +13166,23 @@
if the point specified by the parameter is contained within the visible clip region of this ; otherwise, .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangular clipping region and sets it as the clipping region for the graphics object of the form using .
-
-- Creates two points, one inside the clipping region and one outside.
-
-- Tests each of the points for visibility and draws only the visible one.
-
- The result is one small red circle, which is within the clip region.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangular clipping region and sets it as the clipping region for the graphics object of the form using .
+
+- Creates two points, one inside the clipping region and one outside.
+
+- Tests each of the points for visibility and draws only the visible one.
+
+ The result is one small red circle, which is within the clip region.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet127":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet127":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet127":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet127":::
+
]]>
@@ -13223,23 +13223,23 @@
if the point specified by the parameter is contained within the visible clip region of this ; otherwise, .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangular clipping region and sets it as the clipping region for the graphics of the form using .
-
-- Creates two points, one inside the clipping region and one outside.
-
-- Tests each of the points for visibility and draws only the visible one.
-
- The result is one small red circle, which is within the clip region.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangular clipping region and sets it as the clipping region for the graphics of the form using .
+
+- Creates two points, one inside the clipping region and one outside.
+
+- Tests each of the points for visibility and draws only the visible one.
+
+ The result is one small red circle, which is within the clip region.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet128":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet128":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet128":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet128":::
+
]]>
@@ -13280,23 +13280,23 @@
if the rectangle specified by the parameter is contained within the visible clip region of this ; otherwise, .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangular clipping region and sets it as the clipping region for the graphics object of the form using .
-
-- Creates the location and size of two rectangles, one inside the clipping region and one outside.
-
-- Tests each of the rectangles for visibility and draws only the visible one.
-
- The result is one small red rectangle, which is within the clip region.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangular clipping region and sets it as the clipping region for the graphics object of the form using .
+
+- Creates the location and size of two rectangles, one inside the clipping region and one outside.
+
+- Tests each of the rectangles for visibility and draws only the visible one.
+
+ The result is one small red rectangle, which is within the clip region.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet129":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet129":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet129":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet129":::
+
]]>
@@ -13337,23 +13337,23 @@
if the rectangle specified by the parameter is contained within the visible clip region of this ; otherwise, .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangular clipping region and sets it as the clipping region for the graphics object of the form using .
-
-- Creates two rectangles, one inside the clipping region and one outside.
-
-- Tests each of the rectangles for visibility and draws only the visible one.
-
- The result is one small red rectangle, which is within the clip region.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangular clipping region and sets it as the clipping region for the graphics object of the form using .
+
+- Creates two rectangles, one inside the clipping region and one outside.
+
+- Tests each of the rectangles for visibility and draws only the visible one.
+
+ The result is one small red rectangle, which is within the clip region.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet130":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet130":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet130":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet130":::
+
]]>
@@ -13395,23 +13395,23 @@
if the point defined by the and parameters is contained within the visible clip region of this ; otherwise, .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangular clipping region and sets it as the clipping region for the graphics object of the form using .
-
-- Creates two points, one inside the clipping region and one outside.
-
-- Tests each of the points for visibility and draws only the visible one.
-
- The result is one small red circle, which is within the clip region.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangular clipping region and sets it as the clipping region for the graphics object of the form using .
+
+- Creates two points, one inside the clipping region and one outside.
+
+- Tests each of the points for visibility and draws only the visible one.
+
+ The result is one small red circle, which is within the clip region.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet131":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet131":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet131":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet131":::
+
]]>
@@ -13453,23 +13453,23 @@
if the point defined by the and parameters is contained within the visible clip region of this ; otherwise, .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangular clipping region and sets it as the clipping region for the graphics object of the form using .
-
-- Creates two points, one inside the clipping region and one outside.
-
-- Tests each of the points for visibility and draws only the visible one.
-
- The result is one small red circle, which is within the clip region.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangular clipping region and sets it as the clipping region for the graphics object of the form using .
+
+- Creates two points, one inside the clipping region and one outside.
+
+- Tests each of the points for visibility and draws only the visible one.
+
+ The result is one small red circle, which is within the clip region.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet133":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet133":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet133":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet133":::
+
]]>
@@ -13515,23 +13515,23 @@
if the rectangle defined by the , , , and parameters is contained within the visible clip region of this ; otherwise, .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangular clipping region and sets it as the clipping region for the graphics object of the form using .
-
-- Creates the location and size of two rectangles, one inside the clipping region and one outside.
-
-- Tests each of the rectangles for visibility and draws only the visible one.
-
- The result is one small red rectangle, which is within the clip region.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangular clipping region and sets it as the clipping region for the graphics object of the form using .
+
+- Creates the location and size of two rectangles, one inside the clipping region and one outside.
+
+- Tests each of the rectangles for visibility and draws only the visible one.
+
+ The result is one small red rectangle, which is within the clip region.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet132":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet132":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet132":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet132":::
+
]]>
@@ -13577,23 +13577,23 @@
if the rectangle defined by the , , , and parameters is contained within the visible clip region of this ; otherwise, .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangular clipping region and sets it as the clipping region for the graphics object of the form using .
-
-- Creates the location and size of two rectangles, one inside the clipping region and one outside.
-
-- Tests each of the rectangles for visibility and draws only the visible one.
-
- The result is one small red rectangle, which is within the clip region.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangular clipping region and sets it as the clipping region for the graphics object of the form using .
+
+- Creates the location and size of two rectangles, one inside the clipping region and one outside.
+
+- Tests each of the rectangles for visibility and draws only the visible one.
+
+ The result is one small red rectangle, which is within the clip region.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet134":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet134":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet134":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet134":::
+
]]>
@@ -13629,11 +13629,11 @@
if the visible portion of the clipping region of this is empty; otherwise, .
-
@@ -13682,36 +13682,36 @@
Gets an array of objects, each of which bounds a range of character positions within the specified string.
This method returns an array of objects, each of which bounds a range of character positions within the specified string.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Sets a string "First and Second ranges" and a font for display of the string ("Times New Roman", 16 point).
-
-- Sets two character ranges within the string (which correspond to the words "First" and "Second").
-
-- Creates a rectangle in which to display the string.
-
-- Sets the formatting of the string ¾ including the two character ranges.
-
-- Draws the string to the screen.
-
-- Measures the character ranges, determines rectangles that bound the two specified ranges.
-
-- Draws the two rectangles to the screen.
-
- The result is the displayed string with the first range ("First") bounded by a red rectangle and the second range ("Second") bounded by a blue rectangle.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Sets a string "First and Second ranges" and a font for display of the string ("Times New Roman", 16 point).
+
+- Sets two character ranges within the string (which correspond to the words "First" and "Second").
+
+- Creates a rectangle in which to display the string.
+
+- Sets the formatting of the string ¾ including the two character ranges.
+
+- Draws the string to the screen.
+
+- Measures the character ranges, determines rectangles that bound the two specified ranges.
+
+- Draws the two rectangles to the screen.
+
+ The result is the displayed string with the first range ("First") bounded by a red rectangle and the second range ("Second") bounded by a blue rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet135":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet135":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet135":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet135":::
+
]]>
@@ -13765,30 +13765,30 @@
Measures the specified string when drawn with the specified .
This method returns a structure that represents the size, in the units specified by the property, of the string specified by the parameter as drawn with the parameter.
- method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the method adjusts glyph points to optimize display quality and might display a string narrower than reported by . To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the method or one of the methods that takes a , and pass . Also, ensure the for the is .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a string to measure.
-
-- Creates a font object and sets it to Arial (16 point).
-
-- Creates a size object and uses it and the font object to measure the size of the string.
-
-- Draws a red rectangle using the measured size of the string.
-
-- Draws the string within the drawn rectangle.
-
+ method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the method adjusts glyph points to optimize display quality and might display a string narrower than reported by . To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the method or one of the methods that takes a , and pass . Also, ensure the for the is .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a string to measure.
+
+- Creates a font object and sets it to Arial (16 point).
+
+- Creates a size object and uses it and the font object to measure the size of the string.
+
+- Draws a red rectangle using the measured size of the string.
+
+- Draws the string within the drawn rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet136":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet136":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet136":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet136":::
+
]]>
@@ -13845,30 +13845,30 @@
Measures the specified string when drawn with the specified within the specified layout area.
This method returns a structure that represents the size, in the units specified by the property, of the string specified by the parameter as drawn with the parameter.
- method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the method adjusts glyph points to optimize display quality and might display a string narrower than reported by . To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the method or one of the methods that takes a , and pass . Also, ensure the for the is .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a string to measure and a font object set to Arial (16 point).
-
-- Sets the maximum layout size of the string.
-
-- Creates a size object and uses it, the font object, and the maximum layout size to measure the size of the string.
-
-- Draws a red rectangle using the measured size of the string.
-
-- Draws the string within the drawn rectangle.
-
+ method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the method adjusts glyph points to optimize display quality and might display a string narrower than reported by . To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the method or one of the methods that takes a , and pass . Also, ensure the for the is .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a string to measure and a font object set to Arial (16 point).
+
+- Sets the maximum layout size of the string.
+
+- Creates a size object and uses it, the font object, and the maximum layout size to measure the size of the string.
+
+- Draws a red rectangle using the measured size of the string.
+
+- Draws the string within the drawn rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet138":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet138":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet138":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet138":::
+
]]>
@@ -13918,32 +13918,32 @@
Measures the specified string when drawn with the specified .
This method returns a structure that represents the size, in the units specified by the property, of the string specified in the parameter as drawn with the parameter.
- structure (). If the `width` parameter is less than the actual width of the string, the returned component is truncated to a value representing the maximum number of characters that will fit within the specified width. To accommodate the entire string, the returned component is adjusted to a value that allows displaying the string with character wrap.
-
- The method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the method adjusts glyph points to optimize display quality and might display a string narrower than reported by . To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the method or one of the methods that takes a , and pass . Also, ensure the for the is .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a string to measure and a font object set to Arial (16 point).
-
-- Sets the maximum width of the string.
-
-- Creates a size object and uses it, the font object, and the maximum string width to measure the size of the string.
-
-- Draws a red rectangle using the measured size of the string.
-
-- Draws the string within the drawn rectangle.
-
+ structure (). If the `width` parameter is less than the actual width of the string, the returned component is truncated to a value representing the maximum number of characters that will fit within the specified width. To accommodate the entire string, the returned component is adjusted to a value that allows displaying the string with character wrap.
+
+ The method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the method adjusts glyph points to optimize display quality and might display a string narrower than reported by . To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the method or one of the methods that takes a , and pass . Also, ensure the for the is .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a string to measure and a font object set to Arial (16 point).
+
+- Sets the maximum width of the string.
+
+- Creates a size object and uses it, the font object, and the maximum string width to measure the size of the string.
+
+- Draws a red rectangle using the measured size of the string.
+
+- Draws the string within the drawn rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet141":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet141":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet141":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet141":::
+
]]>
@@ -13997,36 +13997,36 @@
Measures the specified string when drawn with the specified and formatted with the specified .
This method returns a structure that represents the size, in the units specified by the property, of the string specified by the parameter as drawn with the parameter and the parameter.
- method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the method adjusts glyph points to optimize display quality and might display a string narrower than reported by . To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the method or one of the methods that takes a , and pass . Also, ensure the for the is .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a string to measure and a font object set to Arial (16 point)
-
-- Creates a point to locate the upper-left corner of the string.
-
-- Creates a string format object and sets its format flags to .
-
-- Creates a size object to measure the string.
-
-- Measures the size of the string, using the string, the font object, the locating point, and the string format.
-
-- Draws a red rectangle using the locating point and the measured size of the string.
-
-- Draws the string within the drawn rectangle.
-
- The result is a vertical rectangle enclosing a vertical string.
-
+ method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the method adjusts glyph points to optimize display quality and might display a string narrower than reported by . To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the method or one of the methods that takes a , and pass . Also, ensure the for the is .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a string to measure and a font object set to Arial (16 point)
+
+- Creates a point to locate the upper-left corner of the string.
+
+- Creates a string format object and sets its format flags to .
+
+- Creates a size object to measure the string.
+
+- Measures the size of the string, using the string, the font object, the locating point, and the string format.
+
+- Draws a red rectangle using the locating point and the measured size of the string.
+
+- Draws the string within the drawn rectangle.
+
+ The result is a vertical rectangle enclosing a vertical string.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet137":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet137":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet137":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet137":::
+
]]>
@@ -14080,34 +14080,34 @@
Measures the specified string when drawn with the specified and formatted with the specified .
This method returns a structure that represents the size, in the units specified by the property, of the string specified in the parameter as drawn with the parameter and the parameter.
- method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the method adjusts glyph points to optimize display quality and might display a string narrower than reported by . To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the method or one of the methods that takes a , and pass . Also, ensure the for the is .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a string to measure and a font object set to Arial (16 point).
-
-- Sets the maximum layout size of the string, creating a size object to measure the string.
-
-- Creates a string format object and sets its format flags to .
-
-- Measures the size of the string, using the string, the font object, the maximum layout size, and the string format.
-
-- Draws a red rectangle using the measured size of the string.
-
-- Draws the string within the drawn rectangle.
-
- The result is a vertical rectangle enclosing a vertical string.
-
+ method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the method adjusts glyph points to optimize display quality and might display a string narrower than reported by . To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the method or one of the methods that takes a , and pass . Also, ensure the for the is .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a string to measure and a font object set to Arial (16 point).
+
+- Sets the maximum layout size of the string, creating a size object to measure the string.
+
+- Creates a string format object and sets its format flags to .
+
+- Measures the size of the string, using the string, the font object, the maximum layout size, and the string format.
+
+- Draws a red rectangle using the measured size of the string.
+
+- Draws the string within the drawn rectangle.
+
+ The result is a vertical rectangle enclosing a vertical string.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet139":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet139":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet139":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet139":::
+
]]>
@@ -14160,36 +14160,36 @@
Measures the specified string when drawn with the specified and formatted with the specified .
This method returns a structure that represents the size, in the units specified by the property, of the string specified in the parameter as drawn with the parameter and the parameter.
- method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the method adjusts glyph points to optimize display quality and might display a string narrower than reported by . To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the method or one of the methods that takes a , and pass . Also, ensure the for the is .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a string to measure and a font object set it to Arial (16 point).
-
-- Sets the maximum width of the string.
-
-- Creates a string format object and sets its format flags to .
-
-- Creates a size object to measure the string.
-
-- Measures the size of the string, using the string, the font object, the maximum width, and the string format.
-
-- Draws a red rectangle using the measured size of the string.
-
-- Draws the string within the drawn rectangle.
-
- The result is a vertical rectangle enclosing a vertical string.
-
+ method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the method adjusts glyph points to optimize display quality and might display a string narrower than reported by . To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the method or one of the methods that takes a , and pass . Also, ensure the for the is .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a string to measure and a font object set it to Arial (16 point).
+
+- Sets the maximum width of the string.
+
+- Creates a string format object and sets its format flags to .
+
+- Creates a size object to measure the string.
+
+- Measures the size of the string, using the string, the font object, the maximum width, and the string format.
+
+- Draws a red rectangle using the measured size of the string.
+
+- Draws the string within the drawn rectangle.
+
+ The result is a vertical rectangle enclosing a vertical string.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet142":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet142":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet142":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet142":::
+
]]>
@@ -14247,38 +14247,38 @@
Measures the specified string when drawn with the specified and formatted with the specified .
This method returns a structure that represents the size of the string, in the units specified by the property, of the parameter as drawn with the parameter and the parameter.
- method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the method adjusts glyph points to optimize display quality and might display a string narrower than reported by . To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the method or one of the methods that takes a and pass . Also ensure the for the is .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a string to measure and a font object set to Arial (16 point)
-
-- Sets the maximum layout size of the string.
-
-- Creates a string format object and sets its format flags to .
-
-- Creates the integer variables `charactersFitted` and `linesFilled` and a size object to measure the string.
-
-- Measures the size of the string and determines the number of characters fitted and lines filled, using the string, the font object, the maximum layout size, and the string format.
-
-- Draws a red rectangle using the measured size of the string.
-
-- Draws the string within the drawn rectangle.
-
-- Draws the values of the number of characters fitted and lines filled.
-
- The result is a vertical rectangle enclosing a vertical string.
-
+ method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow for overhanging glyphs. Also, the method adjusts glyph points to optimize display quality and might display a string narrower than reported by . To obtain metrics suitable for adjacent strings in layout (for example, when implementing formatted text), use the method or one of the methods that takes a and pass . Also ensure the for the is .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a string to measure and a font object set to Arial (16 point)
+
+- Sets the maximum layout size of the string.
+
+- Creates a string format object and sets its format flags to .
+
+- Creates the integer variables `charactersFitted` and `linesFilled` and a size object to measure the string.
+
+- Measures the size of the string and determines the number of characters fitted and lines filled, using the string, the font object, the maximum layout size, and the string format.
+
+- Draws a red rectangle using the measured size of the string.
+
+- Draws the string within the drawn rectangle.
+
+- Draws the values of the number of characters fitted and lines filled.
+
+ The result is a vertical rectangle enclosing a vertical string.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet140":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet140":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet140":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet140":::
+
]]>
@@ -14336,30 +14336,30 @@
4x4 that multiplies the world transformation.
Multiplies the world transformation of this and specified the .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a `transformMatrix` matrix (a two by two identity matrix plus a zero-translation vector).
-
-- Translates the transform matrix by a vector (200, 100).
-
-- Rotates the world transformation matrix of the Windows Form by 30 degrees, prepends the rotation matrix for 30 degrees to the form's transformation matrix.
-
-- Multiplies the rotated world transformation matrix by the translated `transformMatrix`, and prepends the `transformMatrix` to the world transformation matrix.
-
-- Draws a rotated, translated ellipse.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a `transformMatrix` matrix (a two by two identity matrix plus a zero-translation vector).
+
+- Translates the transform matrix by a vector (200, 100).
+
+- Rotates the world transformation matrix of the Windows Form by 30 degrees, prepends the rotation matrix for 30 degrees to the form's transformation matrix.
+
+- Multiplies the rotated world transformation matrix by the translated `transformMatrix`, and prepends the `transformMatrix` to the world transformation matrix.
+
+- Draws a rotated, translated ellipse.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet143":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet143":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet143":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet143":::
+
]]>
Matrix Representation of Transformations
@@ -14400,30 +14400,30 @@
Member of the enumeration that determines the order of the multiplication.
Multiplies the world transformation of this and specified the in the specified order.
- for the `order` parameter specifies that the order of the multiplication is `matrix` x world transformation. A value of for `order` specifies that the order of the multiplication is world transformation x `matrix`.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a `transformMatrix` matrix (a two by two identity matrix plus a zero-translation vector).
-
-- Translates the transform matrix by a vector (200, 100).
-
-- Rotates the world transformation matrix of the Windows Form by 30 degrees, prepending the rotation matrix for 30 degrees to the form's transformation matrix.
-
-- Multiplies the rotated world transformation matrix by the translated `transformMatrix`, appending the `transformMatrix` to the world transformation matrix.
-
-- Draws a rotated, translated ellipse.
-
+ for the `order` parameter specifies that the order of the multiplication is `matrix` x world transformation. A value of for `order` specifies that the order of the multiplication is world transformation x `matrix`.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a `transformMatrix` matrix (a two by two identity matrix plus a zero-translation vector).
+
+- Translates the transform matrix by a vector (200, 100).
+
+- Rotates the world transformation matrix of the Windows Form by 30 degrees, prepending the rotation matrix for 30 degrees to the form's transformation matrix.
+
+- Multiplies the rotated world transformation matrix by the translated `transformMatrix`, appending the `transformMatrix` to the world transformation matrix.
+
+- Draws a rotated, translated ellipse.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet144":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet144":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet144":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet144":::
+
]]>
Matrix Representation of Transformations
@@ -14459,17 +14459,17 @@
Gets or sets the scaling between world units and page units for this .
This property specifies a value for the scaling between world units and page units for this .
- and members to change the scale and origin when you draw a rectangle.
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ChangePageScaleAndTranslateTransform` method when handling the form's event, passing `e` as .
-
+ and members to change the scale and origin when you draw a rectangle.
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ChangePageScaleAndTranslateTransform` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/VB/form1.vb" id="Snippet2":::
+
]]>
Types of Coordinate Systems
@@ -14505,22 +14505,22 @@
Gets or sets the unit of measure used for page coordinates in this .
One of the values other than .
- .
-
-
-
-## Examples
- The following code example demonstrates the effect of changing the property.
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ChangePageUnit` method when handling the form's event, passing `e` as .
-
+ .
+
+
+
+## Examples
+ The following code example demonstrates the effect of changing the property.
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ChangePageUnit` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -14558,11 +14558,11 @@
Gets or sets a value specifying how pixels are offset during rendering of this .
This property specifies a member of the enumeration.
- object.
-
+ object.
+
]]>
@@ -14608,11 +14608,11 @@
Releases a device context handle obtained by a previous call to the method of this .
- and are two methods that allow you to get and release the handle for a Windows device. You should always follow a call to with a call to when you are finished with the Windows handle.
-
+ and are two methods that allow you to get and release the handle for a Windows device. You should always follow a call to with a call to when you are finished with the Windows handle.
+
]]>
@@ -14657,34 +14657,34 @@
Handle to a device context obtained by a previous call to the method of this .
Releases a device context handle obtained by a previous call to the method of this .
- and methods must appear in pairs. During the scope of a and method pair, you usually make calls only to GDI functions. Calls in that scope made to GDI+ methods of the that produced the `hdc` parameter fail with an `ObjectBusy` error. Also, GDI+ ignores any state changes made to the of the `hdc` parameter in subsequent operations.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The example illustrates calling a Windows GDI function to perform the same task as a GDI+ method. The code performs the following actions:
-
-- Defines the interoperability attribute for the Windows DLL file gdi32.dll. This DLL contains the desired GDI function, and it defines the function in that DLL as external.
-
-- Creates a red pen.
-
-- With the pen, draws a rectangle to the screen using the GDI+ method.
-
-- Defines an internal pointer type variable `hdc` and sets its value to the handle to the device context of the form.
-
-- Draws a rectangle to the screen using the GDI function.
-
-- Releases the device context represented by the `hdc` parameter.
-
+ and methods must appear in pairs. During the scope of a and method pair, you usually make calls only to GDI functions. Calls in that scope made to GDI+ methods of the that produced the `hdc` parameter fail with an `ObjectBusy` error. Also, GDI+ ignores any state changes made to the of the `hdc` parameter in subsequent operations.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The example illustrates calling a Windows GDI function to perform the same task as a GDI+ method. The code performs the following actions:
+
+- Defines the interoperability attribute for the Windows DLL file gdi32.dll. This DLL contains the desired GDI function, and it defines the function in that DLL as external.
+
+- Creates a red pen.
+
+- With the pen, draws a rectangle to the screen using the GDI+ method.
+
+- Defines an internal pointer type variable `hdc` and sets its value to the handle to the device context of the form.
+
+- Draws a rectangle to the screen using the GDI function.
+
+- Releases the device context represented by the `hdc` parameter.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet145":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet145":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet145":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet145":::
+
]]>
@@ -14796,32 +14796,32 @@
Resets the clip region of this to an infinite region.
- is infinite, items that this draws are not clipped.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangle with upper-left corner at (0, 0) and sets the clipping region to this rectangle.
-
-- Creates a second rectangle with upper-left corner at (100, 100) and sets the clipping region to the intersection of this rectangle and the current clipping region (the first rectangle).
-
-- Fills a large rectangle that includes both previous rectangles with a solid blue brush.
-
-- Resets the clipping region to infinite.
-
-- Draws rectangles around the two clipping regions; it uses a black pen for the first clipping rectangle and a red pen for the second clipping region.
-
- The result is that only the intersection of the two rectangles is filled with blue.
-
+ is infinite, items that this draws are not clipped.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangle with upper-left corner at (0, 0) and sets the clipping region to this rectangle.
+
+- Creates a second rectangle with upper-left corner at (100, 100) and sets the clipping region to the intersection of this rectangle and the current clipping region (the first rectangle).
+
+- Fills a large rectangle that includes both previous rectangles with a solid blue brush.
+
+- Resets the clipping region to infinite.
+
+- Draws rectangles around the two clipping regions; it uses a black pen for the first clipping rectangle and a red pen for the second clipping region.
+
+ The result is that only the intersection of the two rectangles is filled with blue.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet146":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet146":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet146":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet146":::
+
]]>
@@ -14856,30 +14856,30 @@
Resets the world transformation matrix of this to the identity matrix.
- to the identity matrix means that its world transformation does not change the geometry of transformed items.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Translates the world transform of the Windows Form by a vector (100, 0).
-
-- Saves the graphics state of the form.
-
-- Resets the world transform of the form to an identity and fills a rectangle with a solid red brush.
-
-- Restores the translated graphics state and fills a rectangle with a solid blue brush.
-
- The result is an untranslated red-filled rectangle and a translated blue-filled rectangle.
-
+ to the identity matrix means that its world transformation does not change the geometry of transformed items.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Translates the world transform of the Windows Form by a vector (100, 0).
+
+- Saves the graphics state of the form.
+
+- Resets the world transform of the form to an identity and fills a rectangle with a solid red brush.
+
+- Restores the translated graphics state and fills a rectangle with a solid blue brush.
+
+ The result is an untranslated red-filled rectangle and a translated blue-filled rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet147":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet147":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet147":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet147":::
+
]]>
@@ -14918,36 +14918,36 @@
that represents the state to which to restore this .
Restores the state of this to the state represented by a .
- method of a , an information block that holds the state of the is put on a stack. The method returns a that identifies that information block. When you pass the identifying to the method, the information block is removed from the stack and is used to restore the to the state it was in at the time of the method call. Note that the returned by a given call to the method can be passed only once to the `Restore` method.
-
- Calls to the method can be nested; that is, you can call the method several times before you call the method. Each time you call the method, an information block is put on the stack, and you receive a for the information block. When you pass one of those objects to the method, the is returned to the state it was in at the time of the method call that returned that particular . The information block placed on the stack by that method call is removed from the stack, and all information blocks placed on that stack after that method call are also removed.
-
- Calls to the method place information blocks on the same stack as calls to the method. Just as a call is paired with a call, a method call is paired with a method call.
-
- When you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack. Likewise, when you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Translates the world transform of the Windows Form by a vector (100, 0).
-
-- Saves the graphics state of the form.
-
-- Resets the world transform of the form to an identity and fills a rectangle with a solid red brush.
-
-- Restores the translated graphics state and fills a second rectangle with a solid blue brush.
-
- The result is an untranslated red-filled rectangle and a translated blue-filled rectangle.
-
+ method of a , an information block that holds the state of the is put on a stack. The method returns a that identifies that information block. When you pass the identifying to the method, the information block is removed from the stack and is used to restore the to the state it was in at the time of the method call. Note that the returned by a given call to the method can be passed only once to the `Restore` method.
+
+ Calls to the method can be nested; that is, you can call the method several times before you call the method. Each time you call the method, an information block is put on the stack, and you receive a for the information block. When you pass one of those objects to the method, the is returned to the state it was in at the time of the method call that returned that particular . The information block placed on the stack by that method call is removed from the stack, and all information blocks placed on that stack after that method call are also removed.
+
+ Calls to the method place information blocks on the same stack as calls to the method. Just as a call is paired with a call, a method call is paired with a method call.
+
+ When you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack. Likewise, when you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Translates the world transform of the Windows Form by a vector (100, 0).
+
+- Saves the graphics state of the form.
+
+- Resets the world transform of the form to an identity and fills a rectangle with a solid red brush.
+
+- Restores the translated graphics state and fills a second rectangle with a solid blue brush.
+
+ The result is an untranslated red-filled rectangle and a translated blue-filled rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet148":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet148":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet148":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet148":::
+
]]>
@@ -15000,26 +15000,26 @@
Angle of rotation in degrees.
Applies the specified rotation to the transformation matrix of this .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Translates the world transformation matrix of the Windows Form by the vector (100, 0).
-
-- Rotates the world transformation by an angle of 30 degrees, prepending the rotation matrix to the world transformation matrix.
-
-- Draws a rotated, translated ellipse with a blue pen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Translates the world transformation matrix of the Windows Form by the vector (100, 0).
+
+- Rotates the world transformation by an angle of 30 degrees, prepending the rotation matrix to the world transformation matrix.
+
+- Draws a rotated, translated ellipse with a blue pen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet149":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet149":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet149":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet149":::
+
]]>
@@ -15059,26 +15059,26 @@
Member of the enumeration that specifies whether the rotation is appended or prepended to the matrix transformation.
Applies the specified rotation to the transformation matrix of this in the specified order.
- by the rotation matrix according to the `order` parameter.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Translates the world transformation matrix of the Windows Form by the vector (100, 0).
-
-- Rotates the world transform by an angle of 30 degrees, appending the rotation matrix to the world transformation matrix with .
-
-- Draws a translated, rotated ellipse with a blue pen.
-
+ by the rotation matrix according to the `order` parameter.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Translates the world transformation matrix of the Windows Form by the vector (100, 0).
+
+- Rotates the world transform by an angle of 30 degrees, appending the rotation matrix to the world transformation matrix with .
+
+- Draws a translated, rotated ellipse with a blue pen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet150":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet150":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet150":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet150":::
+
]]>
@@ -15114,36 +15114,36 @@
Saves the current state of this and identifies the saved state with a .
This method returns a that represents the saved state of this .
- method of a , an information block that holds the state of the is put on a stack. The method returns a that identifies that information block. When you pass the identifying to the method, the information block is removed from the stack and is used to restore the to the state it was in at the time of the method call. Note that the returned by a given call to the method can be passed only once to the method.
-
- Calls to the method can be nested; that is, you can call the method several times before you call the method. Each time you call the method, an information block is put on the stack, and you receive a for the information block. When you pass one of those objects to the method, the is returned to the state it was in at the time of the method call that returned that particular . The information block placed on the stack by that method call is removed from the stack, and all information blocks placed on that stack after that method call are also removed.
-
- Calls to the method place information blocks on the same stack as calls to the method. Just as a call is paired with a call, a method call is paired with a method call.
-
- When you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack. Likewise, When you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Translates the world transform of the Windows Form by a vector (100, 0).
-
-- Saves the graphics state of the form.
-
-- Resets the world transform of the form to an identity (2x2 identity matrix plus a zero-vector translation) and fills a rectangle with a solid red brush.
-
-- Restores the translated graphics state and fills a rectangle with a solid blue brush.
-
- The result is an untranslated red-filled rectangle on the left and a translated blue-filled rectangle on the right of the form.
-
+ method of a , an information block that holds the state of the is put on a stack. The method returns a that identifies that information block. When you pass the identifying to the method, the information block is removed from the stack and is used to restore the to the state it was in at the time of the method call. Note that the returned by a given call to the method can be passed only once to the method.
+
+ Calls to the method can be nested; that is, you can call the method several times before you call the method. Each time you call the method, an information block is put on the stack, and you receive a for the information block. When you pass one of those objects to the method, the is returned to the state it was in at the time of the method call that returned that particular . The information block placed on the stack by that method call is removed from the stack, and all information blocks placed on that stack after that method call are also removed.
+
+ Calls to the method place information blocks on the same stack as calls to the method. Just as a call is paired with a call, a method call is paired with a method call.
+
+ When you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack. Likewise, When you call the method, all information blocks placed on the stack (by the method or by the method) after the corresponding call to the method are removed from the stack.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Translates the world transform of the Windows Form by a vector (100, 0).
+
+- Saves the graphics state of the form.
+
+- Resets the world transform of the form to an identity (2x2 identity matrix plus a zero-vector translation) and fills a rectangle with a solid red brush.
+
+- Restores the translated graphics state and fills a rectangle with a solid blue brush.
+
+ The result is an untranslated red-filled rectangle on the left and a translated blue-filled rectangle on the right of the form.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet151":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet151":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet151":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet151":::
+
]]>
@@ -15198,28 +15198,28 @@
Scale factor in the y direction.
Applies the specified scaling operation to the transformation matrix of this by prepending it to the object's transformation matrix.
- by the scaling matrix.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Rotates the world transformation matrix of the Windows Form by 30 degrees.
-
-- Scales that matrix by a factor of 3 in the x direction and a factor of 1 in the y direction by prepending the scaling transformation.
-
-- Draws a scaled, rotated rectangle with a blue pen.
-
- The result is still a rectangle.
-
+ by the scaling matrix.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Rotates the world transformation matrix of the Windows Form by 30 degrees.
+
+- Scales that matrix by a factor of 3 in the x direction and a factor of 1 in the y direction by prepending the scaling transformation.
+
+- Draws a scaled, rotated rectangle with a blue pen.
+
+ The result is still a rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet152":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet152":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet152":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet152":::
+
]]>
@@ -15261,28 +15261,28 @@
Member of the enumeration that specifies whether the scaling operation is prepended or appended to the transformation matrix.
Applies the specified scaling operation to the transformation matrix of this in the specified order.
- by the scaling matrix according to the `order` parameter.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Rotates the world transformation matrix of the Windows Form by 30 degrees.
-
-- Scales that matrix by a factor of 3 in the x direction and a factor of 1 in the y direction by appending the scaling transformation with the member.
-
-- Draws a rotated, scaled rectangle with a blue pen.
-
- The result is a parallelogram.
-
+ by the scaling matrix according to the `order` parameter.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Rotates the world transformation matrix of the Windows Form by 30 degrees.
+
+- Scales that matrix by a factor of 3 in the x direction and a factor of 1 in the y direction by appending the scaling transformation with the member.
+
+- Draws a rotated, scaled rectangle with a blue pen.
+
+ The result is a parallelogram.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet153":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet153":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet153":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet153":::
+
]]>
@@ -15336,28 +15336,28 @@
that represents the new clip region.
Sets the clipping region of this to the specified .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a graphics path and adds an ellipse to the path.
-
-- Sets the clipping region to the elliptical path.
-
-- Fills a large rectangle with a solid black brush.
-
- The result is a filled, black ellipse.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a graphics path and adds an ellipse to the path.
+
+- Sets the clipping region to the elliptical path.
+
+- Fills a large rectangle with a solid black brush.
+
+ The result is a filled, black ellipse.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet154":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet154":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet154":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet154":::
+
]]>
@@ -15402,25 +15402,25 @@
from which to take the new clip region.
Sets the clipping region of this to the property of the specified .
- `e`, which is a parameter of the event handler, as well as `thisForm`, the for the example. The code performs the following actions:
-
-- Creates a temporary from the `thisForm` of the example.
-
-- Sets the clipping region of the temporary to a small square.
-
-- Updates the clipping region of the form's graphic object to that of the temporary .
-
-- Fills a large rectangle with a solid black brush.
-
- The result is a small, filled, black square.
-
+ `e`, which is a parameter of the event handler, as well as `thisForm`, the for the example. The code performs the following actions:
+
+- Creates a temporary from the `thisForm` of the example.
+
+- Sets the clipping region of the temporary to a small square.
+
+- Updates the clipping region of the form's graphic object to that of the temporary .
+
+- Fills a large rectangle with a solid black brush.
+
+ The result is a small, filled, black square.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet156":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet156":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet156":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet156":::
+
]]>
@@ -15465,23 +15465,23 @@
structure that represents the new clip region.
Sets the clipping region of this to the rectangle specified by a structure.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a small rectangle for the clipping region.
-
-- Sets the clipping region to the rectangle.
-
-- Fills a large rectangle with a solid black brush.
-
- The result is a small, filled, black rectangle.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a small rectangle for the clipping region.
+
+- Sets the clipping region to the rectangle.
+
+- Fills a large rectangle with a solid black brush.
+
+ The result is a small, filled, black rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet158":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet158":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet158":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet158":::
+
]]>
@@ -15526,23 +15526,23 @@
structure that represents the new clip region.
Sets the clipping region of this to the rectangle specified by a structure.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a small rectangle for the clipping region.
-
-- Sets the clipping region to the rectangle.
-
-- Fills a large rectangle with a solid black brush.
-
- The result is a small, filled, black rectangle.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a small rectangle for the clipping region.
+
+- Sets the clipping region to the rectangle.
+
+- Fills a large rectangle with a solid black brush.
+
+ The result is a small, filled, black rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet160":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet160":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet160":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet160":::
+
]]>
@@ -15583,28 +15583,28 @@
Member of the enumeration that specifies the combining operation to use.
Sets the clipping region of this to the result of the specified operation combining the current clip region and the specified .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a graphics path and adds an ellipse to the path.
-
-- Sets the clipping region to the elliptical path with the member.
-
-- Fills a large rectangle with a solid black brush.
-
- The result is a filled, black ellipse.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a graphics path and adds an ellipse to the path.
+
+- Sets the clipping region to the elliptical path with the member.
+
+- Fills a large rectangle with a solid black brush.
+
+ The result is a filled, black ellipse.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet155":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet155":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet155":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet155":::
+
]]>
@@ -15645,25 +15645,25 @@
Member of the enumeration that specifies the combining operation to use.
Sets the clipping region of this to the result of the specified combining operation of the current clip region and the property of the specified .
- `e`, which is a parameter of the event handler, as well as `thisForm`, the for the example. The code performs the following actions:
-
-- Creates a temporary from the `thisForm` of the example.
-
-- Sets the clipping region of the temporary to a small square.
-
-- Updates the clipping region of the form's graphic object to that of the new with the member.
-
-- Fills a large rectangle with a solid black brush.
-
- The result is a small, filled, black square.
-
+ `e`, which is a parameter of the event handler, as well as `thisForm`, the for the example. The code performs the following actions:
+
+- Creates a temporary from the `thisForm` of the example.
+
+- Sets the clipping region of the temporary to a small square.
+
+- Updates the clipping region of the form's graphic object to that of the new with the member.
+
+- Fills a large rectangle with a solid black brush.
+
+ The result is a small, filled, black square.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet157":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet157":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet157":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet157":::
+
]]>
@@ -15704,23 +15704,23 @@
Member of the enumeration that specifies the combining operation to use.
Sets the clipping region of this to the result of the specified operation combining the current clip region and the rectangle specified by a structure.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a small rectangle for the clipping region.
-
-- Sets the clipping region to the rectangle with the member.
-
-- Fills a large rectangle with a solid black brush.
-
- The result is a small, filled, black rectangle.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a small rectangle for the clipping region.
+
+- Sets the clipping region to the rectangle with the member.
+
+- Fills a large rectangle with a solid black brush.
+
+ The result is a small, filled, black rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet159":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet159":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet159":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet159":::
+
]]>
@@ -15761,23 +15761,23 @@
Member of the enumeration that specifies the combining operation to use.
Sets the clipping region of this to the result of the specified operation combining the current clip region and the rectangle specified by a structure.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a small rectangle for the clipping region.
-
-- Sets the clipping region to the rectangle with the member.
-
-- Fills a large rectangle with a solid black brush.
-
- The result is a small, filled, black rectangle.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a small rectangle for the clipping region.
+
+- Sets the clipping region to the rectangle with the member.
+
+- Fills a large rectangle with a solid black brush.
+
+ The result is a small, filled, black rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet161":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet161":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet161":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet161":::
+
]]>
@@ -15818,23 +15818,23 @@
Member from the enumeration that specifies the combining operation to use.
Sets the clipping region of this to the result of the specified operation combining the current clip region and the specified .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a small rectangle for the clipping region.
-
-- Sets the clipping region to the rectangle with the member.
-
-- Fills a large rectangle with a solid black brush.
-
- The result is a small, filled, black rectangle.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a small rectangle for the clipping region.
+
+- Sets the clipping region to the rectangle with the member.
+
+- Fills a large rectangle with a solid black brush.
+
+ The result is a small, filled, black rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet162":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet162":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet162":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet162":::
+
]]>
@@ -15869,24 +15869,24 @@
Gets or sets the rendering quality for this .
One of the values.
- are rendered the same way (aliased) regardless of the property.
-
-
-
-## Examples
- The following method demonstrates the effects of setting the , , and properties. The output of the example is shown in the following illustration.
-
- 
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowPensAndSmoothingMode` method when handling the form's event, passing `e` as .
-
+ are rendered the same way (aliased) regardless of the property.
+
+
+
+## Examples
+ The following method demonstrates the effects of setting the , , and properties. The output of the example is shown in the following illustration.
+
+ 
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowPensAndSmoothingMode` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.PensExample/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.PensExample/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -15921,22 +15921,22 @@
Gets or sets the gamma correction value for rendering text.
The gamma correction value used for rendering antialiased and ClearType text.
- and properties.
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ChangeTextRenderingHintAndTextContrast` method when handling the form's event, passing `e` as .
-
+ and properties.
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ChangeTextRenderingHintAndTextContrast` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/VB/form1.vb" id="Snippet5":::
+
]]>
@@ -15971,25 +15971,25 @@
Gets or sets the rendering mode for text associated with this .
One of the values.
- [!NOTE]
-> You should not use a property value of when the property is set to . An exception could occur or the image may not render correctly.
-
-
-
-## Examples
- The following code example demonstrates the use of the and properties.
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ChangeTextRenderingHintAndTextContrast` method when handling the form's event, passing `e` as .
-
+> You should not use a property value of when the property is set to . An exception could occur or the image may not render correctly.
+
+
+
+## Examples
+ The following code example demonstrates the use of the and properties.
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ChangeTextRenderingHintAndTextContrast` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/VB/form1.vb" id="Snippet5":::
+
]]>
@@ -16024,13 +16024,13 @@
Gets or sets a copy of the geometric world transformation for this .
A copy of the that represents the geometric world transformation for this .
- property represents the world transformation, which maps world coordinates to page coordinates.
-
- Because the matrix returned and by the property is a copy of the geometric transform, you should dispose of the matrix when you no longer need it.
-
+ property represents the world transformation, which maps world coordinates to page coordinates.
+
+ Because the matrix returned and by the property is a copy of the geometric transform, you should dispose of the matrix when you no longer need it.
+
]]>
Types of Coordinate Systems
@@ -16103,27 +16103,27 @@
Array of structures that represents the points to transformation.
Transforms an array of points from one coordinate space to another using the current world and page transformations of this .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates two points and draws a blue line between them.
-
-- Sets the world transform to translate by amounts 40 in the x direction and 30 in the y direction.
-
-- Transforms the points from world coordinates () to page coordinates ().
-
-- Resets the world transformation to the identity.
-
-- Draws a red line between the transformed points.
-
- The result is a blue line and a translated red line below it.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates two points and draws a blue line between them.
+
+- Sets the world transform to translate by amounts 40 in the x direction and 30 in the y direction.
+
+- Transforms the points from world coordinates () to page coordinates ().
+
+- Resets the world transformation to the identity.
+
+- Draws a red line between the transformed points.
+
+ The result is a blue line and a translated red line below it.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet163":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet163":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet163":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet163":::
+
]]>
@@ -16165,25 +16165,25 @@
Array of structures that represent the points to transform.
Transforms an array of points from one coordinate space to another using the current world and page transformations of this .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates two points and draws a blue line between them.
-
-- Sets the world transform to translate by amounts 40 in the x direction and 30 in the y direction.
-
-- Transforms the points from world coordinates () to page coordinates ().
-
-- Resets the world transformation to the identity and draws a red line between the transformed points.
-
- The result is a blue line and a translated red line below it.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates two points and draws a blue line between them.
+
+- Sets the world transform to translate by amounts 40 in the x direction and 30 in the y direction.
+
+- Transforms the points from world coordinates () to page coordinates ().
+
+- Resets the world transformation to the identity and draws a red line between the transformed points.
+
+ The result is a blue line and a translated red line below it.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet164":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet164":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet164":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet164":::
+
]]>
@@ -16232,25 +16232,25 @@
The y-coordinate of the translation.
Translates the clipping region of this by specified amounts in the horizontal and vertical directions.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangle for the clipping region.
-
-- Sets the clipping region to the rectangle.
-
-- Translates the clipping region by a vector (50, 50).
-
-- Fills a large rectangle with a solid black brush.
-
- The result is a translated, small, black rectangle.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangle for the clipping region.
+
+- Sets the clipping region to the rectangle.
+
+- Translates the clipping region by a vector (50, 50).
+
+- Fills a large rectangle with a solid black brush.
+
+ The result is a translated, small, black rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet165":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet165":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet165":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet165":::
+
]]>
@@ -16290,25 +16290,25 @@
The y-coordinate of the translation.
Translates the clipping region of this by specified amounts in the horizontal and vertical directions.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangle for the clipping region.
-
-- Sets the clipping region to the rectangle.
-
-- Translates the clipping region by a vector (50.0F, 50.0F).
-
-- Fills a large rectangle with a solid black brush.
-
- The result is a translated, small, black rectangle.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangle for the clipping region.
+
+- Sets the clipping region to the rectangle.
+
+- Translates the clipping region by a vector (50.0F, 50.0F).
+
+- Fills a large rectangle with a solid black brush.
+
+ The result is a translated, small, black rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet166":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet166":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet166":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet166":::
+
]]>
@@ -16363,30 +16363,30 @@
The y-coordinate of the translation.
Changes the origin of the coordinate system by prepending the specified translation to the transformation matrix of this .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Rotates the world transformation matrix of the Windows Form by 30.0F degrees.
-
-- Moves the origin of the graphics object by calling , prepending the translation to the transformation matrix.
-
-- Draws a translated, rotated ellipse with a blue pen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Rotates the world transformation matrix of the Windows Form by 30.0F degrees.
+
+- Moves the origin of the graphics object by calling , prepending the translation to the transformation matrix.
+
+- Draws a translated, rotated ellipse with a blue pen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet167":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet167":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet167":::
-
- The following illustration shows the output of running the previous code example.
-
- 
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet167":::
+
+ The following illustration shows the output of running the previous code example.
+
+ 
+
]]>
Coordinate Systems and Transformations
@@ -16430,26 +16430,26 @@
Member of the enumeration that specifies whether the translation is prepended or appended to the transformation matrix.
Changes the origin of the coordinate system by applying the specified translation to the transformation matrix of this in the specified order.
- by the translation matrix according to the `order` parameter.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Rotates the world transformation matrix of the Windows Form by 30.0F degrees.
-
-- Moves the graphics object's origin by calling , appending the translation to the world transformation matrix.
-
-- Draws a rotated, translated ellipse with a blue pen.
-
+ by the translation matrix according to the `order` parameter.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Rotates the world transformation matrix of the Windows Form by 30.0F degrees.
+
+- Moves the graphics object's origin by calling , appending the translation to the world transformation matrix.
+
+- Draws a rotated, translated ellipse with a blue pen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CPP/form1.cpp" id="Snippet168":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/CS/form1.cs" id="Snippet168":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet168":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples3/VB/form1.vb" id="Snippet168":::
+
]]>
Coordinate Systems and Transformations
@@ -16486,13 +16486,13 @@
Gets the bounding rectangle of the visible clipping region of this .
A structure that represents a bounding rectangle for the visible clipping region of this .
- property. The default unit is pixels. A is typically associated with a control and the origin of the rectangle will be relative to the client area of that control.
-
- The visible clipping region is the intersection of the clipping region of this and the clipping region of the window.
-
+ property. The default unit is pixels. A is typically associated with a control and the origin of the rectangle will be relative to the client area of that control.
+
+ The visible clipping region is the intersection of the clipping region of this and the clipping region of the window.
+
]]>
diff --git a/xml/System.Drawing/Icon.xml b/xml/System.Drawing/Icon.xml
index adb692f85df..ae5e3c0023e 100644
--- a/xml/System.Drawing/Icon.xml
+++ b/xml/System.Drawing/Icon.xml
@@ -73,31 +73,31 @@
Represents a Windows icon, which is a small bitmap image that is used to represent an object. Icons can be thought of as transparent bitmaps, although their size is determined by the system.
- objects from files, streams, or embedded resources. For a list of constructors, see . You can also convert an to a bitmap by using the method.
-
- An icon resource can contain multiple icon images. One icon file may contain images in several sizes and color depths. The image that is used in an application depends on the operating system and settings. The following list details the typical sizes for an icon:
-
-- 16 pixels x 16 pixels
-
-- 32 pixels x 32 pixels
-
-- 48 pixels x 48 pixels
-
-
-
-## Examples
- The following code example demonstrates how to use the method. This example is designed to be used with Windows Forms. Create a form and paste the following code into it. Call the `IconToBitmap` method in the form's event handler, passing `e` as .
-
+ objects from files, streams, or embedded resources. For a list of constructors, see . You can also convert an to a bitmap by using the method.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+ An icon resource can contain multiple icon images. One icon file may contain images in several sizes and color depths. The image that is used in an application depends on the operating system and settings. The following list details the typical sizes for an icon:
+
+- 16 pixels x 16 pixels
+
+- 32 pixels x 32 pixels
+
+- 48 pixels x 48 pixels
+
+## Examples
+ The following code example demonstrates how to use the method. This example is designed to be used with Windows Forms. Create a form and paste the following code into it. Call the `IconToBitmap` method in the form's event handler, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet9":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet9":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet9":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet9":::
+
]]>
- Working with Images, Bitmaps, Icons, and Metafiles
+ Working with Images, Bitmaps, Icons, and Metafiles
@@ -145,19 +145,19 @@
The data stream from which to load the .
Initializes a new instance of the class from the specified data stream.
-
The parameter is .
@@ -199,19 +199,19 @@
The file to load the from.
Initializes a new instance of the class from the specified file name.
-
@@ -248,11 +248,11 @@
A structure that specifies the height and width of the new .
Initializes a new instance of the class and attempts to find a version of the icon that matches the requested size.
- that has a single size, this method only creates a duplicate icon. Use the stretching capabilities of the method to resize the icon.
-
+ that has a single size, this method only creates a duplicate icon. Use the stretching capabilities of the method to resize the icon.
+
]]>
The parameter is .
@@ -323,13 +323,13 @@
The desired size of the icon.
Initializes a new instance of the class of the specified size from the specified file.
-
The is or does not contain image data.
@@ -367,21 +367,21 @@
The resource name to load.
Initializes a new instance of the class from a resource in the specified assembly.
- from a resource with the name specified by the `resource` parameter in the assembly that contains the type specified by the `type` parameter.
-
- This constructor combines the namespace of the given type together with the string name of the resource and looks for a match in the assembly manifest. For example you can pass in the type and `Error.ico` to this constructor, and it looks for a resource that is named `System.Windows.Forms.Error.ico`.
-
-
-
-## Examples
- The following code example demonstrates how to use the constructor. To run this example, paste the code into a Windows Form and handle the form's event. Call the `ConstructAnIconFromAType` method from the event handler, passing `e` as .
-
+ from a resource with the name specified by the `resource` parameter in the assembly that contains the type specified by the `type` parameter.
+
+ This constructor combines the namespace of the given type together with the string name of the resource and looks for a match in the assembly manifest. For example you can pass in the type and `Error.ico` to this constructor, and it looks for a resource that is named `System.Windows.Forms.Error.ico`.
+
+
+
+## Examples
+ The following code example demonstrates how to use the constructor. To run this example, paste the code into a Windows Form and handle the form's event. Call the `ConstructAnIconFromAType` method from the event handler, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Misc3/CS/Form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippet3":::
+
]]>
An icon specified by cannot be found in the assembly that contains the specified .
@@ -421,20 +421,20 @@
The height of the new icon.
Initializes a new instance of the class and attempts to find a version of the icon that matches the requested size.
- that has a single size, this method only creates a duplicate icon. Use the stretching capabilities of the method to resize the icon.
-
-
-
-## Examples
- The following code example demonstrates how to use the method. This example is designed to be used with Windows Forms. Create a form and paste the following code into it. Call the `IconToBitmap` method in the form's event handler, passing `e` as .
-
+ that has a single size, this method only creates a duplicate icon. Use the stretching capabilities of the method to resize the icon.
+
+
+
+## Examples
+ The following code example demonstrates how to use the method. This example is designed to be used with Windows Forms. Create a form and paste the following code into it. Call the `IconToBitmap` method in the form's event handler, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet9":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet9":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet9":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet9":::
+
]]>
The parameter is .
@@ -510,13 +510,13 @@
The desired height of the .
Initializes a new instance of the class with the specified width and height from the specified file.
-
The is or does not contain image data.
@@ -591,11 +591,11 @@
Releases all resources used by this .
- to be reallocated for other purposes.
-
+ to be reallocated for other purposes.
+
]]>
@@ -640,27 +640,27 @@
Returns an icon representation of an image that is contained in the specified file.
The representation of the image that is contained in the specified file.
- is used with bitmaps, a thumbnail image may be returned instead of an icon if the system that is running the application has a registry setting that causes bitmap files to be shown as thumbnail images.
-
-
-
-## Examples
- The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `ExtractAssociatedIconEx` from the form's constructor or event handler.
-
+ is used with bitmaps, a thumbnail image may be returned instead of an icon if the system that is running the application has a registry setting that causes bitmap files to be shown as thumbnail images.
+
+
+
+## Examples
+ The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `ExtractAssociatedIconEx` from the form's constructor or event handler.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Misc3/CS/Form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippet2":::
+
]]>
- The does not indicate a valid file.
-
- -or-
-
+ The does not indicate a valid file.
+
+ -or-
+
The indicates a Universal Naming Convention (UNC) path.
@@ -730,30 +730,30 @@
Creates a GDI+ from the specified Windows handle to an icon ().
The this method creates.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Draws that object to the screen.
-
-- Gets an icon handle for the .
-
-- Sets the attribute of the form to an icon created from the handle.
-
-- Calls the Windows API function `DestroyIcon` to release resources.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Draws that object to the screen.
+
+- Gets an icon handle for the .
+
+- Sets the attribute of the form to an icon created from the handle.
+
+- Calls the Windows API function `DestroyIcon` to release resources.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CPP/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/CS/form1.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicBitmapExamples/VB/form1.vb" id="Snippet6":::
+
]]>
@@ -794,17 +794,17 @@
Gets the Windows handle for this . This is not a copy of the handle; do not free it.
The Windows handle for the icon.
- handle using the enumeration and how to use the method to draw the rectangle bounds of a bitmap.
-
- This example is designed to be used with Windows Forms. Create a form that contains a button named `Button2`. Paste the code into the form and associate this method with the button's event.
-
+ handle using the enumeration and how to use the method to draw the rectangle bounds of a bitmap.
+
+ This example is designed to be used with Windows Forms. Create a form that contains a button named `Button2`. Paste the code into the form and associate this method with the button's event.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BitmapMembers/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BitmapMembers/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -992,23 +992,23 @@
Converts this to a GDI+ .
A that represents the converted .
- [!NOTE]
-> Beginning with framework version 4.6 support was added for PNG frames in .ico files. Applications that target earlier versions of the framework but are running on the 4.6 bits can opt in into the new behavior by adding the following line to the `` section of the app.config file:``
-
-
-
-## Examples
- The following code example demonstrates how to use the method. This example is designed to be used with Windows Forms. Create a form and paste the following code into it. Call the `IconToBitmap` method in the form's . event handler, passing `e` as .
-
+> Beginning with framework version 4.6 support was added for PNG frames in .ico files. Applications that target earlier versions of the framework but are running on the 4.6 bits can opt in into the new behavior by adding the following line to the `` section of the app.config file:``
+
+
+
+## Examples
+ The following code example demonstrates how to use the method. This example is designed to be used with Windows Forms. Create a form and paste the following code into it. Call the `IconToBitmap` method in the form's . event handler, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet9":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet9":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet9":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet9":::
+
]]>
diff --git a/xml/System.Drawing/IconConverter.xml b/xml/System.Drawing/IconConverter.xml
index 204a81092ac..f1a69dced71 100644
--- a/xml/System.Drawing/IconConverter.xml
+++ b/xml/System.Drawing/IconConverter.xml
@@ -32,7 +32,15 @@
Converts an object from one data type to another. Access this class through the object.
- To be added.
+
+
+
@@ -109,11 +117,11 @@
Determines whether this can convert an instance of a specified type to an , using the specified context.
This method returns if this can perform the conversion; otherwise, .
-
@@ -156,11 +164,11 @@
Determines whether this can convert an to an instance of a specified type, using the specified context.
This method returns if this can perform the conversion; otherwise, .
-
@@ -250,11 +258,11 @@
Converts an (or an object that can be cast to an ) to a specified type.
This method returns the converted object.
- method on the object if the object is valid and if the destination type is `string`. If this method cannot convert to the destination type, it throws a exception.
-
+ method on the object if the object is valid and if the destination type is `string`. If this method cannot convert to the destination type, it throws a exception.
+
]]>
The conversion could not be performed.
diff --git a/xml/System.Drawing/Image.xml b/xml/System.Drawing/Image.xml
index 0a7086571f0..3a2bc238c69 100644
--- a/xml/System.Drawing/Image.xml
+++ b/xml/System.Drawing/Image.xml
@@ -77,30 +77,30 @@
An abstract base class that provides functionality for the and descended classes.
- on a Windows Form, you should use one of the methods.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms. It is a handler for the event. A object is passed to the event and is used to draw the image on the form. The code performs the following actions:
-
-- Creates an image from a file named SampImag.jpg. This file must be located in the same folder as the application executable file.
-
-- Creates a point at which to draw the upper-left corner of the image.
-
-- Draws the unscaled image on the form.
-
+ on a Windows Form, use one of the methods.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+## Examples
+ The following code example is designed for use with Windows Forms. It is a handler for the event. A object is passed to the event and is used to draw the image on the form. The code performs the following actions:
+
+- Creates an image from a file named SampImag.jpg. This file must be located in the same folder as the application executable file.
+
+- Creates a point at which to draw the upper-left corner of the image.
+
+- Draws the unscaled image on the form.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp" id="Snippet55":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs" id="Snippet55":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet55":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb" id="Snippet55":::
+
]]>
Images, Bitmaps, and Metafiles
- Working with Images, Bitmaps, Icons, and Metafiles
+ Working with Images, Bitmaps, Icons, and Metafiles
@@ -147,13 +147,13 @@
Releases all resources used by this .
- [!NOTE]
-> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
-
+> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
+
]]>
@@ -191,16 +191,16 @@
Releases all resources used by this .
- method allows the resources used by this to be reallocated for other purposes.
-
- Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
-
+ method allows the resources used by this to be reallocated for other purposes.
+
+ Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
+
> [!NOTE]
-> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
-
+> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
+
]]>
@@ -239,13 +239,13 @@
to release both managed and unmanaged resources; to release only unmanaged resources.
Releases the unmanaged resources used by the and optionally releases the managed resources.
- [!NOTE]
-> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
-
+> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
+
]]>
@@ -318,30 +318,30 @@
Gets attribute flags for the pixel data of this .
The integer representing a bitwise combination of for this .
- , as described in the following table.
-
-|ImageFlag value|Integer representation|
-|---------------------|----------------------------|
-|`ImageFlagsNone`|0|
-|`ImageFlagsScalable`|1|
-|`ImageFlagsHasAlpha`|2|
-|`ImageFlagsHasTranslucent`|4|
-|`ImageFlagsPartiallyScalable`|8|
-|`ImageFlagsColorSpaceRGB`|16|
-|`ImageFlagsColorSpaceCMYK`|32|
-|`ImageFlagsColorSpaceGRAY`|64|
-|`ImageFlagsColorSpaceYCBCR`|128|
-|`ImageFlagsColorSpaceYCCK`|256|
-|`ImageFlagsHasRealDPI`|4096|
-|`ImageFlagsHasRealPixelSize`|8192|
-|`ImageFlagsReadOnly`|65536|
-|`ImageFlagsCaching`|131072|
-
- For example, if the property for an image returned 77960, the for the image would be , , , , and .
-
+ , as described in the following table.
+
+|ImageFlag value|Integer representation|
+|---------------------|----------------------------|
+|`ImageFlagsNone`|0|
+|`ImageFlagsScalable`|1|
+|`ImageFlagsHasAlpha`|2|
+|`ImageFlagsHasTranslucent`|4|
+|`ImageFlagsPartiallyScalable`|8|
+|`ImageFlagsColorSpaceRGB`|16|
+|`ImageFlagsColorSpaceCMYK`|32|
+|`ImageFlagsColorSpaceGRAY`|64|
+|`ImageFlagsColorSpaceYCBCR`|128|
+|`ImageFlagsColorSpaceYCCK`|256|
+|`ImageFlagsHasRealDPI`|4096|
+|`ImageFlagsHasRealPixelSize`|8192|
+|`ImageFlagsReadOnly`|65536|
+|`ImageFlagsCaching`|131072|
+
+ For example, if the property for an image returned 77960, the for the image would be , , , , and .
+
]]>
@@ -382,15 +382,15 @@
Gets an array of GUIDs that represent the dimensions of frames within this .
An array of GUIDs that specify the dimensions of frames within this from most significant to least significant.
- .
-
+ .
+
]]>
@@ -444,48 +444,48 @@
Creates an from the specified file.
The this method creates.
- is disposed.
-
- If the file does not have a valid image format or if GDI+ does not support the pixel format of the file, this method throws an exception.
-
+ is disposed.
+
+ If the file does not have a valid image format or if GDI+ does not support the pixel format of the file, this method throws an exception.
+
> [!NOTE]
-> The class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel.
-
-
-
-## Examples
- The following code example demonstrates how to use the and methods. This example is designed to be used with Windows Forms. To run this example, paste it into a form, and handle the form's event by calling the `DemonstratePropertyItem` method, passing `e` as .
-
+> The class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel.
+
+
+
+## Examples
+ The following code example demonstrates how to use the and methods. This example is designed to be used with Windows Forms. To run this example, paste it into a form, and handle the form's event by calling the `DemonstratePropertyItem` method, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp" id="Snippet7":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet7":::
+
]]>
- The file does not have a valid image format.
-
- -or-
-
+ The file does not have a valid image format.
+
+ -or-
+
GDI+ does not support the pixel format of the file.
The specified file does not exist.
is a .
- Types of Bitmaps
+ Types of Bitmaps
@@ -524,52 +524,52 @@
Creates an from the specified file using embedded color management information in that file.
The this method creates.
- exception.
-
- The file remains locked until the is disposed.
-
- The `useEmbeddedColorManagement` parameter specifies whether the new applies color correction according to color management information that is embedded in the image file. Embedded information can include International Color Consortium (ICC) profiles, gamma values, and chromaticity information.
-
+ exception.
+
+ The file remains locked until the is disposed.
+
+ The `useEmbeddedColorManagement` parameter specifies whether the new applies color correction according to color management information that is embedded in the image file. Embedded information can include International Color Consortium (ICC) profiles, gamma values, and chromaticity information.
+
> [!NOTE]
-> The class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel.
-
-
-
-## Examples
- The following code example demonstrates how to obtain a new bitmap using the method. It also demonstrates a .
-
- This example is designed to be used with Windows Forms. Create a form containing a button named `Button2`. Paste the code into the form and associate the `Button2_Click` method with the button's event.
-
+> The class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel.
+
+
+
+## Examples
+ The following code example demonstrates how to obtain a new bitmap using the method. It also demonstrates a .
+
+ This example is designed to be used with Windows Forms. Create a form containing a button named `Button2`. Paste the code into the form and associate the `Button2_Click` method with the button's event.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet2":::
+
]]>
- The file does not have a valid image format.
-
- -or-
-
+ The file does not have a valid image format.
+
+ -or-
+
GDI+ does not support the pixel format of the file.
The specified file does not exist.
is a .
- Types of Bitmaps
+ Types of Bitmaps
@@ -615,11 +615,11 @@
Creates a from a handle to a GDI bitmap.
The this method creates.
- method makes a copy of the GDI bitmap; so you can release the incoming GDI bitmap using the GDI `DeleteObject` method immediately after creating the new .
-
+ method makes a copy of the GDI bitmap; so you can release the incoming GDI bitmap using the GDI `DeleteObject` method immediately after creating the new .
+
]]>
@@ -660,11 +660,11 @@
Creates a from a handle to a GDI bitmap and a handle to a GDI palette.
The this method creates.
- method makes a copy of the GDI bitmap; so you can release the incoming GDI bitmap using the GDI `DeleteObject` method immediately after creating the new .
-
+ method makes a copy of the GDI bitmap; so you can release the incoming GDI bitmap using the GDI `DeleteObject` method immediately after creating the new .
+
]]>
@@ -718,22 +718,22 @@
Creates an from the specified data stream.
The this method creates.
- .
-
- The stream is reset to zero if this method is called successively with the same stream.
-
+ .
+
+ The stream is reset to zero if this method is called successively with the same stream.
+
> [!NOTE]
-> The class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel.
-
+> The class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel.
+
]]>
- The stream does not have a valid image format
-
- -or-
-
+ The stream does not have a valid image format
+
+ -or-
+
is .
The stream does not have a valid image format.
@@ -781,24 +781,24 @@
Creates an from the specified data stream, optionally using embedded color management information in that stream.
The this method creates.
- .
-
- The `useEmbeddedColorManagement` parameter specifies whether the new applies color correction according to color management information that is embedded in the data stream. Embedded information can include International Color Consortium (ICC) profiles, gamma values, and chromaticity information.
-
- The stream is reset to zero if this method is called successively with the same stream.
-
+ .
+
+ The `useEmbeddedColorManagement` parameter specifies whether the new applies color correction according to color management information that is embedded in the data stream. Embedded information can include International Color Consortium (ICC) profiles, gamma values, and chromaticity information.
+
+ The stream is reset to zero if this method is called successively with the same stream.
+
> [!NOTE]
-> The class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel.
-
+> The class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel.
+
]]>
- The stream does not have a valid image format
-
- -or-
-
+ The stream does not have a valid image format
+
+ -or-
+
is .
The stream does not have a valid image format.
@@ -843,14 +843,14 @@
Creates an from the specified data stream, optionally using embedded color management information and validating the image data.
The this method creates.
- applies color correction according to color management information that is embedded in the data stream. Embedded information can include International Color Consortium (ICC) profiles, gamma values, and chromaticity information.
-
+ applies color correction according to color management information that is embedded in the data stream. Embedded information can include International Color Consortium (ICC) profiles, gamma values, and chromaticity information.
+
> [!NOTE]
-> The class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel.
-
+> The class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel.
+
]]>
The stream does not have a valid image format.
@@ -891,17 +891,17 @@
Gets the bounds of the image in the specified unit.
The that represents the bounds of the image, in the specified unit.
- handle, using the enumeration, and how to use the method to draw the rectangle bounds of a bitmap.
-
- This example is designed to be used with Windows Forms. Create a form that contains a button named `Button2`. Paste the code into the form and associate this method with the button's event.
-
+ handle, using the enumeration, and how to use the method to draw the rectangle bounds of a bitmap.
+
+ This example is designed to be used with Windows Forms. Create a form that contains a button named `Button2`. Paste the code into the form and associate this method with the button's event.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BitmapMembers/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BitmapMembers/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -977,15 +977,15 @@
Returns the number of frames of the specified dimension.
The number of frames in the specified dimension.
- .
-
+ .
+
]]>
@@ -1061,22 +1061,22 @@
Gets the specified property item from this .
The this method gets.
- .
-
- It is difficult to set property items, because the class has no public constructors. One way to work around this restriction is to obtain a by retrieving the property value or calling the method of an that already has property items. Then you can set the fields of the and pass it to .
-
-
-
-## Examples
- The following code example demonstrates how to use the and methods. This example calls passing an ID value. For a list of ID values see, . This example is designed to be used with Windows Forms. To run this example, paste it into a form, and handle the form's event by calling the `DemonstratePropertyItem` method, passing `e` as .
-
+ .
+
+ It is difficult to set property items, because the class has no public constructors. One way to work around this restriction is to obtain a by retrieving the property value or calling the method of an that already has property items. Then you can set the fields of the and pass it to .
+
+
+
+## Examples
+ The following code example demonstrates how to use the and methods. This example calls passing an ID value. For a list of ID values see, . This example is designed to be used with Windows Forms. To run this example, paste it into a form, and handle the form's event by calling the `DemonstratePropertyItem` method, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp" id="Snippet7":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet7":::
+
]]>
The image format of this image does not support property items.
@@ -1118,28 +1118,28 @@
The width, in pixels, of the requested thumbnail image.
The height, in pixels, of the requested thumbnail image.
- A delegate.
-
+ A delegate.
+
**Note** You must create a delegate and pass a reference to the delegate as the parameter, but the delegate is not used.
Must be .
Returns a thumbnail for this .
An that represents the thumbnail.
- contains an embedded thumbnail image, this method retrieves the embedded thumbnail and scales it to the requested size. If the does not contain an embedded thumbnail image, this method creates a thumbnail image by scaling the main image.
-
- The method works well when the requested thumbnail image has a size of about 120 x 120 pixels. If you request a large thumbnail image (for example, 300 x 300) from an that has an embedded thumbnail, there could be a noticeable loss of quality in the thumbnail image. It might be better to scale the main image (instead of scaling the embedded thumbnail) by calling the method.
-
-
-
-## Examples
- The following code example creates and displays a thumbnail image. This delegate is never called.
-
+ contains an embedded thumbnail image, this method retrieves the embedded thumbnail and scales it to the requested size. If the does not contain an embedded thumbnail image, this method creates a thumbnail image by scaling the main image.
+
+ The method works well when the requested thumbnail image has a size of about 120 x 120 pixels. If you request a large thumbnail image (for example, 300 x 300) from an that has an embedded thumbnail, there could be a noticeable loss of quality in the thumbnail image. It might be better to scale the main image (instead of scaling the embedded thumbnail) by calling the method.
+
+
+
+## Examples
+ The following code example creates and displays a thumbnail image. This delegate is never called.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Misc3/CS/Form1.cs" id="Snippetgetthumbnail":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippetgetthumbnail":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb" id="Snippetgetthumbnail":::
+
]]>
@@ -1192,17 +1192,17 @@
Gets the height, in pixels, of this .
The height, in pixels, of this .
- and methods to recolor the image. It also uses the and properties.
-
- This example is designed to be used with a Windows Forms that contains a , , and named `Label1`, `PictureBox1`, and `Button1`, respectively. Paste the code into the form and associate the `Button1_Click` method with the button's event.
-
+ and methods to recolor the image. It also uses the and properties.
+
+ This example is designed to be used with a Windows Forms that contains a , , and named `Label1`, `PictureBox1`, and `Button1`, respectively. Paste the code into the form and associate the `Button1_Click` method with the button's event.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -1311,11 +1311,11 @@
if is canonical; otherwise, .
-
@@ -1401,11 +1401,11 @@
Gets or sets the color palette used for this .
A that represents the color palette used for this .
- object used by this .
-
+ object used by this .
+
]]>
@@ -1446,11 +1446,11 @@
Gets the width and height of this image.
A structure that represents the width and height of this .
-
@@ -1491,17 +1491,17 @@
Gets the pixel format for this .
A that represents the pixel format for this .
- and methods to recolor the image. It also uses the property.
-
- This example is designed to be used with a Windows Form that contains a , and named `Label1`, `PictureBox1`, and `Button1`, respectively. Paste the code into the form and associate the `Button1_Click` method with the button's event.
-
+ and methods to recolor the image. It also uses the property.
+
+ This example is designed to be used with a Windows Form that contains a , and named `Label1`, `PictureBox1`, and `Button1`, respectively. Paste the code into the form and associate the `Button1_Click` method with the button's event.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -1542,11 +1542,11 @@
Gets IDs of the property items stored in this .
An array of the property IDs, one for each property item stored in this image.
- property returns an empty array (that is, an array of length zero).
-
+ property returns an empty array (that is, an array of length zero).
+
]]>
How To: Read Image Metadata
@@ -1588,22 +1588,22 @@
Gets all the property items (pieces of metadata) stored in this .
An array of objects, one for each property item stored in the image.
- returns an empty array (that is, an array of length zero).
-
-
-
-## Examples
- The following code example demonstrates how to read and display the metadata in an image file using the class and the property.
-
- This example is designed to be used a Windows Form that imports the namespace. Paste the code into the form and change the path to `fakePhoto.jpg` to point to an image file on your system. Call the `ExtractMetaData` method when handling the form's event, passing `e` as .
-
+ returns an empty array (that is, an array of length zero).
+
+
+
+## Examples
+ The following code example demonstrates how to read and display the metadata in an image file using the class and the property.
+
+ This example is designed to be used a Windows Form that imports the namespace. Paste the code into the form and change the path to `fakePhoto.jpg` to point to an image file on your system. Call the `ExtractMetaData` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet6":::
+
]]>
How To: Read Image Metadata
@@ -1674,17 +1674,17 @@
The ID of the property item to remove.
Removes the specified property item from this .
- class has no public constructors. One way to work around this restriction is to obtain a by retrieving the property value or calling the method of an that already has property items. Then you can set the fields of the and pass it to .
-
+ class has no public constructors. One way to work around this restriction is to obtain a by retrieving the property value or calling the method of an that already has property items. Then you can set the fields of the and pass it to .
+
]]>
- The image does not contain the requested property item.
-
- -or-
-
+ The image does not contain the requested property item.
+
+ -or-
+
The image format for this image does not support property items.
@@ -1721,24 +1721,24 @@
A member that specifies the type of rotation and flip to apply to the image.
Rotates, flips, or rotates and flips the .
- method rotates the image clockwise.
-
- If you wish to draw on an image once it has been rotated, you should always retrieve a new graphics object from the image, otherwise an exception could occur.
-
-
-
-## Examples
- The following code example demonstrates how to call the method on an and the enumeration.
-
- This example is designed to be used with a Windows Form that contains a named `PictureBox1` and a button named `Button1`. Paste the code into a form, call `InitializeBitmap` from the form's constructor, and associate `Button1_Click` with the button's event. Ensure the file path to the bitmap is valid on your system.
-
+ method rotates the image clockwise.
+
+ If you wish to draw on an image once it has been rotated, you should always retrieve a new graphics object from the image, otherwise an exception could occur.
+
+
+
+## Examples
+ The following code example demonstrates how to call the method on an and the enumeration.
+
+ This example is designed to be used with a Windows Form that contains a named `PictureBox1` and a button named `Button1`. Paste the code into a form, call `InitializeBitmap` from the form's constructor, and associate `Button1_Click` with the button's event. Ensure the file path to the bitmap is valid on your system.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BitmapMembers/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BitmapMembers/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -1785,30 +1785,30 @@
A string that contains the name of the file to which to save this .
Saves this to the specified file or stream.
- method to save a graphic image as a Windows Metafile Format (WMF) or Enhanced Metafile Format (EMF) file, the resulting file is saved as a Portable Network Graphics (PNG) file. This behavior occurs because the GDI+ component of the .NET Framework does not have an encoder that you can use to save files as .wmf or .emf files.
-
- Saving the image to the same file it was constructed from is not allowed and throws an exception.
-
-
-
-## Examples
- The following code example demonstrates how to call the method. This example is designed to be used with Windows Forms. Create a form that contains a button named `Button5`. Paste the code into the form, and associate the method with the button's event.
-
+ method to save a graphic image as a Windows Metafile Format (WMF) or Enhanced Metafile Format (EMF) file, the resulting file is saved as a Portable Network Graphics (PNG) file. This behavior occurs because the GDI+ component of the .NET Framework does not have an encoder that you can use to save files as .wmf or .emf files.
+
+ Saving the image to the same file it was constructed from is not allowed and throws an exception.
+
+
+
+## Examples
+ The following code example demonstrates how to call the method. This example is designed to be used with Windows Forms. Create a form that contains a button named `Button5`. Paste the code into the form, and associate the method with the button's event.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet5":::
+
]]>
is .
- The image was saved with the wrong image format.
-
- -or-
-
+ The image was saved with the wrong image format.
+
+ -or-
+
The image was saved to the same file it was created from.
@@ -1847,13 +1847,13 @@
An that specifies the format of the saved image.
Saves this image to the specified stream in the specified format.
-
@@ -1896,23 +1896,23 @@
The for this .
Saves this to the specified file in the specified format.
- method. To run this example, paste the code into a Windows Form. Handle the form's event, and call the `ConstructFromResourceSaveAsGif` method, passing `e` as
-
+ method. To run this example, paste the code into a Windows Form. Handle the form's event, and call the `ConstructFromResourceSaveAsGif` method, passing `e` as
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.BmpCtorAndSave/cpp/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.BmpCtorAndSave/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BmpCtorAndSave/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BmpCtorAndSave/VB/form1.vb" id="Snippet1":::
+
]]>
or is .
- The image was saved with the wrong image format.
-
- -or-
-
+ The image was saved with the wrong image format.
+
+ -or-
+
The image was saved to the same file it was created from.
@@ -1954,13 +1954,13 @@
An that specifies parameters used by the image encoder.
Saves this image to the specified stream, with the specified encoder and image encoder parameters.
-
@@ -2006,28 +2006,28 @@
An to use for this .
Saves this to the specified file, with the specified encoder and image-encoder parameters.
- object from a BMP file. The code saves the bitmap to three JPEG files, each with a different quality level.
-
+ object from a BMP file. The code saves the bitmap to three JPEG files, each with a different quality level.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicImagingEndcoder3/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicImagingEndcoder3/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicImagingEndcoder3/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicImagingEndcoder3/VB/form1.vb" id="Snippet3":::
+
]]>
or is .
- The image was saved with the wrong image format.
-
- -or-
-
+ The image was saved with the wrong image format.
+
+ -or-
+
The image was saved to the same file it was created from.
How to: Set JPEG Compression Level
@@ -2153,13 +2153,13 @@
Selects the frame specified by the dimension and index.
Always returns 0.
- . These can be used to identify an image by its time, resolution, or page number.
-
- Calling this method causes all changes made to the previous frame to be discarded. Before selecting another frame, save all changes made to the current frame, including changes to pixel values and properties. If the call to the method is successful (an exception does not occur), the method will return 0.
-
+ . These can be used to identify an image by its time, resolution, or page number.
+
+ Calling this method causes all changes made to the previous frame to be discarded. Before selecting another frame, save all changes made to the current frame, including changes to pixel values and properties. If the call to the method is successful (an exception does not occur), the method will return 0.
+
]]>
@@ -2197,22 +2197,22 @@
The to be stored.
Stores a property item (piece of metadata) in this .
- with the message "Property not supported." If the image format supports property items but does not support the particular property you are attempting to set, this method ignores the attempt but does not throw an exception.
-
- It is difficult to set property items, because the class has no public constructors. One way to work around this restriction is to obtain a by retrieving the property value or calling the method of an that already has property items. Then you can set the fields of the and pass it to .
-
-
-
-## Examples
- The following code example demonstrates how to use the and methods. This example is designed to be used with Windows Forms. To run this example, paste it into a form, and handle the form's event by calling the `DemonstratePropertyItem` method, passing `e` as .
-
+ with the message "Property not supported." If the image format supports property items but does not support the particular property you are attempting to set, this method ignores the attempt but does not throw an exception.
+
+ It is difficult to set property items, because the class has no public constructors. One way to work around this restriction is to obtain a by retrieving the property value or calling the method of an that already has property items. Then you can set the fields of the and pass it to .
+
+
+
+## Examples
+ The following code example demonstrates how to use the and methods. This example is designed to be used with Windows Forms. To run this example, paste it into a form, and handle the form's event by calling the `DemonstratePropertyItem` method, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp" id="Snippet7":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet7":::
+
]]>
The image format of this image does not support property items.
@@ -2441,17 +2441,17 @@
Gets the width, in pixels, of this .
The width, in pixels, of this .
- from a file, using the and methods to recolor the image. It also uses the , , and properties.
-
- This example is designed to be used with a Windows Forms that contains a , and named `Label1`, `PictureBox1` and `Button1`, respectively. Paste the code into the form and associate the `Button1_Click` method with the button's event.
-
+ from a file, using the and methods to recolor the image. It also uses the , , and properties.
+
+ This example is designed to be used with a Windows Forms that contains a , and named `Label1`, `PictureBox1` and `Button1`, respectively. Paste the code into the form and associate the `Button1_Click` method with the button's event.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet1":::
+
]]>
diff --git a/xml/System.Drawing/ImageAnimator.xml b/xml/System.Drawing/ImageAnimator.xml
index 4d7290cb791..b3d8a41ab3c 100644
--- a/xml/System.Drawing/ImageAnimator.xml
+++ b/xml/System.Drawing/ImageAnimator.xml
@@ -64,15 +64,19 @@
An object that specifies the method that is called when the animation frame changes.
Displays a multiple-frame image as an animation.
-
diff --git a/xml/System.Drawing/Pen.xml b/xml/System.Drawing/Pen.xml
index 0e2eb04797a..4e7c15de64c 100644
--- a/xml/System.Drawing/Pen.xml
+++ b/xml/System.Drawing/Pen.xml
@@ -34,22 +34,22 @@
Defines an object used to draw lines and curves. This class cannot be inherited.
- draws a line of specified width and style. Use the property to draw several varieties of dashed lines. The line drawn by a can be filled in a variety of fill styles, including solid colors and textures. The fill style depends on brush or texture that is used as the fill object.
-
-
-
-## Examples
- The following code example demonstrates constructing a with a and the effects of setting the property on a .
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineJoin` method when handling the form's event, passing `e` as .
-
+ draws a line of specified width and style. Use the property to draw several varieties of dashed lines. The line drawn by a can be filled in a variety of fill styles, including solid colors and textures. The fill style depends on brush or texture that is used as the fill object.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+## Examples
+ The following code example demonstrates constructing a with a and the effects of setting the property on a .
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineJoin` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.PensExample/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.PensExample/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -99,24 +99,24 @@
A that determines the fill properties of this .
Initializes a new instance of the class with the specified .
- property determines how the draws lines. Lines are drawn as if they are filled rectangles, with the characteristics of the specified .
-
- The property of the new is set to 1 (the default).
-
-
-
-## Examples
- The following code example demonstrates constructing a with a and the effects of setting the property on a .
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineJoin` method when handling the form's event, passing `e` as .
-
+ property determines how the draws lines. Lines are drawn as if they are filled rectangles, with the characteristics of the specified .
+
+ The property of the new is set to 1 (the default).
+
+
+
+## Examples
+ The following code example demonstrates constructing a with a and the effects of setting the property on a .
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineJoin` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.PensExample/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.PensExample/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -159,11 +159,11 @@
A structure that indicates the color of this .
Initializes a new instance of the class with the specified color.
- property is set to the color specified by the `color` parameter. The property is set to 1 (the default).
-
+ property is set to the color specified by the `color` parameter. The property is set to 1 (the default).
+
]]>
@@ -200,26 +200,26 @@
The width of the new .
Initializes a new instance of the class with the specified and .
- is set to the color specified in the `brush` parameter, the property is set to the value specified in the `width` parameter, and the units are set to .
-
- Note that the `brush` parameter also specifies the property of this .
-
- A `width` of 0 will result in the drawing as if the width were 1.
-
-
-
-## Examples
- The following code example creates a and demonstrates the effects of setting the and properties on a .
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowStartAndEndCaps` method when handling the form's event, passing `e` as .
-
+ is set to the color specified in the `brush` parameter, the property is set to the value specified in the `width` parameter, and the units are set to .
+
+ Note that the `brush` parameter also specifies the property of this .
+
+ A `width` of 0 will result in the drawing as if the width were 1.
+
+
+
+## Examples
+ The following code example creates a and demonstrates the effects of setting the and properties on a .
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowStartAndEndCaps` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -258,22 +258,22 @@
A value indicating the width of this .
Initializes a new instance of the class with the specified and properties.
- property is set to the color specified by the `color` parameter. The property is set to the value specified in the `width` parameter. A `width` of 0 will result in the drawing as if the width were 1.
-
-
-
-## Examples
- The following code example demonstrates creating a and the effects of setting the , , and properties.
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowPensAndSmoothingMode` method when handling the form's event, passing e as .
-
+ property is set to the color specified by the `color` parameter. The property is set to the value specified in the `width` parameter. A `width` of 0 will result in the drawing as if the width were 1.
+
+
+
+## Examples
+ The following code example demonstrates creating a and the effects of setting the , , and properties.
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowPensAndSmoothingMode` method when handling the form's event, passing e as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.PensExample/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.PensExample/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -308,13 +308,13 @@
Gets or sets the alignment for this .
A that represents the alignment for this .
- draws closed curves and polygons. The enumeration specifies five values; however, only two values - and - will change the appearance of a drawn line. is the default value for this property and specifies that the width of the pen is centered on the outline of the curve or polygon. A value of for this property specifies that the width of the pen is inside the outline of the curve or polygon. The other three values, , , and , will result in a pen that is centered.
-
- A that has its alignment set to will yield unreliable results, sometimes drawing in the inset position and sometimes in the centered position. Also, an inset pen cannot be used to draw compound lines and cannot draw dashed lines with dash caps.
-
+ draws closed curves and polygons. The enumeration specifies five values; however, only two values - and - will change the appearance of a drawn line. is the default value for this property and specifies that the width of the pen is centered on the outline of the curve or polygon. A value of for this property specifies that the width of the pen is inside the outline of the curve or polygon. The other three values, , , and , will result in a pen that is centered.
+
+ A that has its alignment set to will yield unreliable results, sometimes drawing in the inset position and sometimes in the centered position. Also, an inset pen cannot be used to draw compound lines and cannot draw dashed lines with dash caps.
+
]]>
The specified value is not a member of .
@@ -351,11 +351,11 @@
Gets or sets the that determines attributes of this .
A that determines attributes of this .
- property of the .
-
+ property of the .
+
]]>
The property is set on an immutable , such as those returned by the class.
@@ -395,21 +395,21 @@
Creates an exact copy of this .
An that can be cast to a .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Creates a copy of that pen.
-
-- Draws a line to the screen, using the copy of the pen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Creates a copy of that pen.
+
+- Draws a line to the screen, using the copy of the pen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -477,15 +477,15 @@
Gets or sets an array of values that specifies a compound pen. A compound pen draws a compound line made up of parallel lines and spaces.
An array of real numbers that specifies the compound array. The elements in the array must be in increasing order, not less than 0, and not greater than 1.
- and an array of real numbers. Set the compound array by passing the array with the values 0.0, 0.2, 0.7, and 1.0 to this property.
-
- Do not set this property if the has its property set to .
-
+ and an array of real numbers. Set the compound array by passing the array with the values 0.0, 0.2, 0.7, and 1.0 to this property.
+
+ Do not set this property if the has its property set to .
+
]]>
The property is set on an immutable , such as those returned by the class.
@@ -587,22 +587,22 @@
Gets or sets the cap style used at the end of the dashes that make up dashed lines drawn with this .
One of the values that represents the cap style used at the beginning and end of the dashes that make up dashed lines drawn with this .
- if the has its property set to .
-
-
-
-## Examples
- The following code example demonstrates creating a and the effects of setting the , , and properties.
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowPensAndSmoothingMode` method when handling the form's event, passing `e` as .
-
+ if the has its property set to .
+
+
+
+## Examples
+ The following code example demonstrates creating a and the effects of setting the , , and properties.
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowPensAndSmoothingMode` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.PensExample/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.PensExample/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet3":::
+
]]>
The specified value is not a member of .
@@ -672,26 +672,26 @@
Gets or sets an array of custom dashes and spaces.
An array of real numbers that specifies the lengths of alternating dashes and spaces in dashed lines.
- property for this to .
-
- The elements in the `dashArray` array set the length of each dash and space in the dash pattern. The first element sets the length of a dash, the second element sets the length of a space, the third element sets the length of a dash, and so on. Consequently, each element should be a non-zero positive number.
-
- The length of each dash and space in the dash pattern is the product of the element value in the array and the width of the .
-
-
-
-## Examples
- The following code example demonstrates the effects of setting the , , and properties.
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowPensAndSmoothingMode` method when handling the form's event, passing `e` as .
-
+ property for this to .
+
+ The elements in the `dashArray` array set the length of each dash and space in the dash pattern. The first element sets the length of a dash, the second element sets the length of a space, the third element sets the length of a dash, and so on. Consequently, each element should be a non-zero positive number.
+
+ The length of each dash and space in the dash pattern is the product of the element value in the array and the width of the .
+
+
+
+## Examples
+ The following code example demonstrates the effects of setting the , , and properties.
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowPensAndSmoothingMode` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.PensExample/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.PensExample/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet3":::
+
]]>
The property is set on an immutable , such as those returned by the class.
@@ -727,11 +727,11 @@
Gets or sets the style used for dashed lines drawn with this .
A that represents the style used for dashed lines drawn with this .
- for this property specifies that a custom pattern of dashes and spaces, defined by the property, makes up lines drawn with this . If the value of this property is and the value of the property is `null`, the pen draws solid lines.
-
+ for this property specifies that a custom pattern of dashes and spaces, defined by the property, makes up lines drawn with this . If the value of this property is and the value of the property is `null`, the pen draws solid lines.
+
]]>
The property is set on an immutable , such as those returned by the class.
@@ -770,27 +770,27 @@
Releases all resources used by this .
- allows the resources used by this to be reallocated for other purposes.
-
- Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
-
+ allows the resources used by this to be reallocated for other purposes.
+
+ Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
+
> [!NOTE]
-> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
-
-
-
-## Examples
- The following code example demonstrates the effects of setting the and properties, and shows how to call the method for a .
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineJoin` method when handling the form's event, passing `e` as .
-
+> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
+
+
+
+## Examples
+ The following code example demonstrates the effects of setting the and properties, and shows how to call the method for a .
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineJoin` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.PensExample/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.PensExample/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -825,17 +825,17 @@
Gets or sets the cap style used at the end of lines drawn with this .
One of the values that represents the cap style used at the end of lines drawn with this .
- and properties on a .
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowStartAndEndCaps` method when handling the form's event, passing `e` as .
-
+ and properties on a .
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowStartAndEndCaps` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.PensExample/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.PensExample/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet2":::
+
]]>
The specified value is not a member of .
@@ -904,24 +904,24 @@
Gets or sets the join style for the ends of two consecutive lines drawn with this .
A that represents the join style for the ends of two consecutive lines drawn with this .
- object, that join style will be applied to all the connected lines in any object drawn using that pen. The following illustration shows the results of the beveled line join example.
-
- 
-
-
-
-## Examples
- The following code example demonstrates the effects of setting the and properties on a .
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineJoin` method when handling the form's event, passing `e` as .
-
+ object, that join style will be applied to all the connected lines in any object drawn using that pen. The following illustration shows the results of the beveled line join example.
+
+ 
+
+
+
+## Examples
+ The following code example demonstrates the effects of setting the and properties on a .
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineJoin` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.PensExample/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.PensExample/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet1":::
+
]]>
The property is set on an immutable , such as those returned by the class.
@@ -957,13 +957,13 @@
Gets or sets the limit of the thickness of the join on a mitered corner.
The limit of the thickness of the join on a mitered corner.
-
The property is set on an immutable , such as those returned by the class.
@@ -1017,28 +1017,28 @@
The object by which to multiply the transformation matrix.
Multiplies the transformation matrix for this by the specified .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Draws a line to the screen.
-
-- Multiplies the transformation matrix of the pen by the specified matrix.
-
-- Draws a line with the transformed pen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Draws a line to the screen.
+
+- Multiplies the transformation matrix of the pen by the specified matrix.
+
+- Draws a line with the transformed pen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -1078,28 +1078,28 @@
The order in which to perform the multiplication operation.
Multiplies the transformation matrix for this by the specified in the specified order.
- enumeration element (either prepend or append) specified by the `order` parameter to carry out the multiplication operation.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Draws a line to the screen.
-
-- Multiplies the transformation matrix of the pen by the specified matrix.
-
-- Draws a line with the transformed pen.
-
+ enumeration element (either prepend or append) specified by the `order` parameter to carry out the multiplication operation.
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Draws a line to the screen.
+
+- Multiplies the transformation matrix of the pen by the specified matrix.
+
+- Draws a line with the transformed pen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -1134,11 +1134,11 @@
Gets the style of lines drawn with this .
A enumeration that specifies the style of lines drawn with this .
- can draw solid lines, filled lines, or textured lines, depending on the style specified by a member of the enumeration.
-
+ can draw solid lines, filled lines, or textured lines, depending on the style specified by a member of the enumeration.
+
]]>
@@ -1173,25 +1173,25 @@
Resets the geometric transformation matrix for this to identity.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Sets the transformation matrix of the pen to scale 2 times in the x-axis direction.
-
-- Draws a line to the screen.
-
-- Resets the transformation matrix to identity.
-
-- Draws a second line to the screen.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Sets the transformation matrix of the pen to scale 2 times in the x-axis direction.
+
+- Draws a line to the screen.
+
+- Resets the transformation matrix to identity.
+
+- Draws a second line to the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CPP/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CS/form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet4":::
+
]]>
@@ -1244,30 +1244,30 @@
The angle of rotation.
Rotates the local geometric transformation by the specified angle. This method prepends the rotation to the transformation.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Draws a rectangle using the pen.
-
-- Scales the pen by 2 times in the x-axis direction.
-
-- Rotates the pen 90 degrees clockwise.
-
-- Draws a second rectangle to demonstrate the difference.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Draws a rectangle using the pen.
+
+- Scales the pen by 2 times in the x-axis direction.
+
+- Rotates the pen 90 degrees clockwise.
+
+- Draws a second rectangle to demonstrate the difference.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet5":::
+
]]>
@@ -1307,30 +1307,30 @@
A that specifies whether to append or prepend the rotation matrix.
Rotates the local geometric transformation by the specified angle in the specified order.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Scales the pen by 2 times in the x-axis direction.
-
-- Draws a rectangle using the pen.
-
-- Rotates the pen 90 degrees clockwise.
-
-- Draws a second rectangle to demonstrate the difference.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Scales the pen by 2 times in the x-axis direction.
+
+- Draws a rectangle using the pen.
+
+- Rotates the pen 90 degrees clockwise.
+
+- Draws a second rectangle to demonstrate the difference.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CPP/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CS/form1.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet6":::
+
]]>
@@ -1385,23 +1385,23 @@
The factor by which to scale the transformation in the y-axis direction.
Scales the local geometric transformation by the specified factors. This method prepends the scaling matrix to the transformation.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
- Creates a .
-
- Draws a rectangle using the pen.
-
- Scales the pen by 2 times in the x-axis direction.
-
- Draws a second rectangle to demonstrate the difference.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+ Creates a .
+
+ Draws a rectangle using the pen.
+
+ Scales the pen by 2 times in the x-axis direction.
+
+ Draws a second rectangle to demonstrate the difference.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CPP/form1.cpp" id="Snippet7":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CS/form1.cs" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet7":::
+
]]>
@@ -1443,23 +1443,23 @@
A that specifies whether to append or prepend the scaling matrix.
Scales the local geometric transformation by the specified factors in the specified order.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a .
-
-- Draws a rectangle using the pen.
-
-- Scales the pen by 2 times in the x-axis direction.
-
-- Draws a second rectangle to demonstrate the difference.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a .
+
+- Draws a rectangle using the pen.
+
+- Scales the pen by 2 times in the x-axis direction.
+
+- Draws a second rectangle to demonstrate the difference.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CPP/form1.cpp" id="Snippet8":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CS/form1.cs" id="Snippet8":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet8":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet8":::
+
]]>
@@ -1501,15 +1501,15 @@
A that represents the cap style to use at the beginning or end of dashed lines drawn with this .
Sets the values that determine the style of cap used to end lines drawn by this .
- `e`, which is a parameter of the event handler. The code creates a and sets it to draw arrow anchor caps at the beginning of lines:
-
+ `e`, which is a parameter of the event handler. The code creates a and sets it to draw arrow anchor caps at the beginning of lines:
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CPP/form1.cpp" id="Snippet9":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/CS/form1.cs" id="Snippet9":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet9":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicPenExamples/VB/form1.vb" id="Snippet9":::
+
]]>
@@ -1544,17 +1544,17 @@
Gets or sets the cap style used at the beginning of lines drawn with this .
One of the values that represents the cap style used at the beginning of lines drawn with this .
- and properties on a .
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowStartAndEndCaps` method when handling the form's event, passing `e` as .
-
+ and properties on a .
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowStartAndEndCaps` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.PensExample/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.PensExample/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet2":::
+
]]>
The specified value is not a member of .
@@ -1591,11 +1591,11 @@
Gets or sets a copy of the geometric transformation for this .
A copy of the that represents the geometric transformation for this .
- property is a copy of the pen's geometric transform, you should dispose of the matrix when you no longer need it.
-
+ property is a copy of the pen's geometric transform, you should dispose of the matrix when you no longer need it.
+
]]>
The property is set on an immutable , such as those returned by the class.
@@ -1722,22 +1722,22 @@
Gets or sets the width of this , in units of the object used for drawing.
The width of this .
- object using its property. The unit of measure is typically pixels. A of 0 will result in the drawing as if the were 1.
-
-
-
-## Examples
- The following code example demonstrates the effects of setting the and properties on a .
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineJoin` method when handling the form's event, passing `e` as .
-
+ object using its property. The unit of measure is typically pixels. A of 0 will result in the drawing as if the were 1.
+
+
+
+## Examples
+ The following code example demonstrates the effects of setting the and properties on a .
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineJoin` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.PensExample/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.PensExample/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet1":::
+
]]>
The property is set on an immutable , such as those returned by the class.
diff --git a/xml/System.Drawing/Pens.xml b/xml/System.Drawing/Pens.xml
index 8ef0d4ffdc3..67173d82598 100644
--- a/xml/System.Drawing/Pens.xml
+++ b/xml/System.Drawing/Pens.xml
@@ -31,20 +31,20 @@
Pens for all the standard colors. This class cannot be inherited.
- objects returned by this class are immutable, meaning their properties cannot be changed. To see the colors represented by pens in this class, see [Colors by Name](https://go.microsoft.com/fwlink/?LinkId=92332).
-
-
-
-## Examples
- The following method demonstrates how to use the class. This example is designed to be used with Windows Forms. Paste the code into a form and call the `UsePensClass` method when handling the form's event, passing `e` as .
-
+ objects returned by this class are immutable, meaning their properties cannot be changed. To see the colors represented by pens in this class, see [Colors by Name](https://go.microsoft.com/fwlink/?LinkId=92332).
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+## Examples
+ The following method demonstrates how to use the class. This example is designed to be used with Windows Forms. Paste the code into a form and call the `UsePensClass` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.PensExample/CPP/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.PensExample/CS/form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PensExample/VB/form1.vb" id="Snippet4":::
+
]]>
Using a Pen to Draw Lines and Shapes
@@ -80,11 +80,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -119,11 +119,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -158,11 +158,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -197,11 +197,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -236,11 +236,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -275,11 +275,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -314,11 +314,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -353,11 +353,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -392,11 +392,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -431,11 +431,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -470,11 +470,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -509,11 +509,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -548,11 +548,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -587,11 +587,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -626,11 +626,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -665,11 +665,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -704,11 +704,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -743,11 +743,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -782,11 +782,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -821,11 +821,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -860,11 +860,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -899,11 +899,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -938,11 +938,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -977,11 +977,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1016,11 +1016,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1055,11 +1055,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1094,11 +1094,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1133,11 +1133,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1172,11 +1172,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1211,11 +1211,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1250,11 +1250,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1289,11 +1289,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1328,11 +1328,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1367,11 +1367,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1406,11 +1406,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1445,11 +1445,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1484,11 +1484,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1523,11 +1523,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1562,11 +1562,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1601,11 +1601,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1640,11 +1640,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1679,11 +1679,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1718,11 +1718,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1757,11 +1757,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1796,11 +1796,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1835,11 +1835,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1874,11 +1874,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1913,11 +1913,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1952,11 +1952,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -1991,11 +1991,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2030,11 +2030,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2069,11 +2069,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2108,11 +2108,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2147,11 +2147,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2186,11 +2186,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2225,11 +2225,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2264,11 +2264,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2303,11 +2303,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2342,11 +2342,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2381,11 +2381,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2420,11 +2420,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2459,11 +2459,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2498,11 +2498,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2537,11 +2537,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2576,11 +2576,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2615,11 +2615,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2654,11 +2654,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2693,11 +2693,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2732,11 +2732,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2771,11 +2771,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2810,11 +2810,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2849,11 +2849,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2888,11 +2888,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2927,11 +2927,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -2966,11 +2966,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3005,11 +3005,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3044,11 +3044,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3083,11 +3083,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3122,11 +3122,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3161,11 +3161,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3200,11 +3200,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3239,11 +3239,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3278,11 +3278,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3317,11 +3317,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3356,11 +3356,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3395,11 +3395,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3434,11 +3434,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3473,11 +3473,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3512,11 +3512,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3551,11 +3551,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3590,11 +3590,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3629,11 +3629,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3668,11 +3668,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3707,11 +3707,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3746,11 +3746,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3785,11 +3785,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3824,11 +3824,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3863,11 +3863,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3902,11 +3902,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3941,11 +3941,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -3980,11 +3980,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4019,11 +4019,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4058,11 +4058,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4097,11 +4097,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4136,11 +4136,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4175,11 +4175,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4214,11 +4214,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4253,11 +4253,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4292,11 +4292,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4331,11 +4331,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4370,11 +4370,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4409,11 +4409,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4448,11 +4448,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4487,11 +4487,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4526,11 +4526,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4565,11 +4565,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4604,11 +4604,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4643,11 +4643,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4682,11 +4682,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4721,11 +4721,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4760,11 +4760,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4799,11 +4799,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4838,11 +4838,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4877,11 +4877,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4916,11 +4916,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4955,11 +4955,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -4994,11 +4994,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -5033,11 +5033,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -5072,11 +5072,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -5111,11 +5111,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -5150,11 +5150,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -5189,11 +5189,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -5228,11 +5228,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -5267,11 +5267,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -5306,11 +5306,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -5345,11 +5345,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -5384,11 +5384,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -5423,11 +5423,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -5462,11 +5462,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -5501,11 +5501,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
@@ -5540,11 +5540,11 @@
A system-defined object with a width of 1.
A object set to a system-defined color.
-
diff --git a/xml/System.Drawing/Region.xml b/xml/System.Drawing/Region.xml
index af3848e3c6e..bc88da1caf3 100644
--- a/xml/System.Drawing/Region.xml
+++ b/xml/System.Drawing/Region.xml
@@ -37,24 +37,24 @@
Describes the interior of a graphics shape composed of rectangles and paths. This class cannot be inherited.
- method and a object.
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code example demonstrates how to use the from one object to set the for another .
-
+ method and a object.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code example demonstrates how to use the from one object to set the for another .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet13":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet13":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet13":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet13":::
+
]]>
@@ -97,11 +97,11 @@
Initializes a new .
- with an infinite interior.
-
+ with an infinite interior.
+
]]>
@@ -136,11 +136,11 @@
A that defines the new .
Initializes a new with the specified .
- with a . The new region is defined as the interior of the specified by the `path` parameter.
-
+ with a . The new region is defined as the interior of the specified by the `path` parameter.
+
]]>
@@ -177,11 +177,11 @@
A that defines the interior of the new .
Initializes a new from the specified data.
- with an interior defined by an existing . The `rgnData` parameter is an array that contains the definition of an existing .
-
+ with an interior defined by an existing . The `rgnData` parameter is an array that contains the definition of an existing .
+
]]>
@@ -218,20 +218,20 @@
A structure that defines the interior of the new .
Initializes a new from the specified structure.
- with a rectangular interior. The interior is defined by the `rect` parameter.
-
-
-
-## Examples
- The following code example demonstrates how to use the constructor and method. This example is designed to be used with Windows Forms. Create a form and paste the following code into it. Call the `FillEmptyRegion` method in the form's event-handling method, passing `e` as .
-
+ with a rectangular interior. The interior is defined by the `rect` parameter.
+
+
+
+## Examples
+ The following code example demonstrates how to use the constructor and method. This example is designed to be used with Windows Forms. Create a form and paste the following code into it. Call the `FillEmptyRegion` method in the form's event-handling method, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet7":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet7":::
+
]]>
@@ -266,11 +266,11 @@
A structure that defines the interior of the new .
Initializes a new from the specified structure.
- with a rectangular interior. The interior is defined by the `rect` parameter.
-
+ with a rectangular interior. The interior is defined by the `rect` parameter.
+
]]>
@@ -350,29 +350,29 @@
The to complement this .
Updates this to contain the portion of the specified that does not intersect with this .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangle and draws it to the screen in black.
-
-- Creates a second rectangle that intersects with the first and draws it to the screen in red.
-
-- Creates a region using the first rectangle.
-
-- Creates a , and adds the second rectangle to it.
-
-- Gets the complement of the region when combined with the .
-
-- Fills the complement area with blue and draws it to the screen.
-
- Notice that the area of the that does not intersect with the region is colored blue.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangle and draws it to the screen in black.
+
+- Creates a second rectangle that intersects with the first and draws it to the screen in red.
+
+- Creates a region using the first rectangle.
+
+- Creates a , and adds the second rectangle to it.
+
+- Gets the complement of the region when combined with the .
+
+- Fills the complement area with blue and draws it to the screen.
+
+ Notice that the area of the that does not intersect with the region is colored blue.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -412,11 +412,11 @@
The structure to complement this .
Updates this to contain the portion of the specified structure that does not intersect with this .
- method.
-
+ method.
+
]]>
@@ -454,27 +454,27 @@
The structure to complement this .
Updates this to contain the portion of the specified structure that does not intersect with this .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangle and draws it to the screen in black.
-
-- Creates a second rectangle that intersects with the first and draws it to the screen in red.
-
-- Creates a region using the first rectangle.
-
-- Gets the complement of that region combined with the second rectangle.
-
-- Fills the complement area with blue and draws it to the screen.
-
- Notice that the area of the second rectangle that does not intersect with the region is colored blue.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangle and draws it to the screen in black.
+
+- Creates a second rectangle that intersects with the first and draws it to the screen in red.
+
+- Creates a region using the first rectangle.
+
+- Gets the complement of that region combined with the second rectangle.
+
+- Fills the complement area with blue and draws it to the screen.
+
+ Notice that the area of the second rectangle that does not intersect with the region is colored blue.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -512,27 +512,27 @@
The object to complement this object.
Updates this to contain the portion of the specified that does not intersect with this .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangle and draws it to the screen in black
-
-- Creates a second rectangle that intersects with the first and draws it to the screen in red.
-
-- Creates one region using the first rectangle and creates a second region using the second rectangle.
-
-- Gets the complement of that first region when combined with the second region.
-
-- Fills the complement area with blue and draws it to the screen.
-
- Notice that the area of the second region that does not intersect with the first region is colored blue.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangle and draws it to the screen in black
+
+- Creates a second rectangle that intersects with the first and draws it to the screen in red.
+
+- Creates one region using the first rectangle and creates a second region using the second rectangle.
+
+- Gets the complement of that first region when combined with the second region.
+
+- Fills the complement area with blue and draws it to the screen.
+
+ Notice that the area of the second region that does not intersect with the first region is colored blue.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -572,27 +572,27 @@
Releases all resources used by this .
- allows the resources used by this to be reallocated for other purposes.
-
- Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
-
+ allows the resources used by this to be reallocated for other purposes.
+
+ Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
+
> [!NOTE]
-> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
-
-
-
-## Examples
- The following code example demonstrates the constructor and the and methods.
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `FillRegionExcludingPath` method when handling the form's event, passing `e` as .
-
+> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method.
+
+
+
+## Examples
+ The following code example demonstrates the constructor and the and methods.
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `FillRegionExcludingPath` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -634,11 +634,11 @@
if the interior of region is identical to the interior of this region when the transformation associated with the parameter is applied; otherwise, .
-
@@ -687,17 +687,17 @@
The to exclude from this .
Updates this to contain only the portion of its interior that does not intersect with the specified .
- constructor and the and methods.
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `FillRegionExcludingPath` method when handling the form's event, passing `e` as .
-
+ constructor and the and methods.
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `FillRegionExcludingPath` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.GraphicsProperties/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -737,11 +737,11 @@
The structure to exclude from this .
Updates this to contain only the portion of its interior that does not intersect with the specified structure.
- method.
-
+ method.
+
]]>
@@ -779,27 +779,27 @@
The structure to exclude from this .
Updates this to contain only the portion of its interior that does not intersect with the specified structure.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangle and draws it to the screen in black
-
-- Creates a second rectangle that intersects with the first and draws it to the screen in red.
-
-- Creates a region using the first rectangle.
-
-- Gets the nonexcluded area of the region when combined with the second rectangle.
-
-- Fills the nonexcluded area with blue and draws it to the screen.
-
- Notice that the area of the area of the region that does not intersect with the rectangle is colored blue.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangle and draws it to the screen in black
+
+- Creates a second rectangle that intersects with the first and draws it to the screen in red.
+
+- Creates a region using the first rectangle.
+
+- Gets the nonexcluded area of the region when combined with the second rectangle.
+
+- Fills the nonexcluded area with blue and draws it to the screen.
+
+ Notice that the area of the area of the region that does not intersect with the rectangle is colored blue.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CPP/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CS/form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet4":::
+
]]>
@@ -837,11 +837,11 @@
The to exclude from this .
Updates this to contain only the portion of its interior that does not intersect with the specified .
- and methods.
-
+ and methods.
+
]]>
@@ -914,11 +914,11 @@
Initializes a new from a handle to the specified existing GDI region.
The new .
- with an interior defined by the existing referred to by the handle in the `hrgn` parameter.
-
+ with an interior defined by the existing referred to by the handle in the `hrgn` parameter.
+
]]>
@@ -957,30 +957,30 @@
Gets a structure that represents a rectangle that bounds this on the drawing surface of a object.
A structure that represents the bounding rectangle for this on the specified drawing surface.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a and adds an ellipse to it.
-
-- Fills the path with blue and draws it to the screen.
-
-- Creates a region that uses the .
-
-- Gets the nonexcluded area of the region when combined with the second rectangle.
-
-- Gets the bounding rectangle for the region and draws it to the screen in red.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a and adds an ellipse to it.
+
+- Fills the path with blue and draws it to the screen.
+
+- Creates a region that uses the .
+
+- Gets the nonexcluded area of the region when combined with the second rectangle.
+
+- Gets the bounding rectangle for the region and draws it to the screen in red.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet5":::
+
]]>
@@ -1021,11 +1021,11 @@
Returns a Windows handle to this in the specified graphics context.
A Windows handle to this .
- method to free the memory used by the GDI region object.
-
+ method to free the memory used by the GDI region object.
+
]]>
@@ -1064,20 +1064,20 @@
Returns a that represents the information that describes this .
A that represents the information that describes this .
- class allows you to define a custom shape. The shape can be made up of lines, polygons, and curves. describes the shape contained in this .
-
-
-
-## Examples
- The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code example demonstrates how to use the from one object to set the for another .
-
+ class allows you to define a custom shape. The shape can be made up of lines, polygons, and curves. describes the shape contained in this .
+
+
+
+## Examples
+ The following code example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code example demonstrates how to use the from one object to set the for another .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet13":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet13":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet13":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet13":::
+
]]>
@@ -1162,11 +1162,11 @@
The to intersect with this .
Updates this to the intersection of itself with the specified .
- and methods.
-
+ and methods.
+
]]>
@@ -1204,11 +1204,11 @@
The structure to intersect with this .
Updates this to the intersection of itself with the specified structure.
- method.
-
+ method.
+
]]>
@@ -1246,27 +1246,27 @@
The structure to intersect with this .
Updates this to the intersection of itself with the specified structure.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates the first rectangle and draws it to the screen in black.
-
-- Creates the second rectangle and draws it to the screen in red.
-
-- Creates a region from the first rectangle.
-
-- Gets the area of intersection for the region when combined with the second rectangle.
-
-- Fills the area of intersection with blue and draws it to the screen.
-
- Notice that only the overlapped area for the region and rectangle is blue.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates the first rectangle and draws it to the screen in black.
+
+- Creates the second rectangle and draws it to the screen in red.
+
+- Creates a region from the first rectangle.
+
+- Gets the area of intersection for the region when combined with the second rectangle.
+
+- Fills the area of intersection with blue and draws it to the screen.
+
+ Notice that only the overlapped area for the region and rectangle is blue.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CPP/form1.cpp" id="Snippet7":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CS/form1.cs" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet7":::
+
]]>
@@ -1304,11 +1304,11 @@
The to intersect with this .
Updates this to the intersection of itself with the specified .
- and method`.`
-
+ and method`.`
+
]]>
@@ -1348,11 +1348,11 @@
if the interior of this is empty when the transformation associated with is applied; otherwise, .
-
@@ -1394,11 +1394,11 @@
if the interior of this is infinite when the transformation associated with is applied; otherwise, .
-
@@ -1455,11 +1455,11 @@
when is contained within this ; otherwise, .
- method.
-
+ method.
+
]]>
@@ -1505,11 +1505,11 @@
when is contained within this ; otherwise, .
- method.
-
+ method.
+
]]>
@@ -1554,11 +1554,11 @@
Tests whether any portion of the specified structure is contained within this .
This method returns when any portion of is contained within this ; otherwise, .
- method.
-
+ method.
+
]]>
@@ -1604,27 +1604,27 @@
when any portion of is contained within this ; otherwise, .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates the first rectangle and draws it to the screen in blue.
-
-- Creates the second rectangle and draws it to the screen in red.
-
-- Creates a region from the first rectangle.
-
-- Determines if any portion of the rectangle intersects with the region.
-
-- Displays the `true` or `false` result on the screen.
-
- Notice that the rectangle intersects the region, so the result is `true`.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates the first rectangle and draws it to the screen in blue.
+
+- Creates the second rectangle and draws it to the screen in red.
+
+- Creates a region from the first rectangle.
+
+- Determines if any portion of the rectangle intersects with the region.
+
+- Displays the `true` or `false` result on the screen.
+
+ Notice that the rectangle intersects the region, so the result is `true`.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CPP/form1.cpp" id="Snippet8":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CS/form1.cs" id="Snippet8":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet8":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet8":::
+
]]>
@@ -1667,16 +1667,16 @@
when is contained within this ; otherwise, .
- method.
-
+ method.
+
]]>
@@ -1719,16 +1719,16 @@
when is contained within this ; otherwise, .
- method.
-
+ method.
+
]]>
@@ -1771,16 +1771,16 @@
when any portion of the is contained within this ; otherwise, .
- method.
-
+ method.
+
]]>
@@ -1823,16 +1823,16 @@
when is contained within this ; otherwise, .
- method.
-
+ method.
+
]]>
@@ -1874,11 +1874,11 @@
when the specified point is contained within this ; otherwise, .
- method.
-
+ method.
+
]]>
@@ -1923,16 +1923,16 @@
when the specified point is contained within this ; otherwise, .
- method.
-
+ method.
+
]]>
@@ -1977,16 +1977,16 @@
when the specified point is contained within this ; otherwise, .
- method.
-
+ method.
+
]]>
@@ -2032,11 +2032,11 @@
when any portion of the specified rectangle is contained within this ; otherwise, .
- method.
-
+ method.
+
]]>
@@ -2082,11 +2082,11 @@
when any portion of the specified rectangle is contained within this object; otherwise, .
- method.
-
+ method.
+
]]>
@@ -2135,16 +2135,16 @@
when any portion of the specified rectangle is contained within this ; otherwise, .
- method.
-
+ method.
+
]]>
@@ -2193,16 +2193,16 @@
when any portion of the specified rectangle is contained within this ; otherwise, .
- method.
-
+ method.
+
]]>
@@ -2237,15 +2237,15 @@
Initializes this to an empty interior.
- constructor and method. This example is designed to be used with Windows Forms. Create a form and paste the following code into it. Call the `FillEmptyRegion` method in the form's event-handling method, passing `e` as .
-
+ constructor and method. This example is designed to be used with Windows Forms. Create a form and paste the following code into it. Call the `FillEmptyRegion` method in the form's event-handling method, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet7":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet7":::
+
]]>
@@ -2280,15 +2280,15 @@
Initializes this object to an infinite interior.
- method. This example is designed to be used with Windows Forms. Create a form and paste the following code into it. Call the `FillEmptyRegion` method in the form's event-handling method, passing `e` as .
-
+ method. This example is designed to be used with Windows Forms. Create a form and paste the following code into it. Call the `FillEmptyRegion` method in the form's event-handling method, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet8":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet8":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet8":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet8":::
+
]]>
@@ -2362,27 +2362,27 @@
The by which to transform this .
Transforms this by the specified .
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangle and draws it to the screen in blue.
-
-- Creates a region from the rectangle.
-
-- Creates a transformation matrix and sets it to 45 degrees.
-
-- Applies the transformation to the region.
-
-- Fills the transformed region with red and draws the transformed region to the screen in red.
-
- Notice that the red rectangle is rotated 45 degrees from the original rectangle, shown in blue.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangle and draws it to the screen in blue.
+
+- Creates a region from the rectangle.
+
+- Creates a transformation matrix and sets it to 45 degrees.
+
+- Applies the transformation to the region.
+
+- Fills the transformed region with red and draws the transformed region to the screen in red.
+
+ Notice that the red rectangle is rotated 45 degrees from the original rectangle, shown in blue.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CPP/form1.cpp" id="Snippet9":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CS/form1.cs" id="Snippet9":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet9":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet9":::
+
]]>
@@ -2433,25 +2433,25 @@
The amount to offset this vertically.
Offsets the coordinates of this by the specified amount.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates a rectangle and draws it to the screen in blue.
-
-- Creates a region from the rectangle.
-
-- Applies the translation to the region.
-
-- Fills the translated region with red and draws the translated region to the screen in red.
-
- Notice that the red rectangle is shifted down and to the right from the original rectangle, shown in blue.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates a rectangle and draws it to the screen in blue.
+
+- Creates a region from the rectangle.
+
+- Applies the translation to the region.
+
+- Fills the translated region with red and draws the translated region to the screen in red.
+
+ Notice that the red rectangle is shifted down and to the right from the original rectangle, shown in blue.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CPP/form1.cpp" id="Snippet10":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CS/form1.cs" id="Snippet10":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet10":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet10":::
+
]]>
@@ -2491,11 +2491,11 @@
The amount to offset this vertically.
Offsets the coordinates of this by the specified amount.
- method.
-
+ method.
+
]]>
@@ -2542,11 +2542,11 @@
The to unite with this .
Updates this to the union of itself and the specified .
- and methods.
-
+ and methods.
+
]]>
@@ -2586,11 +2586,11 @@
The structure to unite with this .
Updates this to the union of itself and the specified structure.
- method.
-
+ method.
+
]]>
@@ -2628,27 +2628,27 @@
The structure to unite with this .
Updates this to the union of itself and the specified structure.
- `e`. The code performs the following actions:
-
-- Creates the first rectangle and draws it to the screen in black.
-
-- Creates a second rectangle and draws it to the screen in red.
-
-- Creates a region using the first rectangle.
-
-- Gets the area of union for `myRegion` when combined with `complementRect`.
-
-- Fills the fills the area of union with blue and draws it to the screen.
-
- Notice that both rectangles are filled with blue, including the area of overlap.
-
+ `e`. The code performs the following actions:
+
+- Creates the first rectangle and draws it to the screen in black.
+
+- Creates a second rectangle and draws it to the screen in red.
+
+- Creates a region using the first rectangle.
+
+- Gets the area of union for `myRegion` when combined with `complementRect`.
+
+- Fills the fills the area of union with blue and draws it to the screen.
+
+ Notice that both rectangles are filled with blue, including the area of overlap.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CPP/form1.cpp" id="Snippet11":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CS/form1.cs" id="Snippet11":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet11":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet11":::
+
]]>
@@ -2686,11 +2686,11 @@
The to unite with this .
Updates this to the union of itself and the specified .
- and method.
-
+ and method.
+
]]>
@@ -2739,11 +2739,11 @@
The to with this .
Updates this to the union minus the intersection of itself with the specified .
- and methods.
-
+ and methods.
+
]]>
@@ -2783,11 +2783,11 @@
The structure to with this .
Updates this to the union minus the intersection of itself with the specified structure.
- method.
-
+ method.
+
]]>
@@ -2825,27 +2825,27 @@
The structure to with this .
Updates this to the union minus the intersection of itself with the specified structure.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Creates the first rectangle and draws it to the screen in black.
-
-- Creates a second rectangle and draws it to the screen in red.
-
-- Creates a region using the first rectangle.
-
-- Gets the area for `myRegion` when combined with `complementRect`.
-
-- Fills the area with blue and draws it to the screen.
-
- Notice that both rectangles are filled with blue, except for the area of overlap.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Creates the first rectangle and draws it to the screen in black.
+
+- Creates a second rectangle and draws it to the screen in red.
+
+- Creates a region using the first rectangle.
+
+- Gets the area for `myRegion` when combined with `complementRect`.
+
+- Fills the area with blue and draws it to the screen.
+
+ Notice that both rectangles are filled with blue, except for the area of overlap.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CPP/form1.cpp" id="Snippet12":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/CS/form1.cs" id="Snippet12":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet12":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicRegionExamples/VB/form1.vb" id="Snippet12":::
+
]]>
@@ -2883,11 +2883,11 @@
The to with this .
Updates this to the union minus the intersection of itself with the specified .
- and methods.
-
+ and methods.
+
]]>
diff --git a/xml/System.Drawing/SolidBrush.xml b/xml/System.Drawing/SolidBrush.xml
index 6b45969e811..4ee7f2d9c96 100644
--- a/xml/System.Drawing/SolidBrush.xml
+++ b/xml/System.Drawing/SolidBrush.xml
@@ -27,23 +27,23 @@
Defines a brush of a single color. Brushes are used to fill graphics shapes, such as rectangles, ellipses, pies, polygons, and paths. This class cannot be inherited.
- class.
-
-
-
-## Examples
-
-- The following code example adds a shadow to a using a .
-
- This example is designed to be used with a Windows Form. To run this example, paste this code into a form and call the `AddShadow` method when handling the form's event. Make sure the form contains a named `listBox1`.
-
+ class.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
+## Examples
+
+The following code example adds a shadow to a using a .
+
+ This example is designed to be used with a Windows Form. To run this example, paste this code into a form and call the `AddShadow` method when handling the form's event. Make sure the form contains a named `listBox1`.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -78,18 +78,18 @@
A structure that represents the color of this brush.
Initializes a new object of the specified color.
- using a .
-
- This example is designed to be used with a Windows Form. To run this example, paste this code into a form and call the `AddShadow` method when handling the form's event. Make sure the form contains a named `listBox1`.
-
+ using a .
+
+ This example is designed to be used with a Windows Form. To run this example, paste this code into a form and call the `AddShadow` method when handling the form's event. Make sure the form contains a named `listBox1`.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet3":::
+
]]>
diff --git a/xml/System.Drawing/StringFormat.xml b/xml/System.Drawing/StringFormat.xml
index 9b0b614c56b..95018ccf738 100644
--- a/xml/System.Drawing/StringFormat.xml
+++ b/xml/System.Drawing/StringFormat.xml
@@ -34,11 +34,13 @@
Encapsulates text layout information (such as alignment, orientation and tab stops) display manipulations (such as ellipsis insertion and national digit substitution) and OpenType features. This class cannot be inherited.
- enumeration. objects can be changed.
-
+ enumeration. objects can be changed.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
]]>
Fonts and Text
@@ -85,16 +87,16 @@
Initializes a new object.
- class.
-
-|Property|Initial Value|
-|--------------|-------------------|
-|FormatFlags|0 (no flags are set)|
-|||
-
+ class.
+
+|Property|Initial Value|
+|--------------|-------------------|
+|FormatFlags|0 (no flags are set)|
+|||
+
]]>
@@ -129,31 +131,31 @@
The object from which to initialize the new object.
Initializes a new object from the specified existing object.
-
-
--
-
--
-
--
-
--
-
--
-
--
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineAndAlignment` method when handling the form's event, passing `e` as .
-
+
+
+-
+
+-
+
+-
+
+-
+
+-
+
+-
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineAndAlignment` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Misc2/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Misc2/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc2/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc2/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -196,31 +198,31 @@
The enumeration for the new object.
Initializes a new object with the specified enumeration.
-
-
--
-
--
-
--
-
--
-
--
-
--
-
- This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineAndAlignment` method when handling the form's event, passing `e` as .
-
+
+
+-
+
+-
+
+-
+
+-
+
+-
+
+-
+
+ This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineAndAlignment` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Misc2/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Misc2/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc2/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc2/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -289,20 +291,20 @@
Gets or sets horizontal alignment of the string.
A enumeration that specifies the horizontal alignment of the string.
- to specify the vertical alignment of the string.
-
-
-
-## Examples
- The following code example demonstrates how to use the and properties and the enumeration to align strings. This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineAndAlignment` method when handling the form's event, passing `e` as .
-
+ to specify the vertical alignment of the string.
+
+
+
+## Examples
+ The following code example demonstrates how to use the and properties and the enumeration to align strings. This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineAndAlignment` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Misc2/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Misc2/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc2/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc2/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -440,11 +442,11 @@
Releases all resources used by this object.
- allows the resources used by this object to be reallocated for other purposes.
-
+ allows the resources used by this object to be reallocated for other purposes.
+
]]>
@@ -543,23 +545,23 @@
Gets a generic default object.
The generic default object.
- class.
-
-|Property|Initial Value|
-|--------------|-------------------|
-||0|
-|||
-|||
-|||
-|||
-|||
-||0|
-
- If you make changes to the object returned from the property, these changes persist, and future calls to the property reflects these changes.
-
+ class.
+
+|Property|Initial Value|
+|--------------|-------------------|
+||0|
+|||
+|||
+|||
+|||
+|||
+||0|
+
+ If you make changes to the object returned from the property, these changes persist, and future calls to the property reflects these changes.
+
]]>
@@ -594,21 +596,21 @@
Gets a generic typographic object.
A generic typographic object.
- class.
-
-|Property|Initial Value|
-|--------------|-------------------|
-||24580 (, and .)|
-|||
-|||
-|||
-|||
-|||
-||0|
-
+ class.
+
+|Property|Initial Value|
+|--------------|-------------------|
+||24580 (, and .)|
+|||
+|||
+|||
+|||
+|||
+||0|
+
]]>
@@ -647,21 +649,21 @@
Gets the tab stops for this object.
An array of distances (in number of spaces) between tab stops.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Sets the tab stops of the .
-
-- Draws the string and the layout rectangle. Note that the string contains tabs. The tab settings of the specify the offsets of the tabbed text.
-
-- Gets the tab stops and uses or inspects the values.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Sets the tab stops of the .
+
+- Draws the string and the layout rectangle. Note that the string contains tabs. The tab settings of the specify the offsets of the tabbed text.
+
+- Gets the tab stops and uses or inspects the values.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -696,20 +698,20 @@
Gets or sets the object for this object.
The object for this object, the default is .
- property. It also demonstrates how to use the method. To run this example, paste the code into a form, handle the form's event and call the following method, passing e as .
-
+ property. It also demonstrates how to use the method. To run this example, paste the code into a form, handle the form's event and call the following method, passing e as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -744,20 +746,20 @@
Gets or sets the vertical alignment of the string.
A enumeration that represents the vertical line alignment.
- to specify the horizontal alignment of the string.
-
-
-
-## Examples
- The following code example demonstrates how to use the and properties and the enumeration to align strings. This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineAndAlignment` method when handling the form's event, passing `e` as .
-
+ to specify the horizontal alignment of the string.
+
+
+
+## Examples
+ The following code example demonstrates how to use the and properties and the enumeration to align strings. This example is designed to be used with Windows Forms. Paste the code into a form and call the `ShowLineAndAlignment` method when handling the form's event, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Misc2/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Misc2/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc2/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc2/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -797,23 +799,23 @@
An element of the enumeration that specifies how digits are displayed.
Specifies the language and method to be used when local digits are substituted for western digits.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Sets, for the , the language to be used and the substitution method to be used.
-
-- Draws the string.
-
-- Repeats the above two steps for two different languages (Arabic and Thai).
-
- The National substitution method and Traditional substitution method are demonstrated for each of the two languages. The National method displays digits according to the official national language of the user's locale. The Traditional method displays digits according to the user's native script or language, which may be different from the official national language.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Sets, for the , the language to be used and the substitution method to be used.
+
+- Draws the string.
+
+- Repeats the above two steps for two different languages (Arabic and Thai).
+
+ The National substitution method and Traditional substitution method are demonstrated for each of the two languages. The National method displays digits according to the official national language of the user's locale. The Traditional method displays digits according to the user's native script or language, which may be different from the official national language.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -851,34 +853,34 @@
An array of structures that specifies the ranges of characters measured by a call to the method.
Specifies an array of structures that represent the ranges of characters measured by a call to the method.
- .
-
-
-
-## Examples
- The following example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Sets the character ranges of the .
-
-- Measures the character ranges for a given string and layout rectangle.
-
-- Draws the string and layout rectangle.
-
-- Paints the regions. Each specifies an area that is occupied by a range of characters. The values in the regions are set when the character ranges are measured by the method.
-
-- Repeats the first four steps, but includes trailing spaces in the measurement of each character range.
-
-- Clears the format flags of the so that trailing spaces are not included in the measurement of each character range.
-
-- Repeats the first four steps, but uses a different layout rectangle just to demonstrate that the layout rectangle affects the measurements of the character ranges. The size of the font will also affect the measurement.
-
+ .
+
+
+
+## Examples
+ The following example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Sets the character ranges of the .
+
+- Measures the character ranges for a given string and layout rectangle.
+
+- Draws the string and layout rectangle.
+
+- Paints the regions. Each specifies an area that is occupied by a range of characters. The values in the regions are set when the character ranges are measured by the method.
+
+- Repeats the first four steps, but includes trailing spaces in the measurement of each character range.
+
+- Clears the format flags of the so that trailing spaces are not included in the measurement of each character range.
+
+- Repeats the first four steps, but uses a different layout rectangle just to demonstrate that the layout rectangle affects the measurements of the character ranges. The size of the font will also affect the measurement.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/VB/form1.vb" id="Snippet3":::
+
]]>
More than 32 character ranges are set.
@@ -919,26 +921,26 @@
An array of distances between tab stops in the units specified by the property.
Sets tab stops for this object.
- `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Sets the tab stops of the .
-
-- Draws the string and the layout rectangle. Note that the string contains tabs. The tab settings of the specify the offsets of the tabbed text.
-
-- Gets the tab stops and uses or inspects the values.
-
+ `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Sets the tab stops of the .
+
+- Draws the string and the layout rectangle. Note that the string contains tabs. The tab settings of the specify the offsets of the tabbed text.
+
+- Gets the tab stops and uses or inspects the values.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/CPP/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/CS/form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/VB/form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/VB/form1.vb" id="Snippet4":::
+
]]>
@@ -974,28 +976,28 @@
Converts this object to a human-readable string.
A string representation of this object.
- property is converted.
-
-
-
-## Examples
- The following example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
-
-- Converts a object to a string.
-
-- Draws the string.
-
-- Changes some properties in the object.
-
-- Draws the string. The string will be different because the properties of the object have changed.
-
+ property is converted.
+
+
+
+## Examples
+ The following example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the event handler. The code performs the following actions:
+
+- Converts a object to a string.
+
+- Draws the string.
+
+- Changes some properties in the object.
+
+- Draws the string. The string will be different because the properties of the object have changed.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicStringFormatExamples/VB/form1.vb" id="Snippet5":::
+
]]>
@@ -1030,15 +1032,15 @@
Gets or sets the enumeration for this object.
A enumeration that indicates how text drawn with this object is trimmed when it exceeds the edges of the layout rectangle.
- property and how to use the enumeration. This example is designed to be used with a Windows Form. Paste this code into a form and call the `ShowStringTrimming` method when handling the form's event, passing e as .
-
+ property and how to use the enumeration. This example is designed to be used with a Windows Form. Paste this code into a form and call the `ShowStringTrimming` method when handling the form's event, passing e as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.Misc2/CPP/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Misc2/CS/form1.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc2/VB/form1.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc2/VB/form1.vb" id="Snippet6":::
+
]]>
diff --git a/xml/System.Drawing/SystemBrushes.xml b/xml/System.Drawing/SystemBrushes.xml
index 160d27458a1..a9e5bc2260a 100644
--- a/xml/System.Drawing/SystemBrushes.xml
+++ b/xml/System.Drawing/SystemBrushes.xml
@@ -31,15 +31,19 @@
Each property of the class is a that is the color of a Windows display element.
- property. It also demonstrates how to use the method. To run this example, paste the code into a form, handle the form's event and call the following method, passing `e` as .
-
+ property. It also demonstrates how to use the method. To run this example, paste the code into a form, handle the form's event and call the following method, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscExamples/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscExamples/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -170,11 +174,11 @@
Gets a that is the color of the application workspace.
A that is the color of the application workspace.
-
@@ -239,11 +243,11 @@
Gets a that is the highlight color of a 3-D element.
A that is the highlight color of a 3-D element.
-
@@ -277,11 +281,11 @@
Gets a that is the shadow color of a 3-D element.
A that is the shadow color of a 3-D element.
-
@@ -348,11 +352,11 @@
Gets a that is the shadow color of a 3-D element.
A that is the shadow color of a 3-D element.
-
@@ -387,11 +391,11 @@
Gets a that is the dark shadow color of a 3-D element.
A that is the dark shadow color of a 3-D element.
-
@@ -426,11 +430,11 @@
Gets a that is the light color of a 3-D element.
A that is the light color of a 3-D element.
-
@@ -465,11 +469,11 @@
Gets a that is the highlight color of a 3-D element.
A that is the highlight color of a 3-D element.
-
@@ -665,11 +669,11 @@
Gets a that is the color of dimmed text.
A that is the color of dimmed text.
-
@@ -704,11 +708,11 @@
Gets a that is the color of the background of selected items.
A that is the color of the background of selected items.
-
@@ -743,11 +747,11 @@
Gets a that is the color of the text of selected items.
A that is the color of the text of selected items.
-
@@ -782,11 +786,11 @@
Gets a that is the color used to designate a hot-tracked item.
A that is the color used to designate a hot-tracked item.
-
diff --git a/xml/System.Drawing/SystemFonts.xml b/xml/System.Drawing/SystemFonts.xml
index 5e8da25cd6a..42ac182693e 100644
--- a/xml/System.Drawing/SystemFonts.xml
+++ b/xml/System.Drawing/SystemFonts.xml
@@ -30,11 +30,13 @@
Specifies the fonts used to display text in Windows display elements.
- class returns a used to display text in a particular Windows display element, such as the title bar of a window. These fonts reflect the current settings in Control Panel.
-
+ class returns a used to display text in a particular Windows display element, such as the title bar of a window. These fonts reflect the current settings in Control Panel.
+
+[!INCLUDE[System.Drawing.Common note](~/includes/system-drawing-common.md)]
+
]]>
@@ -100,23 +102,23 @@
Gets the default font that applications can use for dialog boxes and forms.
The default of the system. The value returned will vary depending on the user's operating system and the local culture setting of their system.
- property depending on the operating system and local culture.
-
-|System and/or culture|Font|
-|----------------------------|----------|
-|Windows NT 4x, Japanese version|MS UI Gothic, 9 point|
-|Arabic Windows|Tahoma, 8 point|
-|Other operating system/culture|MS Shell Dlg logical font, typically Microsoft Sans Serif, 8 point|
-
- MS Shell Dlg maps to a font set in the system registry.
-
- If the above fonts are not installed, the default font is Tahoma, 8 point. If Tahoma, 8 point, is not installed, returns the value of the property.
-
- The returned by does not change when the user is in High Contrast mode. For a font that changes when the user is in High Contrast mode use another system font such as .
-
+ property depending on the operating system and local culture.
+
+|System and/or culture|Font|
+|----------------------------|----------|
+|Windows NT 4x, Japanese version|MS UI Gothic, 9 point|
+|Arabic Windows|Tahoma, 8 point|
+|Other operating system/culture|MS Shell Dlg logical font, typically Microsoft Sans Serif, 8 point|
+
+ MS Shell Dlg maps to a font set in the system registry.
+
+ If the above fonts are not installed, the default font is Tahoma, 8 point. If Tahoma, 8 point, is not installed, returns the value of the property.
+
+ The returned by does not change when the user is in High Contrast mode. For a font that changes when the user is in High Contrast mode use another system font such as .
+
]]>
@@ -150,11 +152,11 @@
Gets a font that applications can use for dialog boxes and forms.
A that can be used for dialog boxes and forms, depending on the operating system and local culture setting of the system.
- property returns Tahoma, 8 point. Otherwise, returns the value of the property. The returned by does not change when the user is in High Contrast mode. For a font that changes when the user is in High Contrast mode use another system font such as .
-
+ property returns Tahoma, 8 point. Otherwise, returns the value of the property. The returned by does not change when the user is in High Contrast mode. For a font that changes when the user is in High Contrast mode use another system font such as .
+
]]>
@@ -194,11 +196,11 @@
Returns a font object that corresponds to the specified system font name.
A if the specified name matches a value in ; otherwise, .
- method returns `null` if the specified name does not match a font in the enumeration.
-
+ method returns `null` if the specified name does not match a font in the enumeration.
+
]]>
diff --git a/xml/System.Drawing/SystemIcons.xml b/xml/System.Drawing/SystemIcons.xml
index f2131f87a36..c2d1f8e0d02 100644
--- a/xml/System.Drawing/SystemIcons.xml
+++ b/xml/System.Drawing/SystemIcons.xml
@@ -31,17 +31,21 @@
Each property of the class is an object for Windows system-wide icons. This class cannot be inherited.
- handle, using the enumeration, and the use of the method to draw the rectangle bounds of a bitmap.
-
- This example is designed to be used with Windows Forms. Create a form that contains a button named Button2. Paste the code into the form and associate this method with the button's `Click` event.
-
+ handle, using the enumeration, and the use of the method to draw the rectangle bounds of a bitmap.
+
+ This example is designed to be used with Windows Forms. Create a form that contains a button named Button2. Paste the code into the form and associate this method with the button's `Click` event.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BitmapMembers/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BitmapMembers/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -299,11 +303,11 @@
Gets an object that contains the shield icon.
An object that contains the shield icon.
-
diff --git a/xml/System.Drawing/SystemPens.xml b/xml/System.Drawing/SystemPens.xml
index 4ed8b98d361..ef9dc82ed5f 100644
--- a/xml/System.Drawing/SystemPens.xml
+++ b/xml/System.Drawing/SystemPens.xml
@@ -31,17 +31,21 @@
Each property of the class is a that is the color of a Windows display element and that has a width of 1 pixel.
- class.
-
- This example is designed to be used with Windows Forms. Create a form that contains a named `subtractButton`. Paste the code into the form and call the `CreatePointsAndSizes` method from the form's `Paint` event-handling method, passing `e` as .
-
+ class.
+
+ This example is designed to be used with Windows Forms. Create a form that contains a named `subtractButton`. Paste the code into the form and call the `CreatePointsAndSizes` method from the form's `Paint` event-handling method, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.PointsAndSizes/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.PointsAndSizes/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PointsAndSizes/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PointsAndSizes/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -75,14 +79,14 @@
Gets a that is the color of the active window's border.
A that is the color of the active window's border.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithActiveBorderPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithActiveBorderPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet13":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet13":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet13":::
+
]]>
@@ -116,14 +120,14 @@
Gets a that is the color of the background of the active window's title bar.
A that is the color of the background of the active window's title bar.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithActiveCaptionPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithActiveCaptionPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet14":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet14":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet14":::
+
]]>
@@ -189,19 +193,19 @@
Gets a that is the color of the application workspace.
A that is the color of the application workspace.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithActiveAppWorkspacePen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithActiveAppWorkspacePen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet14":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet14":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet14":::
+
]]>
@@ -235,14 +239,14 @@
Gets a that is the face color of a 3-D element.
A that is the face color of a 3-D element.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithButtonSpacePen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithButtonSpacePen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet16":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet16":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet16":::
+
]]>
@@ -276,19 +280,19 @@
Gets a that is the highlight color of a 3-D element.
A that is the highlight color of a 3-D element.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithButtonHighlightPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithButtonHighlightPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet17":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet17":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet17":::
+
]]>
@@ -322,19 +326,19 @@
Gets a that is the shadow color of a 3-D element.
A that is the shadow color of a 3-D element.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithButtonShadowPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithButtonShadowPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet18":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet18":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet18":::
+
]]>
@@ -369,14 +373,14 @@
Gets a that is the face color of a 3-D element.
A that is the face color of a 3-D element.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithControlPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithControlPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet19":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet19":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet19":::
+
]]>
@@ -411,19 +415,19 @@
Gets a that is the shadow color of a 3-D element.
A that is the shadow color of a 3-D element.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithControlDarkPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithControlDarkPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet20":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet20":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet20":::
+
]]>
@@ -458,19 +462,19 @@
Gets a that is the dark shadow color of a 3-D element.
A that is the dark shadow color of a 3-D element.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithControlDarkDarkPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithControlDarkDarkPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet21":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet21":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet21":::
+
]]>
@@ -505,19 +509,19 @@
Gets a that is the light color of a 3-D element.
A that is the light color of a 3-D element.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithControlLightPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithControlLightPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet22":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet22":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet22":::
+
]]>
@@ -552,19 +556,19 @@
Gets a that is the highlight color of a 3-D element.
A that is the highlight color of a 3-D element.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithControlLightLightPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithControlLightLightPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet23":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet23":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet23":::
+
]]>
@@ -599,14 +603,14 @@
Gets a that is the color of text in a 3-D element.
A that is the color of text in a 3-D element.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithControlTextPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithControlTextPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet24":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet24":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet24":::
+
]]>
@@ -640,14 +644,14 @@
Gets a that is the color of the Windows desktop.
A that is the color of the Windows desktop.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithControlDesktopPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithControlDesktopPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet25":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet25":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet25":::
+
]]>
@@ -717,14 +721,14 @@
Gets a that is the lightest color in the color gradient of an active window's title bar.
A that is the lightest color in the color gradient of an active window's title bar.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithGradientActiveCaptionPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithGradientActiveCaptionPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet26":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet26":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet26":::
+
]]>
@@ -758,14 +762,14 @@
Gets a that is the lightest color in the color gradient of an inactive window's title bar.
A that is the lightest color in the color gradient of an inactive window's title bar.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithGradientInactiveCaptionPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithGradientInactiveCaptionPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet27":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet27":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet27":::
+
]]>
@@ -800,19 +804,19 @@
Gets a that is the color of dimmed text.
A that is the color of dimmed text.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithGrayTextPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithGrayTextPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet28":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet28":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet28":::
+
]]>
@@ -847,22 +851,22 @@
Gets a that is the color of the background of selected items.
A that is the color of the background of selected items.
- property.
-
- This example is designed to be used with Windows Forms. Create a form that contains a named `subtractButton`. Paste the code into the form and call the `CreatePointsAndSizes` method from the form's event-handling method, passing `e` as .
-
+ property.
+
+ This example is designed to be used with Windows Forms. Create a form that contains a named `subtractButton`. Paste the code into the form and call the `CreatePointsAndSizes` method from the form's event-handling method, passing `e` as .
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.PointsAndSizes/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.PointsAndSizes/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PointsAndSizes/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.PointsAndSizes/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -897,19 +901,19 @@
Gets a that is the color of the text of selected items.
A that is the color of the text of selected items.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithHighlightTextPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithHighlightTextPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet30":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet30":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet30":::
+
]]>
@@ -943,14 +947,14 @@
Gets a that is the color used to designate a hot-tracked item.
A that is the color used to designate a hot-tracked item.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithHotTrackPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithHotTrackPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet31":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet31":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet31":::
+
]]>
@@ -984,14 +988,14 @@
Gets a is the color of the border of an inactive window.
A that is the color of the border of an inactive window.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithInactiveBorderPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithInactiveBorderPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet32":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet32":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet32":::
+
]]>
@@ -1025,14 +1029,14 @@
Gets a that is the color of the title bar caption of an inactive window.
A that is the color of the title bar caption of an inactive window.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithInactiveCaptionPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithInactiveCaptionPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet33":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet33":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet33":::
+
]]>
@@ -1067,14 +1071,14 @@
Gets a that is the color of the text in an inactive window's title bar.
A that is the color of the text in an inactive window's title bar.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithInactiveCaptionTextPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithInactiveCaptionTextPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet34":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet34":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet34":::
+
]]>
@@ -1108,14 +1112,14 @@
Gets a that is the color of the background of a ToolTip.
A that is the color of the background of a ToolTip.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithInfoPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithInfoPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet35":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet35":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet35":::
+
]]>
@@ -1150,14 +1154,14 @@
Gets a that is the color of the text of a ToolTip.
A that is the color of the text of a ToolTip.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithInfoTextPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithInfoTextPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet36":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet36":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet36":::
+
]]>
@@ -1191,14 +1195,14 @@
Gets a that is the color of a menu's background.
A that is the color of a menu's background.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithMenuPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithMenuPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet37":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet37":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet37":::
+
]]>
@@ -1232,14 +1236,14 @@
Gets a that is the color of the background of a menu bar.
A that is the color of the background of a menu bar.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithMenuBarPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithMenuBarPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet38":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet38":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet38":::
+
]]>
@@ -1273,14 +1277,14 @@
Gets a that is the color used to highlight menu items when the menu appears as a flat menu.
A that is the color used to highlight menu items when the menu appears as a flat menu.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithMenuHighlightPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithMenuHighlightPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet39":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet39":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet39":::
+
]]>
@@ -1315,14 +1319,14 @@
Gets a that is the color of a menu's text.
A that is the color of a menu's text.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithMenuTextPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithMenuTextPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet40":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet40":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet40":::
+
]]>
@@ -1356,14 +1360,14 @@
Gets a that is the color of the background of a scroll bar.
A that is the color of the background of a scroll bar.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithScrollBarPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithScrollBarPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet41":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet41":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet41":::
+
]]>
@@ -1397,14 +1401,14 @@
Gets a that is the color of the background in the client area of a window.
A that is the color of the background in the client area of a window.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithWindowPen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithWindowPen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet42":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet42":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet42":::
+
]]>
@@ -1439,14 +1443,14 @@
Gets a that is the color of a window frame.
A that is the color of a window frame.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithWindowFramePen` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithWindowFramePen` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet44":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet44":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet44":::
+
]]>
@@ -1481,14 +1485,14 @@
Gets a that is the color of the text in the client area of a window.
A that is the color of the text in the client area of a window.
- property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithWindowText` method from the event-handling method, passing `e` as .
-
+ property. To run this example, paste it into a Windows Form. Handle the form's event and call the `DrawWithWindowText` method from the event-handling method, passing `e` as .
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/CS/Form1.cs" id="Snippet45":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet45":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.MiscWhidbeySnippets/VB/Form1.vb" id="Snippet45":::
+
]]>
diff --git a/xml/System.Drawing/TextureBrush.xml b/xml/System.Drawing/TextureBrush.xml
index fc32bd44ec1..0c2fcf80a9e 100644
--- a/xml/System.Drawing/TextureBrush.xml
+++ b/xml/System.Drawing/TextureBrush.xml
@@ -27,17 +27,21 @@
Each property of the class is a object that uses an image to fill the interior of a shape. This class cannot be inherited.
- method. It also demonstrates a .
-
- This example is designed to be used with Windows Forms. Create a form containing a button named Button2. Paste the code into the form and associate the Button2_Click method with the button's `Click` event.
-
+ method. It also demonstrates a .
+
+ This example is designed to be used with Windows Forms. Create a form containing a button named Button2. Paste the code into the form and associate the Button2_Click method with the button's `Click` event.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -87,17 +91,17 @@
The object with which this object fills interiors.
Initializes a new object that uses the specified image.
- method. It also demonstrates a .
-
- This example is designed to be used with Windows Forms. Create a form containing a button named Button2. Paste the code into the form and associate the Button2_Click method with the button's `Click` event.
-
+ method. It also demonstrates a .
+
+ This example is designed to be used with Windows Forms. Create a form containing a button named Button2. Paste the code into the form and associate the Button2_Click method with the button's `Click` event.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -393,15 +397,15 @@
Creates an exact copy of this object.
The object this method creates, cast as an object.
- `e`, which is a parameter of the `Paint` event handler. The code creates a object and an exact copy of that texture brush, and then uses the copy to fill a rectangle on the screen.
-
+ `e`, which is a parameter of the `Paint` event handler. The code creates a object and an exact copy of that texture brush, and then uses the copy to fill a rectangle on the screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -486,28 +490,28 @@
The object by which to multiply the geometric transformation.
Multiplies the object that represents the local geometric transformation of this object by the specified object by prepending the specified object.
- object specifies how the image that defines the texture is transformed. For example, if the transformation matrix specifies a rotation of 90 degrees clockwise, the texture image is rotated by 90 degrees clockwise.
-
-
-
-## Examples
- The following example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
-
-- Creates a object.
-
-- Creates a new matrix that specifies a translation of 50 units in the x-direction.
-
-- Multiplies the matrix with the transformation matrix of the texture brush.
-
-- Fills a rectangle, using the texture brush.
-
+ object specifies how the image that defines the texture is transformed. For example, if the transformation matrix specifies a rotation of 90 degrees clockwise, the texture image is rotated by 90 degrees clockwise.
+
+
+
+## Examples
+ The following example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
+
+- Creates a object.
+
+- Creates a new matrix that specifies a translation of 50 units in the x-direction.
+
+- Multiplies the matrix with the transformation matrix of the texture brush.
+
+- Fills a rectangle, using the texture brush.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -547,28 +551,28 @@
A enumeration that specifies the order in which to multiply the two matrices.
Multiplies the object that represents the local geometric transformation of this object by the specified object in the specified order.
- object specifies how the image that defines the texture is transformed. For example, if the transformation matrix specifies a rotation of 90 degrees clockwise, the texture image is rotated by 90 degrees clockwise.
-
-
-
-## Examples
- The following example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
-
-- Creates a object.
-
-- Creates a new matrix that specifies a translation of 50 units in the x-direction.
-
-- Multiplies the matrix with the transformation matrix of the texture brush.
-
-- Fills a rectangle, using the texture brush.
-
+ object specifies how the image that defines the texture is transformed. For example, if the transformation matrix specifies a rotation of 90 degrees clockwise, the texture image is rotated by 90 degrees clockwise.
+
+
+
+## Examples
+ The following example is designed for use with Windows Forms, and it requires `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
+
+- Creates a object.
+
+- Creates a new matrix that specifies a translation of 50 units in the x-direction.
+
+- Multiplies the matrix with the transformation matrix of the texture brush.
+
+- Fills a rectangle, using the texture brush.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CPP/form1.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CS/form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet3":::
+
]]>
@@ -603,25 +607,25 @@
Resets the property of this object to identity.
- `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
-
-- Creates a object.
-
-- Rotates the texture image by 90 degrees.
-
-- Fills a rectangle.
-
-- Resets the transformation matrix to identity.
-
-- Fills a second rectangle.
-
+ `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
+
+- Creates a object.
+
+- Rotates the texture image by 90 degrees.
+
+- Fills a rectangle.
+
+- Resets the transformation matrix to identity.
+
+- Fills a second rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CPP/form1.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CS/form1.cs" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet4":::
+
]]>
@@ -674,21 +678,21 @@
The angle of rotation.
Rotates the local geometric transformation of this object by the specified amount. This method prepends the rotation to the transformation.
- `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
-
-- Creates a object.
-
-- Rotates the texture image by 90 degrees.
-
-- Fills a rectangle.
-
+ `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
+
+- Creates a object.
+
+- Rotates the texture image by 90 degrees.
+
+- Fills a rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CPP/form1.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CS/form1.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet5":::
+
]]>
@@ -728,21 +732,21 @@
A enumeration that specifies whether to append or prepend the rotation matrix.
Rotates the local geometric transformation of this object by the specified amount in the specified order.
- `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
-
-- Creates a object.
-
-- Rotates the texture image by 90 degrees.
-
-- Fills a rectangle.
-
+ `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
+
+- Creates a object.
+
+- Rotates the texture image by 90 degrees.
+
+- Fills a rectangle.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CPP/form1.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CS/form1.cs" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet6":::
+
]]>
@@ -797,21 +801,21 @@
The amount by which to scale the transformation in the y direction.
Scales the local geometric transformation of this object by the specified amounts. This method prepends the scaling matrix to the transformation.
- `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
-
-- Creates a object.
-
-- Scales the texture image by two times in the x-direction.
-
-- Fills a rectangle on the screen, using the texture brush.
-
+ `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
+
+- Creates a object.
+
+- Scales the texture image by two times in the x-direction.
+
+- Fills a rectangle on the screen, using the texture brush.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CPP/form1.cpp" id="Snippet7":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CS/form1.cs" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet7":::
+
]]>
@@ -853,21 +857,21 @@
A enumeration that specifies whether to append or prepend the scaling matrix.
Scales the local geometric transformation of this object by the specified amounts in the specified order.
- `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
-
-- Creates a object.
-
-- Scales the texture image by two times in the x-direction.
-
-- Fills a rectangle on the screen, using the texture brush.
-
+ `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
+
+- Creates a object.
+
+- Scales the texture image by two times in the x-direction.
+
+- Fills a rectangle on the screen, using the texture brush.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CPP/form1.cpp" id="Snippet8":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CS/form1.cs" id="Snippet8":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet8":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet8":::
+
]]>
@@ -908,11 +912,11 @@
Gets or sets a copy of the object that defines a local geometric transformation for the image associated with this object.
A copy of the object that defines a geometric transformation that applies only to fills drawn by using this object.
- property is a copy of the brush's geometric transform, you should dispose of the matrix when you no longer need it.
-
+ property is a copy of the brush's geometric transform, you should dispose of the matrix when you no longer need it.
+
]]>
@@ -967,21 +971,21 @@
The dimension by which to translate the transformation in the y direction.
Translates the local geometric transformation of this object by the specified dimensions. This method prepends the translation to the transformation.
- `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
-
-- Creates a object.
-
-- Translates the texture image 50 units in the x-direction.
-
-- Fills a rectangle on the screen, using the texture brush.
-
+ `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
+
+- Creates a object.
+
+- Translates the texture image 50 units in the x-direction.
+
+- Fills a rectangle on the screen, using the texture brush.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CPP/form1.cpp" id="Snippet9":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CS/form1.cs" id="Snippet9":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet9":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet9":::
+
]]>
@@ -1023,21 +1027,21 @@
The order (prepend or append) in which to apply the translation.
Translates the local geometric transformation of this object by the specified dimensions in the specified order.
- `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
-
-- Creates a object.
-
-- Translates the texture image 50 units in the x-direction.
-
-- Fills a rectangle on the screen, using the texture brush.
-
+ `e`, which is a parameter of the `Paint` event handler. The code performs the following actions:
+
+- Creates a object.
+
+- Translates the texture image 50 units in the x-direction.
+
+- Fills a rectangle on the screen, using the texture brush.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CPP/form1.cpp" id="Snippet10":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/CS/form1.cs" id="Snippet10":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet10":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicTextureBrushExamples/VB/form1.vb" id="Snippet10":::
+
]]>
@@ -1078,17 +1082,17 @@
Gets or sets a enumeration that indicates the wrap mode for this object.
A enumeration that specifies how fills drawn by using this object are tiled.
- method. It also demonstrates the property and the enumeration.
-
- This example is designed to be used with Windows Forms. Create a form containing a button named Button2. Paste the code into the form and associate the Button2_Click method with the button's `Click` event.
-
+ method. It also demonstrates the property and the enumeration.
+
+ This example is designed to be used with Windows Forms. Create a form containing a button named Button2. Paste the code into the form and associate the Button2_Click method with the button's `Click` event.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb" id="Snippet2":::
+
]]>
diff --git a/xml/System.Windows.Forms/PictureBox.xml b/xml/System.Windows.Forms/PictureBox.xml
index 23e1cbd8c34..5b7195cff8a 100644
--- a/xml/System.Windows.Forms/PictureBox.xml
+++ b/xml/System.Windows.Forms/PictureBox.xml
@@ -63,31 +63,31 @@
Represents a Windows picture box control for displaying an image.
- is used to display graphics from a bitmap, metafile, icon, JPEG, GIF, or PNG file.
-
- Set the property to the you want to display, either at design time or at run time. You can alternatively specify the image by setting the property and load the image synchronously using the method or asynchronously using the method.
-
+ is used to display graphics from a bitmap, metafile, icon, JPEG, GIF, or PNG file.
+
+ Set the property to the you want to display, either at design time or at run time. You can alternatively specify the image by setting the property and load the image synchronously using the method or asynchronously using the method.
+
> [!NOTE]
-> If you want to use the same image in multiple controls, create a clone of the image for each . Accessing the same image from multiple controls causes an exception to occur.
-
- The property, which is set to values in the enumeration, controls the clipping and positioning of the image in the display area. You can change the size of the display area at run time with the property.
-
+> If you want to use the same image in multiple controls, create a clone of the image for each . Accessing the same image from multiple controls causes an exception to occur.
+
+ The property, which is set to values in the enumeration, controls the clipping and positioning of the image in the display area. You can change the size of the display area at run time with the property.
+
By default, the control is displayed by without any borders. You can provide a standard or three-dimensional border using the property to distinguish the picture box from the rest of the form, even if it contains no image. The is not a selectable control, which means that it cannot receive input focus.
-
-## Examples
- The following code example illustrates how you can set an image and resize the display area of the picture box. This example requires that `ShowMyImage` is called in an existing form, and that the namespace has been added to the source code for your form.
-
+
+## Examples
+ The following code example illustrates how you can set an image and resize the display area of the picture box. This example requires that `ShowMyImage` is called in an existing form, and that the namespace has been added to the source code for your form.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Classic PictureBox Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Classic PictureBox Example/CS/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PictureBox Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic PictureBox Example/VB/source.vb" id="Snippet1":::
+
]]>
Images, Bitmaps, and Metafiles
- Working with Images, Bitmaps, Icons, and Metafiles
+ Working with Images, Bitmaps, Icons, and Metafiles
@@ -109,23 +109,23 @@
Initializes a new instance of the class.
- class.
-
-|Item|Description|
-|----------|-----------------|
-||`null`|
+ class.
+
+|Item|Description|
+|----------|-----------------|
+||`null`|
|||
-
-## Examples
- The following code example demonstrates the use of the and controls. The is initialized by setting the and properties using the and enumerations, respectively. The is populated with pictures from the Sample Pictures directory. The method is used when handling the event of the control to determine whether an item is selected. If an item is selected, the event handler displays the selected file by setting the property. The example requires that you have JPG files located in the C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures directory. To run the example, paste the code into a form and call the `InitializePictureBox` and `PopulateListView` methods in the form's constructor or event-handling method. Ensure all events are associated with their event-handling methods.
-
+
+## Examples
+ The following code example demonstrates the use of the and controls. The is initialized by setting the and properties using the and enumerations, respectively. The is populated with pictures from the Sample Pictures directory. The method is used when handling the event of the control to determine whether an item is selected. If an item is selected, the event handler displays the selected file by setting the property. The example requires that you have JPG files located in the C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures directory. To run the example, paste the code into a form and call the `InitializePictureBox` and `PopulateListView` methods in the form's constructor or event-handling method. Ensure all events are associated with their event-handling methods.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewAndPictureBox/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ListViewAndPictureBox/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ListViewAndPictureBox/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ListViewAndPictureBox/VB/form1.vb" id="Snippet2":::
+
]]>
@@ -204,18 +204,18 @@
Indicates the border style for the control.
One of the enumeration values. The default is .
- and controls. The is initialized by setting the and properties using the and enumerations, respectively. The is populated with pictures from the Sample Pictures directory. The method is used in when handling the event of the control to determine whether an item is selected. If an item is selected, the event handler displays the selected file by setting the property. The example requires that you have JPG files located in the C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures directory. To run this example, paste the code into a form and call the `InitializePictureBox` and `PopulateListView` methods in the form's constructor or event-handling method. Ensure all events are associated with their event-handling methods.
-
+
+## Examples
+ The following code example demonstrates the use of the and controls. The is initialized by setting the and properties using the and enumerations, respectively. The is populated with pictures from the Sample Pictures directory. The method is used in when handling the event of the control to determine whether an item is selected. If an item is selected, the event handler displays the selected file by setting the property. The example requires that you have JPG files located in the C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures directory. To run this example, paste the code into a form and call the `InitializePictureBox` and `PopulateListView` methods in the form's constructor or event-handling method. Ensure all events are associated with their event-handling methods.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewAndPictureBox/CPP/form1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ListViewAndPictureBox/CS/form1.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ListViewAndPictureBox/VB/form1.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ListViewAndPictureBox/VB/form1.vb" id="Snippet2":::
+
]]>
The value assigned is not one of the values.
@@ -244,19 +244,19 @@
Cancels an asynchronous image load.
- image is loaded asynchronously when the property is `false` and the method is used to load the image. If a load is canceled with the method cancellation is reported by raising the event with the property of the set to `true`.
-
-## Examples
- The following code example demonstrates how to use the method. To run this example, paste the following code into a Windows Form that contains a named `pictureBox1` and two controls named `startLoadButton` and `cancelLoadButton`. Make sure that the event for the buttons is associated with their event-handling method in this example. You must change the image file path to a path that is valid on your system.
-
+
+## Examples
+ The following code example demonstrates how to use the method. To run this example, paste the following code into a Windows Form that contains a named `pictureBox1` and two controls named `startLoadButton` and `cancelLoadButton`. Make sure that the event for the buttons is associated with their event-handling method in this example. You must change the image file path to a path that is valid on your system.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/CS/Form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/VB/Form1.vb" id="Snippet3":::
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/VB/Form1.vb" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/CS/Form1.cs" id="Snippet4":::
-:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/VB/Form1.vb" id="Snippet4":::
-
+:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/VB/Form1.vb" id="Snippet4":::
+
]]>
@@ -457,19 +457,19 @@
to release managed and unmanaged resources; to release unmanaged resources only.
Releases the unmanaged resources used by the and optionally releases the managed resources.
- method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the `disposing` parameter set to `true`. invokes `Dispose` with `disposing` set to `false`.
-
- When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object.
-
+ method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the `disposing` parameter set to `true`. invokes `Dispose` with `disposing` set to `false`.
+
+ When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object.
+
]]>
- can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
-
+ can be called multiple times by other objects. When overriding be careful not to reference objects that have been previously disposed of in an earlier call to . For more information about how to implement , see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).
+
For more information about and , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Overriding the Finalize Method](https://docs.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)).
@@ -506,11 +506,11 @@
Overrides the property.
-
@@ -547,11 +547,11 @@
Gets or sets the image to display when an error occurs during the image-loading process or if the image load is canceled.
An to display if an error occurs during the image-loading process or if the image load is canceled.
- is specified, a default error image is displayed.
-
+ is specified, a default error image is displayed.
+
]]>
@@ -623,11 +623,11 @@
Occurs when the value of the property changes.
-
@@ -699,11 +699,11 @@
Occurs when the value of the property changes.
-
@@ -753,20 +753,20 @@
Gets or sets the image that is displayed by .
The to display.
- property is set to the to display. You can do this either at design time or at run time.
-
+ property is set to the to display. You can do this either at design time or at run time.
+
> [!NOTE]
> If you want to use the same image in multiple controls, create a clone of the image for each . Accessing the same image from multiple controls causes an exception to occur.
-
-## Examples
- The following code example demonstrates how to create a bitmap at runtime and display it in a by setting the property. To run this example, paste it into a Windows Form and call `CreateBitmapAtRuntime` from the form's constructor.
-
+
+## Examples
+ The following code example demonstrates how to create a bitmap at runtime and display it in a by setting the property. To run this example, paste it into a Windows Form and call `CreateBitmapAtRuntime` from the form's constructor.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.CreateBitmapAtRuntime/CS/Form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.CreateBitmapAtRuntime/VB/Form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.CreateBitmapAtRuntime/VB/Form1.vb" id="Snippet1":::
+
]]>
@@ -812,15 +812,15 @@
Gets or sets the path or URL for the image to display in the .
The path or URL for the image to display in the .
- method will overwrite the property, setting to the URL value specified in the method call.
-
+ method will overwrite the property, setting to the URL value specified in the method call.
+
]]>
@@ -892,11 +892,11 @@
Occurs when the value of the property changes.
-
@@ -933,11 +933,11 @@
Gets or sets the image displayed in the control when the main image is loading.
The displayed in the picture box control when the main image is loading.
- is specified, a default image is displayed. The is always displayed non-stretched, in the center of the .
-
+ is specified, a default image is displayed. The is always displayed non-stretched, in the center of the .
+
]]>
@@ -974,11 +974,11 @@
Occurs when a key is pressed when the control has focus.
-
@@ -1015,11 +1015,11 @@
Occurs when a key is pressed when the control has focus.
-
@@ -1056,11 +1056,11 @@
Occurs when a key is released when the control has focus.
-
@@ -1097,11 +1097,11 @@
Occurs when input focus leaves the .
-
@@ -1167,11 +1167,11 @@
The path for the image to display in the .
Sets the to the specified URL and displays the image indicated.
- method sets the property to the value of `url`.
-
+ method sets the property to the value of `url`.
+
]]>
@@ -1216,11 +1216,11 @@
Loads the image asynchronously.
- method, the property must be set to `false` to load an image asynchronously. When you load an image asynchronously, you can handle the event to determine the progress of an image load or the event to determine when an image load has completed.
-
+ method, the property must be set to `false` to load an image asynchronously. When you load an image asynchronously, you can handle the event to determine the progress of an image load or the event to determine when an image load has completed.
+
]]>
@@ -1250,19 +1250,19 @@
The path for the image to display in the .
Loads the image at the specified location, asynchronously.
- method sets the property to the value of `url`.
-
+ method sets the property to the value of `url`.
+
A call to the method sets the property to the value of `url`. Besides calling the method, you must set the property to `false` to load an image asynchronously. When you load an image asynchronously, you can handle the event to determine the progress of an image load or the event to determine when an image load has completed. If an error occurs during an asynchronous image-loading operation, it will be caught and reported by the property of the .
-
-## Examples
- The following code example demonstrates how to use the method. To run this example, paste the following code into a Windows Form that contains a named `pictureBox1` and a named `startLoadButton`. Make sure that the event for the button is associated with the `startLoadButton_Click` method in this example. You must change the image file path to a path that is valid on your system.
-
+
+## Examples
+ The following code example demonstrates how to use the method. To run this example, paste the following code into a Windows Form that contains a named `pictureBox1` and a named `startLoadButton`. Make sure that the event for the button is associated with the `startLoadButton_Click` method in this example. You must change the image file path to a path that is valid on your system.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/CS/Form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/VB/Form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/VB/Form1.vb" id="Snippet3":::
+
]]>
@@ -1288,21 +1288,21 @@
Occurs when the asynchronous image-load operation is completed, been canceled, or raised an exception.
- occurs only when the image is loaded asynchronously by using one of the methods, and is `false`. If the image-load is canceled by calling the method the property of the will be set to `true`. If an exception or error occurs during the load process, it will be caught and the property of the will contain the exception information.
-
+ occurs only when the image is loaded asynchronously by using one of the methods, and is `false`. If the image-load is canceled by calling the method the property of the will be set to `true`. If an exception or error occurs during the load process, it will be caught and the property of the will contain the exception information.
+
For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/).
-
-## Examples
- The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline .
-
- To run the example code, paste it into a project that contains an instance of type named `PictureBox1`. Then ensure that the event handler is associated with the event.
-
+
+## Examples
+ The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline .
+
+ To run the example code, paste it into a project that contains an instance of type named `PictureBox1`. Then ensure that the event handler is associated with the event.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/CS/EventExamples.cs" id="Snippet516":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet516":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet516":::
+
]]>
@@ -1328,23 +1328,23 @@
Occurs when the progress of an asynchronous image-loading operation has changed.
- occurs only when the image is loaded asynchronously by using one of the methods. The progress percentage of the image load is reported with the property of the .
-
- Handle the if you want to reflect the progress of an asynchronous image-loading operation in a or similar control. Use the property of the to update the progress value.
-
+ occurs only when the image is loaded asynchronously by using one of the methods. The progress percentage of the image load is reported with the property of the .
+
+ Handle the if you want to reflect the progress of an asynchronous image-loading operation in a or similar control. Use the property of the to update the progress value.
+
For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/).
-
-## Examples
- The following code example demonstrates how to handle the event. To run this example, paste the following code into a Windows Form that contains a named `pictureBox1`, a named `startLoadButton`, and a named `progressBar1`. Make sure that the `startLoadButton_Click` method is associated with the event for the button and the `pictureBox1_LoadProgressChanged` method is associated with the event for `pictureBox1`. You must change the image file path to a path that is valid on your system.
-
+
+## Examples
+ The following code example demonstrates how to handle the event. To run this example, paste the following code into a Windows Form that contains a named `pictureBox1`, a named `startLoadButton`, and a named `progressBar1`. Make sure that the `startLoadButton_Click` method is associated with the event for the button and the `pictureBox1_LoadProgressChanged` method is associated with the event for `pictureBox1`. You must change the image file path to a path that is valid on your system.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/CS/Form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/VB/Form1.vb" id="Snippet3":::
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/VB/Form1.vb" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/CS/Form1.cs" id="Snippet5":::
-:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/VB/Form1.vb" id="Snippet5":::
-
+:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/VB/Form1.vb" id="Snippet5":::
+
]]>
@@ -1409,13 +1409,13 @@
An that contains the event data.
Raises the event.
- method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
-
+ method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
+
]]>
@@ -1454,13 +1454,13 @@
An that contains the event data.
Raises the event.
- method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
-
+ method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
+
]]>
@@ -1493,13 +1493,13 @@
An that contains the event data.
Raises the event.
- method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
-
+ method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
+
]]>
@@ -1532,13 +1532,13 @@
A that contains the event data.
Raises the event.
- method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
-
+ method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
+
]]>
@@ -1629,15 +1629,15 @@
An that contains the event data.
Raises the event.
- method redraws the image if the property is set to , , or .
-
- Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/).
-
- The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
-
+ method redraws the image if the property is set to , , or .
+
+ Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/).
+
+ The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
+
]]>
@@ -1671,13 +1671,13 @@
An that contains the event data.
Raises the event.
- method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
-
+ method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
+
]]>
@@ -1747,11 +1747,11 @@
Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left languages.
One of the values.
-
@@ -1788,11 +1788,11 @@
Occurs when the value of the property changes.
-
@@ -1870,21 +1870,21 @@
Indicates how the image is displayed.
One of the values. The default is .
- enumeration.
-
- By default, in mode, the is positioned in the upper-left corner of the , and any part of the image that is too big for the is clipped. Using the value causes the image to stretch or shrink to fit the . Using the value causes the image to be stretched or shrunk to fit the ; however, the aspect ratio in the original is maintained.
-
+ enumeration.
+
+ By default, in mode, the is positioned in the upper-left corner of the , and any part of the image that is too big for the is clipped. Using the value causes the image to stretch or shrink to fit the . Using the value causes the image to be stretched or shrunk to fit the ; however, the aspect ratio in the original is maintained.
+
Using the value causes the control to resize to always fit the image. Using the value causes the image to be centered in the client area.
-
-## Examples
- The following code example demonstrates the use of the property. To run this example, paste the following code into a Windows Form and call the `InitializePictureBoxAndButton` method from the form's constructor or Load-event handling method.
-
+
+## Examples
+ The following code example demonstrates the use of the property. To run this example, paste the following code into a Windows Form and call the `InitializePictureBoxAndButton` method from the form's constructor or Load-event handling method.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.PictureBox.SizeMode/CS/Form1.cs" id="Snippet10":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.PictureBox.SizeMode/VB/Form1.vb" id="Snippet10":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.PictureBox.SizeMode/VB/Form1.vb" id="Snippet10":::
+
]]>
The value assigned is not one of the values.
@@ -1914,19 +1914,19 @@
Occurs when changes.
- event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline .
-
- To run the example code, paste it into a project that contains an instance of type named `PictureBox1`. Then ensure that the event handler is associated with the event.
-
+
+## Examples
+ The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline .
+
+ To run the example code, paste it into a project that contains an instance of type named `PictureBox1`. Then ensure that the event handler is associated with the event.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/CS/EventExamples.cs" id="Snippet518":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet518":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.EventExamples/VB/EventExamples.vb" id="Snippet518":::
+
]]>
@@ -1956,11 +1956,11 @@
Signals the object that initialization is starting.
-
@@ -1990,11 +1990,11 @@
Signals to the object that initialization is complete.
-
@@ -2032,11 +2032,11 @@
Gets or sets the tab index value.
The tab index value.
-
@@ -2109,11 +2109,11 @@
if the user can give the focus to the control by using the TAB key; otherwise, . The default is .
-
@@ -2150,11 +2150,11 @@
Occurs when the value of the property changes.
-
@@ -2196,11 +2196,11 @@
Gets or sets the text of the .
The text of the .
- property of the has no affect on its appearance.
-
+ property of the has no affect on its appearance.
+
]]>
@@ -2237,13 +2237,13 @@
Occurs when the value of the property changes.
-
@@ -2272,11 +2272,11 @@
Returns a string that represents the current control.
A string that represents the current .
- method returns a string that includes the type and the property of the control.
-
+ method returns a string that includes the type and the property of the control.
+
]]>
@@ -2314,17 +2314,17 @@
if an image-loading operation is completed synchronously; otherwise, . The default is .
- property to `true` means the image is loaded synchronously. This causes the user interface to be blocked from other input until the image is loaded. When is `false` (the default) and the method is used to load the image, the image is displayed when the specified image is loaded, and the user can interact with the interface during the load process.
-
-## Examples
- The following code example demonstrates how to use the property. To run this example, paste the following code into a Windows Form that contains a named `pictureBox1` and a named `startLoadButton`. Make sure that the event for the button is associated with the `startLoadButton_Click` method in this example. You must change the image file path to one that is valid on your system.
-
+
+## Examples
+ The following code example demonstrates how to use the property. To run this example, paste the following code into a Windows Form that contains a named `pictureBox1` and a named `startLoadButton`. Make sure that the event for the button is associated with the `startLoadButton_Click` method in this example. You must change the image file path to one that is valid on your system.
+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/CS/Form1.cs" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/VB/Form1.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.TreeViewPictureBoxWhidbeyMembers/VB/Form1.vb" id="Snippet3":::
+
]]>
diff --git a/xml/System.Windows.Forms/Screen.xml b/xml/System.Windows.Forms/Screen.xml
index b64e90f12b3..8ebfc95d387 100644
--- a/xml/System.Windows.Forms/Screen.xml
+++ b/xml/System.Windows.Forms/Screen.xml
@@ -20,20 +20,20 @@
Represents a display device or multiple display devices on a single system.
- object. The object is created when you call its public methods.
-
-
-
-## Examples
- The following code example shows how to use various methods and properties of the class. The example calls the property to retrieve an array of all the screens connected to the system. For each returned , the example adds the device name, bounds, type, working area, and primary screen to a . To use the example, add a and a to a form, and then add a event handler for the button.
-
+ object. The object is created when you call its public methods.
+
+
+
+## Examples
+ The following code example shows how to use various methods and properties of the class. The example calls the property to retrieve an array of all the screens connected to the system. For each returned , the example adds the device name, bounds, type, working area, and primary screen to a . To use the example, add a and a to a form, and then add a event handler for the button.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Screen Object Example/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Screen Object Example/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Screen Object Example/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Screen Object Example/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -91,11 +91,11 @@
Gets the number of bits of memory, associated with one pixel of data.
The number of bits of memory, associated with one pixel of data.
-
@@ -161,11 +161,11 @@
Gets the device name associated with a display.
The device name associated with a display.
-
@@ -285,15 +285,15 @@
Retrieves a for the display that contains the specified point.
A for the display that contains the point. In multiple display environments where no display contains the point, the display closest to the specified point is returned.
- method. This example creates a referencing the and coordinates passed by a , and then uses the method to determine if the point clicked is on the primary screen.
-
+ method. This example creates a referencing the and coordinates passed by a , and then uses the method to determine if the point clicked is on the primary screen.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/Screen.FromPoint/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/Screen.FromPoint/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Screen.FromPoint/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/Screen.FromPoint/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -453,11 +453,11 @@
Computes and retrieves a hash code for an object.
A hash code for an object.
- method.
-
+ method.
+
]]>
@@ -498,15 +498,15 @@
Retrieves the working area closest to the specified point. The working area is the desktop area of the display, excluding taskbars, docked windows, and docked tool bars.
A that specifies the working area. In multiple display environments where no display contains the specified point, the display closest to the point is returned.
- property and the method. This method requires a form containing a button named `Button1`
-
+ property and the method. This method requires a form containing a button named `Button1`
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ScreenExample/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ScreenExample/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ScreenExample/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ScreenExample/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -624,20 +624,20 @@
Gets the primary display.
The primary display.
- property and the method. This method requires a form containing a button named `Button1`.
-
+ property and the method. This method requires a form containing a button named `Button1`.
+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ScreenExample/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ScreenExample/CS/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ScreenExample/VB/form1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ScreenExample/VB/form1.vb" id="Snippet1":::
+
]]>
@@ -691,13 +691,13 @@
Gets the working area of the display. The working area is the desktop area of the display, excluding taskbars, docked windows, and docked tool bars.
A , representing the working area of the display.
- will return the entire area of the screen if the Windows Taskbar is set to Auto-Hide, no matter whether the Taskbar is currently displayed or not.
-
+ will return the entire area of the screen if the Windows Taskbar is set to Auto-Hide, no matter whether the Taskbar is currently displayed or not.
+
]]>
diff --git a/xml/ns-System.Drawing.Imaging.xml b/xml/ns-System.Drawing.Imaging.xml
index 3c3b3711c0a..03c4bb7ebed 100644
--- a/xml/ns-System.Drawing.Imaging.xml
+++ b/xml/ns-System.Drawing.Imaging.xml
@@ -17,7 +17,7 @@
Graphics and Drawing in Windows Forms
Images, Bitmaps, and Metafiles
- Working with Images, Bitmaps, Icons, and Metafiles
+ Working with Images, Bitmaps, Icons, and Metafiles
Using Image Encoders and Decoders in Managed GDI+
Recoloring Images