Brush |
[SerializableAttribute] public class BrushX : IEquatable<BrushX>, IImmutable
The BrushX type exposes the following members.
| Name | Description | |
|---|---|---|
| BrushX(BrushType) | Initializes a new instance of the BrushX class for the specified brush type. | |
| BrushX(NamedColor) | Initializes a new instance of the BrushX class as a solid brush. |
| Name | Description | |
|---|---|---|
| BackColor | Gets the background color of the brush. | |
| BrushType | Gets the brush type. | |
| Color | Gets the foreground color of the brush. | |
| DefaultHatchBrush | Gets the default hatch brush image. | |
| DefaultSyntheticBrush | Gets the default synthetic brush image. | |
| DefaultTextureBrush | Gets the default texture brush image. | |
| Empty | Gets an empty transparent brush. | |
| ExchangeColors | Gets a value indicating whether foreground and background colors are exchanged. | |
| GradientAngle | Gets the gradient angle in degrees. | |
| GradientColorScale | Gets the gradient color scale factor. | |
| GradientFocus | Gets the gradient focus value. | |
| IsInvisible | Returns true if the brush is invisible, i.e. is a solid and transparent brush. | |
| IsSolidBrush | Gets a value indicating whether this brush is a solid brush. | |
| IsVisible | Returns true if the brush is visible, i.e. is not a transparent brush. | |
| TextureImage | Gets the texture image used by texture-based brushes. | |
| TextureOffsetX | Gets the horizontal texture offset. | |
| TextureOffsetY | Gets the vertical texture offset. | |
| TextureScale | Gets the texture scaling mode. | |
| WrapMode | Gets the wrap mode used for texture-based brushes. |
| Name | Description | |
|---|---|---|
| CalculateHash | Calculates the hash code for the current brush state. | |
| Clone | Clones this instance, and sets the cached HashCode to null. | |
| Equals(BrushX) | Indicates whether the current object is equal to another object of the same type. | |
| Equals(Object) | Determines whether the specified object is equal to the current object. (Overrides ObjectEquals(Object)) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
| GetHashCode | Serves as the default hash function. (Overrides ObjectGetHashCode) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
| ToString | Returns a string that represents the current object. (Inherited from Object) | |
| WithBackColor | Returns a copy of this brush with a different background color. | |
| WithBrushType | Returns a copy of this brush with a different brush type. | |
| WithColor | Returns a copy of this brush with a different foreground color. | |
| WithColors | Returns a copy of this brush with different foreground and background colors. | |
| WithExchangedColors | Returns a copy of this brush with the exchanged-colors flag updated. | |
| WithGradientAngle | Returns a copy of this brush with a different gradient angle. | |
| WithGradientColorScale | Returns a copy of this brush with a different gradient color scale. | |
| WithGradientFocus | Returns a copy of this brush with a different gradient focus. | |
| WithTextureImage | Returns a copy of this brush with a different texture image. | |
| WithTextureOffsetX | Returns a copy of this brush with a different horizontal texture offset. | |
| WithTextureOffsetY | Returns a copy of this brush with a different vertical texture offset. | |
| WithTextureScale | Returns a copy of this brush with a different texture scaling mode. | |
| WithWrapMode | Returns a copy of this brush with a different wrap mode. |
| Name | Description | |
|---|---|---|
| Equality(BrushX, BrushX) | Determines whether two BrushX instances are equal. | |
| Inequality(BrushX, BrushX) | Determines whether two BrushX instances are not equal. |
| Name | Description | |
|---|---|---|
| _angle | The brush angle in degrees. | |
| _backColor | The background color of the brush. | |
| _brushType | The brush type. | |
| _cachedHashCode | Cached hash code. Must be invaliated after cloning the instance. | |
| _exchangeColors | Indicates whether foreground and background colors are exchanged. | |
| _foreColor | The foreground color of the brush. | |
| _gradientColorScale | The gradient color scale factor. | |
| _offsetX | For a gradient brush, this is the GradientFocus property. For texture brushes, it is the X-Offset property. | |
| _offsetY | The Y offset for texture and path-gradient brushes. | |
| _textureImage | The texture image used for texture-based brushes. | |
| _textureScale | The texture scaling used for texture-based brushes. | |
| _wrapMode | The wrap mode used for texture and linear gradient brushes. |