Brush Class
Represents a type which describes how the area is painted or filled.
- Inheritance:
- System.ObjectBrush
- Derived
Remarks
Different brushes have different types of output. Some brushes paint an area with a solid color, others with a gradient, pattern or image.
GemBox.Document currently supports only SolidColorBrush. All other brush types are supported only through preservation.
Properties
IsEmpty
Gets a value indicating whether the parent element is filled.
Property Value
- System.Boolean
true if the parent element is not filled; otherwise, false.
Methods
SetDefault()
Sets a default fill on the parent element (element will be filled based on the default settings).
Returns
A brush which specifies that default fill will be applied to the parent element.
SetEmpty()
Sets an empty fill on the parent element (element won't be filled).
Returns
A brush which specifies that no fill will be applied to the parent element.
SetSolid(Color)
Sets a solid color fill on the parent element.
public SolidColorBrush SetSolid(Color color)
Public Function SetSolid(color As Color) As SolidColorBrush
Parameters
color
- Color
The color to apply to the fill.
Returns
A brush which specifies a solid color fill which will be applied to the parent element.
SetSolid(Color, Byte)
Sets a solid color fill on the parent element.
public SolidColorBrush SetSolid(Color color, byte opacity)
Public Function SetSolid(color As Color, opacity As Byte) As SolidColorBrush
Parameters
color
- Color
The color to apply to the fill.
opacity
- System.Byte
The color opacity (0 = fully transparent, 255 = fully opaque).
Returns
A brush which specifies a solid color fill which will be applied to the parent element.
ToString()
Returns a System.String that represents this Brush instance.
public sealed override string ToString()
Public NotOverridable Overrides Function ToString As String
Returns
- System.String
A System.String that represents this Brush instance.
Overrides
Remarks
This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).