BackgroundFill Class
Provides a base class for an object that can be used as a background fill.
[TypeConverter(typeof(GenericExpandableNullableObjectConverter))]
public abstract class BackgroundFill : ICloneable
- Inheritance:
- object object
- Implements:
- ICloneable
Constructors
BackgroundFill()
Initializes a new instance of the BackgroundFill
class.
protected BackgroundFill()
Remarks
The default constructor initializes all fields to their default values.
BackgroundFill(BackgroundFill)
Initializes a new instance of the BackgroundFill
class.
protected BackgroundFill(BackgroundFill copyFrom)
Parameter | Type | Description |
---|---|---|
copyFrom | BackgroundFill | An instance of |
Remarks
This constructor used in support of Clone() for base classes to initialize their fields.
Methods
Clone()
Creates an exact duplicate of the BackgroundFill object.
public abstract BackgroundFill Clone()
Returns
- BackgroundFill:
An exact duplicate of the BackgroundFill object.
Draw(Graphics, Rectangle)
Fills an area with the background fill.
public void Draw(Graphics g, Rectangle bounds)
Parameter | Type | Description |
---|---|---|
g | Graphics | The |
bounds | Rectangle | The bounds of the area to paint. |
Draw(Graphics, Rectangle, Sides)
Fills an area with the background fill.
public void Draw(Graphics g, Rectangle bounds, Sides side)
Parameter | Type | Description |
---|---|---|
g | Graphics | The |
bounds | Rectangle | The bounds of the area to paint. |
side | Sides | The side with which the background fill should be oriented. |
Draw(Graphics, Rectangle, Rectangle)
Fills an area with the background fill.
public void Draw(Graphics g, Rectangle bounds, Rectangle brushBounds)
Parameter | Type | Description |
---|---|---|
g | Graphics | The |
bounds | Rectangle | The bounds of the area to paint. |
brushBounds | Rectangle | The reference bounds for the brush. |
Draw(Graphics, Rectangle, Rectangle, Sides)
Fills an area with the background fill.
public void Draw(Graphics g, Rectangle bounds, Rectangle brushBounds, Sides side)
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. |
DrawScaled(Graphics, Rectangle, Sides, SizeF)
Fills an area with the background fill.
public void DrawScaled(Graphics g, Rectangle bounds, Sides side, SizeF scaleFactor)
Parameter | Type | Description |
---|---|---|
g | Graphics | The |
bounds | Rectangle | The bounds of the area to paint. |
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. |
DrawScaled(Graphics, Rectangle, Rectangle, Sides, SizeF)
Fills an area with the background fill.
public abstract 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. |
DrawScaled(Graphics, Rectangle, Rectangle, SizeF)
Fills an area with the background fill.
public void DrawScaled(Graphics g, Rectangle bounds, Rectangle brushBounds, 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. |
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, SizeF)
Fills an area with the background fill.
public void DrawScaled(Graphics g, Rectangle bounds, SizeF scaleFactor)
Parameter | Type | Description |
---|---|---|
g | Graphics | The |
bounds | Rectangle | The bounds of the area to paint. |
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 virtual 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.
OnPropertyChanged(EventArgs)
Raises the PropertyChanged
event.
protected virtual void OnPropertyChanged(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | An |
Events
PropertyChanged
Occurs after a property is changed.