PathGradientBrush Class
Encapsulates a Brush object that fills the interior of a GraphicsPath object with a gradient. This class cannot be inherited.
System::MarshalByRefObject
System.Drawing::Brush
System.Drawing.Drawing2D::PathGradientBrush
Assembly: System.Drawing (in System.Drawing.dll)
The PathGradientBrush type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | PathGradientBrush(GraphicsPath) | Initializes a new instance of the PathGradientBrush class with the specified path. |
![]() | PathGradientBrush(array<Point>) | Initializes a new instance of the PathGradientBrush class with the specified points. |
![]() | PathGradientBrush(array<PointF>) | Initializes a new instance of the PathGradientBrush class with the specified points. |
![]() | PathGradientBrush(array<Point>, WrapMode) | Initializes a new instance of the PathGradientBrush class with the specified points and wrap mode. |
![]() | PathGradientBrush(array<PointF>, WrapMode) | Initializes a new instance of the PathGradientBrush class with the specified points and wrap mode. |
| Name | Description | |
|---|---|---|
![]() | Blend | Gets or sets a Blend that specifies positions and factors that define a custom falloff for the gradient. |
![]() | CenterColor | Gets or sets the color at the center of the path gradient. |
![]() | CenterPoint | Gets or sets the center point of the path gradient. |
![]() | FocusScales | Gets or sets the focus point for the gradient falloff. |
![]() | InterpolationColors | Gets or sets a ColorBlend that defines a multicolor linear gradient. |
![]() | Rectangle | Gets a bounding rectangle for this PathGradientBrush. |
![]() | SurroundColors | Gets or sets an array of colors that correspond to the points in the path this PathGradientBrush fills. |
![]() | Transform | Gets or sets a copy of the Matrix that defines a local geometric transform for this PathGradientBrush. |
![]() | WrapMode | Gets or sets a WrapMode that indicates the wrap mode for this PathGradientBrush. |
| Name | Description | |
|---|---|---|
![]() | Clone | Creates an exact copy of this PathGradientBrush. (Overrides Brush::Clone().) |
![]() | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) |
![]() | Dispose() | Releases all resources used by this Brush object. (Inherited from Brush.) |
![]() | Dispose(Boolean) | Releases the unmanaged resources used by the Brush and optionally releases the managed resources. (Inherited from Brush.) |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Brush.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | MemberwiseClone() | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) |
![]() | MultiplyTransform(Matrix) | Updates the brush's transformation matrix with the product of brush's transformation matrix multiplied by another matrix. |
![]() | MultiplyTransform(Matrix, MatrixOrder) | Updates the brush's transformation matrix with the product of the brush's transformation matrix multiplied by another matrix. |
![]() | ResetTransform | Resets the Transform property to identity. |
![]() | RotateTransform(Single) | Rotates the local geometric transform by the specified amount. This method prepends the rotation to the transform. |
![]() | RotateTransform(Single, MatrixOrder) | Rotates the local geometric transform by the specified amount in the specified order. |
![]() | ScaleTransform(Single, Single) | Scales the local geometric transform by the specified amounts. This method prepends the scaling matrix to the transform. |
![]() | ScaleTransform(Single, Single, MatrixOrder) | Scales the local geometric transform by the specified amounts in the specified order. |
![]() | SetBlendTriangularShape(Single) | Creates a gradient with a center color and a linear falloff to one surrounding color. |
![]() | SetBlendTriangularShape(Single, Single) | Creates a gradient with a center color and a linear falloff to each surrounding color. |
![]() | SetNativeBrush | In a derived class, sets a reference to a GDI+ brush object. (Inherited from Brush.) |
![]() | SetSigmaBellShape(Single) | 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. |
![]() | SetSigmaBellShape(Single, Single) | 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. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | TranslateTransform(Single, Single) | Applies the specified translation to the local geometric transform. This method prepends the translation to the transform. |
![]() | TranslateTransform(Single, Single, MatrixOrder) | Applies the specified translation to the local geometric transform in the specified order. |
The color gradient is a smooth shading of colors from the center point of the path to the outside boundary edge of the path. Blend factors, positions, and style affect where the gradient starts and ends, and how fast it changes shade.
Path gradient brushes do not obey the SmoothingMode property of the Graphics object used to do the drawing. Areas filled using a PathGradientBrush object are rendered the same way (aliased) regardless of the smoothing mode.
The following code example shows how to create a PathGradientBrush. This example is designed for use with Windows Forms, and it requires the PaintEventArgs e, which is a parameter of PaintEventHandler.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
