Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
268 lines (251 sloc) 16.4 KB
<Type Name="HatchBrush" FullName="System.Drawing.Drawing2D.HatchBrush">
<TypeSignature Language="C#" Value="public sealed class HatchBrush : System.Drawing.Brush" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit HatchBrush extends System.Drawing.Brush" />
<TypeSignature Language="DocId" Value="T:System.Drawing.Drawing2D.HatchBrush" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class HatchBrush&#xA;Inherits Brush" />
<TypeSignature Language="C++ CLI" Value="public ref class HatchBrush sealed : System::Drawing::Brush" />
<TypeSignature Language="F#" Value="type HatchBrush = class&#xA; inherit Brush" />
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Drawing.Brush</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Defines a rectangular brush with a hatch style, a foreground color, and a background color. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A hatch pattern is made from two colors: one defined by the <xref:System.Drawing.Drawing2D.HatchBrush.BackgroundColor%2A>, which fills the background and one for the lines that form the pattern over the background defined by the <xref:System.Drawing.Drawing2D.HatchBrush.ForegroundColor%2A> property. The <xref:System.Drawing.Drawing2D.HatchBrush.HatchStyle%2A> property defines what type of pattern the brush has and can be any value from the <xref:System.Drawing.Drawing2D.HatchStyle> enumeration. There are more than fifty elements in the <xref:System.Drawing.Drawing2D.HatchStyle> enumeration.
The following illustration shows an ellipse filled with a horizontal hatch pattern.
![Hatch Pattern](~/add/media/hatch1.png "Hatch Pattern")
## Examples
The following example shows how to create the <xref:System.Drawing.Drawing2D.HatchBrush> shown in the previous illustration.
[!code-csharp[System.Drawing.UsingABrush#41](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.UsingABrush/CS/Class1.cs#41)]
[!code-vb[System.Drawing.UsingABrush#41](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.UsingABrush/VB/Class1.vb#41)]
]]></format>
</remarks>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Drawing.Drawing2D.HatchBrush" /> class with the specified <see cref="T:System.Drawing.Drawing2D.HatchStyle" /> enumeration and foreground color.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public HatchBrush (System.Drawing.Drawing2D.HatchStyle hatchstyle, System.Drawing.Color foreColor);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Drawing.Drawing2D.HatchStyle hatchstyle, valuetype System.Drawing.Color foreColor) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Drawing2D.HatchBrush.#ctor(System.Drawing.Drawing2D.HatchStyle,System.Drawing.Color)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; HatchBrush(System::Drawing::Drawing2D::HatchStyle hatchstyle, System::Drawing::Color foreColor);" />
<MemberSignature Language="F#" Value="new System.Drawing.Drawing2D.HatchBrush : System.Drawing.Drawing2D.HatchStyle * System.Drawing.Color -&gt; System.Drawing.Drawing2D.HatchBrush" Usage="new System.Drawing.Drawing2D.HatchBrush (hatchstyle, foreColor)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="hatchstyle" Type="System.Drawing.Drawing2D.HatchStyle" />
<Parameter Name="foreColor" Type="System.Drawing.Color" />
</Parameters>
<Docs>
<param name="hatchstyle">One of the <see cref="T:System.Drawing.Drawing2D.HatchStyle" /> values that represents the pattern drawn by this <see cref="T:System.Drawing.Drawing2D.HatchBrush" />.</param>
<param name="foreColor">The <see cref="T:System.Drawing.Color" /> structure that represents the color of lines drawn by this <see cref="T:System.Drawing.Drawing2D.HatchBrush" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.Drawing.Drawing2D.HatchBrush" /> class with the specified <see cref="T:System.Drawing.Drawing2D.HatchStyle" /> enumeration and foreground color.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The background color is initialized to black.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public HatchBrush (System.Drawing.Drawing2D.HatchStyle hatchstyle, System.Drawing.Color foreColor, System.Drawing.Color backColor);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Drawing.Drawing2D.HatchStyle hatchstyle, valuetype System.Drawing.Color foreColor, valuetype System.Drawing.Color backColor) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Drawing2D.HatchBrush.#ctor(System.Drawing.Drawing2D.HatchStyle,System.Drawing.Color,System.Drawing.Color)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; HatchBrush(System::Drawing::Drawing2D::HatchStyle hatchstyle, System::Drawing::Color foreColor, System::Drawing::Color backColor);" />
<MemberSignature Language="F#" Value="new System.Drawing.Drawing2D.HatchBrush : System.Drawing.Drawing2D.HatchStyle * System.Drawing.Color * System.Drawing.Color -&gt; System.Drawing.Drawing2D.HatchBrush" Usage="new System.Drawing.Drawing2D.HatchBrush (hatchstyle, foreColor, backColor)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="hatchstyle" Type="System.Drawing.Drawing2D.HatchStyle" />
<Parameter Name="foreColor" Type="System.Drawing.Color" />
<Parameter Name="backColor" Type="System.Drawing.Color" />
</Parameters>
<Docs>
<param name="hatchstyle">One of the <see cref="T:System.Drawing.Drawing2D.HatchStyle" /> values that represents the pattern drawn by this <see cref="T:System.Drawing.Drawing2D.HatchBrush" />.</param>
<param name="foreColor">The <see cref="T:System.Drawing.Color" /> structure that represents the color of lines drawn by this <see cref="T:System.Drawing.Drawing2D.HatchBrush" />.</param>
<param name="backColor">The <see cref="T:System.Drawing.Color" /> structure that represents the color of spaces between the lines drawn by this <see cref="T:System.Drawing.Drawing2D.HatchBrush" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.Drawing.Drawing2D.HatchBrush" /> class with the specified <see cref="T:System.Drawing.Drawing2D.HatchStyle" /> enumeration, foreground color, and background color.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The following illustration shows an ellipse filled with a horizontal hatch pattern.
![Hatch Pattern](~/add/media/hatch1.png "Hatch Pattern")
## Examples
The following example shows how to use the <xref:System.Drawing.Drawing2D.HatchBrush.%23ctor%2A> to create the <xref:System.Drawing.Drawing2D.HatchBrush> shown in the previous illustration.
[!code-csharp[System.Drawing.UsingABrush#41](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.UsingABrush/CS/Class1.cs#41)]
[!code-vb[System.Drawing.UsingABrush#41](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.UsingABrush/VB/Class1.vb#41)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="BackgroundColor">
<MemberSignature Language="C#" Value="public System.Drawing.Color BackgroundColor { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.Color BackgroundColor" />
<MemberSignature Language="DocId" Value="P:System.Drawing.Drawing2D.HatchBrush.BackgroundColor" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property BackgroundColor As Color" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Drawing::Color BackgroundColor { System::Drawing::Color get(); };" />
<MemberSignature Language="F#" Value="member this.BackgroundColor : System.Drawing.Color" Usage="System.Drawing.Drawing2D.HatchBrush.BackgroundColor" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Color</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the color of spaces between the hatch lines drawn by this <see cref="T:System.Drawing.Drawing2D.HatchBrush" /> object.</summary>
<value>A <see cref="T:System.Drawing.Color" /> structure that represents the background color for this <see cref="T:System.Drawing.Drawing2D.HatchBrush" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Clone">
<MemberSignature Language="C#" Value="public override object Clone ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance object Clone() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Drawing2D.HatchBrush.Clone" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function Clone () As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override System::Object ^ Clone();" />
<MemberSignature Language="F#" Value="override this.Clone : unit -&gt; obj" Usage="hatchBrush.Clone " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates an exact copy of this <see cref="T:System.Drawing.Drawing2D.HatchBrush" /> object.</summary>
<returns>The <see cref="T:System.Drawing.Drawing2D.HatchBrush" /> this method creates, cast as an object.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ForegroundColor">
<MemberSignature Language="C#" Value="public System.Drawing.Color ForegroundColor { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.Color ForegroundColor" />
<MemberSignature Language="DocId" Value="P:System.Drawing.Drawing2D.HatchBrush.ForegroundColor" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ForegroundColor As Color" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Drawing::Color ForegroundColor { System::Drawing::Color get(); };" />
<MemberSignature Language="F#" Value="member this.ForegroundColor : System.Drawing.Color" Usage="System.Drawing.Drawing2D.HatchBrush.ForegroundColor" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Color</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the color of hatch lines drawn by this <see cref="T:System.Drawing.Drawing2D.HatchBrush" /> object.</summary>
<value>A <see cref="T:System.Drawing.Color" /> structure that represents the foreground color for this <see cref="T:System.Drawing.Drawing2D.HatchBrush" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="HatchStyle">
<MemberSignature Language="C#" Value="public System.Drawing.Drawing2D.HatchStyle HatchStyle { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.Drawing2D.HatchStyle HatchStyle" />
<MemberSignature Language="DocId" Value="P:System.Drawing.Drawing2D.HatchBrush.HatchStyle" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property HatchStyle As HatchStyle" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Drawing::Drawing2D::HatchStyle HatchStyle { System::Drawing::Drawing2D::HatchStyle get(); };" />
<MemberSignature Language="F#" Value="member this.HatchStyle : System.Drawing.Drawing2D.HatchStyle" Usage="System.Drawing.Drawing2D.HatchBrush.HatchStyle" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Drawing2D.HatchStyle</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the hatch style of this <see cref="T:System.Drawing.Drawing2D.HatchBrush" /> object.</summary>
<value>One of the <see cref="T:System.Drawing.Drawing2D.HatchStyle" /> values that represents the pattern of this <see cref="T:System.Drawing.Drawing2D.HatchBrush" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.