HatchedBackgroundFill Class
Provides a class that draws a hatched two-color background fill.
[TypeConverter(typeof(HatchedBackgroundFillConverter))]
public class HatchedBackgroundFill : BackgroundFill, ICloneable
- Inheritance:
- object BackgroundFill object
- Implements:
- ICloneable
Constructors
HatchedBackgroundFill()
Initializes a new instance of the HatchedBackgroundFill
class.
public HatchedBackgroundFill()
Remarks
The default constructor initializes all fields to their default values.
HatchedBackgroundFill(HatchedBackgroundFill)
Initializes a new instance of the HatchedBackgroundFill
class.
protected HatchedBackgroundFill(HatchedBackgroundFill copyFrom)
Parameter | Type | Description |
---|---|---|
copyFrom | HatchedBackgroundFill | An instance of |
Remarks
This constructor used in support of Clone() for base classes to initialize their fields.
HatchedBackgroundFill(Color)
Initializes a new instance of the HatchedBackgroundFill
class.
public HatchedBackgroundFill(Color color)
Parameter | Type | Description |
---|---|---|
color | Color | The first color of the background fill. |
HatchedBackgroundFill(Color, Color)
Initializes a new instance of the HatchedBackgroundFill
class.
public HatchedBackgroundFill(Color color1, Color color2)
Parameter | Type | Description |
---|---|---|
color1 | Color | The first color of the background fill. |
color2 | Color | The second color of the background fill. |
Properties
Color1
Gets or sets the first color of the background fill.
public Color Color1 { get; set; }
Property Value
Color2
Gets or sets the second color of the background fill.
public Color Color2 { get; set; }
Property Value
Methods
Clone()
Creates an exact duplicate of the BackgroundFill object.
public override BackgroundFill Clone()
Returns
- BackgroundFill:
An exact duplicate of the BackgroundFill object.
Draw(Graphics, Rectangle, Color, Color)
Fills an area with the background fill.
public static void Draw(Graphics g, Rectangle bounds, Color color1, Color color2)
Parameter | Type | Description |
---|---|---|
g | Graphics | The |
bounds | Rectangle | The bounds of the area to paint. |
color1 | Color | The first color of the background fill. |
color2 | Color | The second color of the background fill. |
DrawScaled(Graphics, Rectangle, Color, Color, SizeF)
Fills an area with the background fill.
public static void DrawScaled(Graphics g, Rectangle bounds, Color color1, Color color2, SizeF scaleFactor)
Parameter | Type | Description |
---|---|---|
g | Graphics | The |
bounds | Rectangle | The bounds of the area to paint. |
color1 | Color | The first color of the background fill. |
color2 | Color | The second color of the background fill. |
scaleFactor | SizeF | The factor of the scale transform to be applied where Width is applied to the x-axis, and Height is applied to the y-axis. |
DrawScaled(Graphics, Rectangle, Rectangle, Sides, SizeF)
Fills an area with the background fill.
public override void DrawScaled(Graphics g, Rectangle bounds, Rectangle brushBounds, Sides side, SizeF scaleFactor)
Parameter | Type | Description |
---|---|---|
g | Graphics | The |
bounds | Rectangle | The bounds of the area to paint. |
brushBounds | Rectangle | The reference bounds for the brush. |
side | Sides | The side with which the background fill should be oriented. |
scaleFactor | SizeF | The factor of the scale transform to be applied where Width is applied to the x-axis, and Height is applied to the y-axis. |
Equals(object)
Determines whether the specified Object
is equal to the current Object
.
public override bool Equals(object obj)
Parameter | Type | Description |
---|---|---|
obj | object | The |
Returns
- bool:
true
if the specifiedObject
is equal to the currentObject
; otherwise,false
.
GetBrush(Rectangle, Sides)
Gets a Brush that represents the background fill.
public override Brush GetBrush(Rectangle bounds, Sides side)
Parameter | Type | Description |
---|---|---|
bounds | Rectangle | The bounds of the area to paint. |
side | Sides | The side with which the background fill should be oriented. |
Returns
GetHashCode()
Returns a hash code for this object.
public override int GetHashCode()
Returns
- int:
An integer value that specifies a hash value for this object.
ResetColor1()
Resets the Color1 property to its default value.
public virtual void ResetColor1()
ResetColor2()
Resets the Color2 property to its default value.
public virtual void ResetColor2()
ShouldSerializeColor1()
Indicates whether the Color1 property should be persisted.
public virtual bool ShouldSerializeColor1()
Returns
- bool:
true
if the property value has changed from its default; otherwise,false
.
ShouldSerializeColor2()
Indicates whether the Color2 property should be persisted.
public virtual bool ShouldSerializeColor2()
Returns
- bool:
true
if the property value has changed from its default; otherwise,false
.
Inherited Members
- BackgroundFill.Draw(Graphics, Rectangle)
- BackgroundFill.Draw(Graphics, Rectangle, Rectangle)
- BackgroundFill.Draw(Graphics, Rectangle, Sides)
- BackgroundFill.Draw(Graphics, Rectangle, Rectangle, Sides)
- BackgroundFill.DrawScaled(Graphics, Rectangle, SizeF)
- BackgroundFill.DrawScaled(Graphics, Rectangle, Rectangle, SizeF)
- BackgroundFill.DrawScaled(Graphics, Rectangle, Sides, SizeF)
- BackgroundFill.OnPropertyChanged(EventArgs)
- BackgroundFill.PropertyChanged
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object, object)
- object.ReferenceEquals(object, object)