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 an instance of the class.
protected BackgroundFill()
BackgroundFill(BackgroundFill)
Initializes an instance of the class.
protected BackgroundFill(BackgroundFill copyFrom)
| Parameter | Type | Description |
|---|---|---|
| copyFrom | BackgroundFill | An instance of BackgroundFill which will be copied to initialize the new instance. |
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.
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 object to compare with the current object. |
Returns
- bool:
trueif the specified object is equal to the current object; otherwise,false.
GetBrush(Rectangle, Sides)
Returns 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()
Serves as the default hash function.
OnPropertyChanged(EventArgs)
Raises the PropertyChanged event.
protected virtual void OnPropertyChanged(EventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
Events
PropertyChanged
Occurs after a property is changed.
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object, object)
- object.ReferenceEquals(object, object)