Class FillStyle
A FillStyle is a collection of properties that define a brush used for fill operations during rendering.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Base.dll
Syntax
public class FillStyle : PropertyContainer, IServiceReferenceHolder, IServiceReferenceProvider, IPropertyObserver, IPropertyContainer, ICloneable, ISerializable, IDisposable
Constructors
FillStyle()
Initializes a new instance of the FillStyle class.
Declaration
public FillStyle()
FillStyle(FillStyle)
Initializes a new instance of the FillStyle class.
Declaration
public FillStyle(FillStyle src)
Parameters
Type | Name | Description |
---|---|---|
FillStyle | src | The SRC. |
FillStyle(SerializationInfo, StreamingContext)
Initializes a new instance of the FillStyle class.
Declaration
protected FillStyle(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The info. |
System.Runtime.Serialization.StreamingContext | context | The context. |
Properties
Color
Gets or sets color to use for the brush.
Declaration
public Color Color { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
Remarks
NOTE: If Type is set to FillType.LinearGradient, then this is the ending color for the gradient.
ColorAlphaFactor
Gets or sets alpha blending factor.
Declaration
public int ColorAlphaFactor { get; set; }
Property Value
Type |
---|
System.Int32 |
ForeColor
Gets or sets the foreground color used for the fill style.
Declaration
public Color ForeColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
Remarks
NOTE: If Type is set to FillType.LinearGradient, then this is the starting color for the gradient.
ForeColorAlphaFactor
Gets or sets alpha blending factor for the ForeColor.
Declaration
public int ForeColorAlphaFactor { get; set; }
Property Value
Type |
---|
System.Int32 |
GradientAngle
Gets or sets angle used for gradient fill.
Declaration
public float GradientAngle { get; set; }
Property Value
Type |
---|
System.Single |
GradientCenter
Gets or sets a value from 0 through 1 that specifies the center of the gradient.
Declaration
public float GradientCenter { get; set; }
Property Value
Type |
---|
System.Single |
HatchBrushStyle
Gets or sets hatch brush style to create for filled regions.
Declaration
public HatchStyle HatchBrushStyle { get; set; }
Property Value
Type |
---|
System.Drawing.Drawing2D.HatchStyle |
InheritContainerMeasureUnits
Gets or sets a value indicating whether [inherit container measure units].
Declaration
public override bool InheritContainerMeasureUnits { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Overrides
MeasureUnit
Gets or sets the measure unit.
Declaration
public override MeasureUnits MeasureUnit { get; set; }
Property Value
Type | Description |
---|---|
MeasureUnits | The measure unit. |
Overrides
PathBrushStyle
Gets or sets the path brush style.
Declaration
public PathGradientBrushStyle PathBrushStyle { get; set; }
Property Value
Type | Description |
---|---|
PathGradientBrushStyle | The path brush style. |
Texture
Gets or sets image to use for texture fill.
Declaration
public Image Texture { get; set; }
Property Value
Type |
---|
System.Drawing.Image |
TextureWrapMode
Gets or sets the mode how the texture is wrapped if fill type is set to texture.
Declaration
public WrapMode TextureWrapMode { get; set; }
Property Value
Type |
---|
System.Drawing.Drawing2D.WrapMode |
Type
Gets or sets type of brush to create for filled regions.
Declaration
public FillStyleType Type { get; set; }
Property Value
Type |
---|
FillStyleType |
Methods
Clone()
Clones this instance.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | The cloned object. |
Overrides
CreateBrush(Graphics, RectangleF)
Creates a new brush based on the properties contained by the FillStyle object.
Declaration
public Brush CreateBrush(Graphics grfx, RectangleF fillBounds)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | grfx | Graphics context the brush will be used in. |
System.Drawing.RectangleF | fillBounds | Bounds of the object to be filled (needed for gradient brushes only). |
Returns
Type | Description |
---|---|
System.Drawing.Brush | A GDI+ brush object. |
Dispose()
Declaration
public override void Dispose()
Overrides
Equals(Object)
Determines whether the specified System.Object is equal to the current System.Object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The System.Object to compare with the current System.Object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified System.Object is equal to the current System.Object; otherwise, false. |
Overrides
Exceptions
Type | Condition |
---|---|
System.NullReferenceException | The |
GetHashCode()
Serves as a hash function for a particular type.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the current System.Object. |
Overrides
GetObjectData(SerializationInfo, StreamingContext)
Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
Declaration
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The System.Runtime.Serialization.SerializationInfo to populate with data. |
System.Runtime.Serialization.StreamingContext | context | The destination (see System.Runtime.Serialization.StreamingContext) for this serialization. |
Overrides
Exceptions
Type | Condition |
---|---|
System.Security.SecurityException | The caller does not have the required permission. |
GetPropertyContainerName()
Gets the name of the property container.
Declaration
protected override string GetPropertyContainerName()
Returns
Type | Description |
---|---|
System.String | Property container name. |
Overrides
ShouldSerializeColor()
Shows whether Color will be serializable.
Declaration
protected bool ShouldSerializeColor()
Returns
Type | Description |
---|---|
System.Boolean | true, if serialize color. |
ShouldSerializeForeColor()
Shows whether ForeColor will be serializable.
Declaration
protected bool ShouldSerializeForeColor()
Returns
Type | Description |
---|---|
System.Boolean | true, if serialize forecolor. |