Click or drag to resize

BrushX Class

Holds all information necessary to create a brush of any kind without allocating resources, so this class can be serialized.
Inheritance Hierarchy
SystemObject
  Altaxo.DrawingBrushX

Namespace: Altaxo.Drawing
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntax
C#
[SerializableAttribute]
public class BrushX : IEquatable<BrushX>, 
	IImmutable

The BrushX type exposes the following members.

Constructors
 NameDescription
Public methodBrushX(BrushType) Initializes a new instance of the BrushX class for the specified brush type.
Public methodBrushX(NamedColor) Initializes a new instance of the BrushX class as a solid brush.
Top
Properties
 NameDescription
Public propertyBackColor Gets the background color of the brush.
Public propertyBrushType Gets the brush type.
Public propertyColor Gets the foreground color of the brush.
Public propertyStatic memberDefaultHatchBrush Gets the default hatch brush image.
Public propertyStatic memberDefaultSyntheticBrush Gets the default synthetic brush image.
Public propertyStatic memberDefaultTextureBrush Gets the default texture brush image.
Public propertyStatic memberEmpty Gets an empty transparent brush.
Public propertyExchangeColors Gets a value indicating whether foreground and background colors are exchanged.
Public propertyGradientAngle Gets the gradient angle in degrees.
Public propertyGradientColorScale Gets the gradient color scale factor.
Public propertyGradientFocus Gets the gradient focus value.
Public propertyIsInvisible Returns true if the brush is invisible, i.e. is a solid and transparent brush.
Public propertyIsSolidBrush Gets a value indicating whether this brush is a solid brush.
Public propertyIsVisible Returns true if the brush is visible, i.e. is not a transparent brush.
Public propertyTextureImage Gets the texture image used by texture-based brushes.
Public propertyTextureOffsetX Gets the horizontal texture offset.
Public propertyTextureOffsetY Gets the vertical texture offset.
Public propertyTextureScale Gets the texture scaling mode.
Public propertyWrapMode Gets the wrap mode used for texture-based brushes.
Top
Methods
 NameDescription
Protected methodCalculateHash Calculates the hash code for the current brush state.
Protected methodClone Clones this instance, and sets the cached HashCode to null.
Public methodEquals(BrushX)Indicates whether the current object is equal to another object of the same type.
Public methodEquals(Object)Determines whether the specified object is equal to the current object.
(Overrides ObjectEquals(Object))
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Overrides ObjectGetHashCode)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodWithBackColor Returns a copy of this brush with a different background color.
Public methodWithBrushType Returns a copy of this brush with a different brush type.
Public methodWithColor Returns a copy of this brush with a different foreground color.
Public methodWithColors Returns a copy of this brush with different foreground and background colors.
Public methodWithExchangedColors Returns a copy of this brush with the exchanged-colors flag updated.
Public methodWithGradientAngle Returns a copy of this brush with a different gradient angle.
Public methodWithGradientColorScale Returns a copy of this brush with a different gradient color scale.
Public methodWithGradientFocus Returns a copy of this brush with a different gradient focus.
Public methodWithTextureImage Returns a copy of this brush with a different texture image.
Public methodWithTextureOffsetX Returns a copy of this brush with a different horizontal texture offset.
Public methodWithTextureOffsetY Returns a copy of this brush with a different vertical texture offset.
Public methodWithTextureScale Returns a copy of this brush with a different texture scaling mode.
Public methodWithWrapMode Returns a copy of this brush with a different wrap mode.
Top
Operators
 NameDescription
Public operatorStatic memberEquality(BrushX, BrushX) Determines whether two BrushX instances are equal.
Public operatorStatic memberInequality(BrushX, BrushX) Determines whether two BrushX instances are not equal.
Top
Fields
 NameDescription
Protected field_angle The brush angle in degrees.
Protected field_backColor The background color of the brush.
Protected field_brushType The brush type.
Protected field_cachedHashCode Cached hash code. Must be invaliated after cloning the instance.
Protected field_exchangeColors Indicates whether foreground and background colors are exchanged.
Protected field_foreColor The foreground color of the brush.
Protected field_gradientColorScale The gradient color scale factor.
Protected field_offsetXFor a gradient brush, this is the GradientFocus property. For texture brushes, it is the X-Offset property.
Protected field_offsetY The Y offset for texture and path-gradient brushes.
Protected field_textureImage The texture image used for texture-based brushes.
Protected field_textureScale The texture scaling used for texture-based brushes.
Protected field_wrapMode The wrap mode used for texture and linear gradient brushes.
Top
See Also