Class HatchGradientPattern
Represents the hatch gradient pattern style.
Implements
Inherited Members
Namespace: netDxf.Entities
Assembly: CADability.dll
Syntax
public class HatchGradientPattern : HatchPattern, ICloneable
Remarks
Gradient patterns are only supported by AutoCad2004 and higher DXF versions. It will default to a solid pattern if saved as AutoCad2000.
Constructors
| Improve this Doc View SourceHatchGradientPattern()
Initializes a new instance of the HatchGradientPattern class as a default linear gradient.
Declaration
public HatchGradientPattern()
HatchGradientPattern(AciColor, AciColor, HatchGradientPatternType)
Initializes a new instance of the HatchGradientPattern class as a two color gradient.
Declaration
public HatchGradientPattern(AciColor color1, AciColor color2, HatchGradientPatternType type)
Parameters
| Type | Name | Description |
|---|---|---|
| AciColor | color1 | Gradient AciColor 1. |
| AciColor | color2 | Gradient AciColor 2. |
| HatchGradientPatternType | type | Gradient HatchGradientPatternType. |
HatchGradientPattern(AciColor, AciColor, HatchGradientPatternType, String)
Initializes a new instance of the HatchGradientPattern class as a two color gradient.
Declaration
public HatchGradientPattern(AciColor color1, AciColor color2, HatchGradientPatternType type, string description)
Parameters
| Type | Name | Description |
|---|---|---|
| AciColor | color1 | Gradient AciColor 1. |
| AciColor | color2 | Gradient AciColor 2. |
| HatchGradientPatternType | type | Gradient HatchGradientPatternType. |
| System.String | description | Description of the pattern (optional, this information is not saved in the DXF file). By default it will use the supplied name. |
HatchGradientPattern(AciColor, Double, HatchGradientPatternType)
Initializes a new instance of the HatchGradientPattern class as a single color gradient.
Declaration
public HatchGradientPattern(AciColor color, double tint, HatchGradientPatternType type)
Parameters
| Type | Name | Description |
|---|---|---|
| AciColor | color | Gradient AciColor. |
| System.Double | tint | Gradient tint. |
| HatchGradientPatternType | type | Gradient HatchGradientPatternType. |
HatchGradientPattern(AciColor, Double, HatchGradientPatternType, String)
Initializes a new instance of the HatchGradientPattern class as a single color gradient.
Declaration
public HatchGradientPattern(AciColor color, double tint, HatchGradientPatternType type, string description)
Parameters
| Type | Name | Description |
|---|---|---|
| AciColor | color | Gradient AciColor. |
| System.Double | tint | Gradient tint. |
| HatchGradientPatternType | type | Gradient HatchGradientPatternType. |
| System.String | description | Description of the pattern (optional, this information is not saved in the DXF file). By default it will use the supplied name. |
HatchGradientPattern(String)
Initializes a new instance of the HatchGradientPattern class as a default linear gradient.
Declaration
public HatchGradientPattern(string description)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | description | Description of the pattern (optional, this information is not saved in the DXF file). By default it will use the supplied name. |
Properties
| Improve this Doc View SourceCentered
Gets or sets if the pattern is centered or not.
Declaration
public bool Centered { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
Each gradient has two definitions, shifted and unsifted. A shift value describes the blend of the two definitions that should be used. A value of 0.0 (false) means only the unsifted version should be used, and a value of 1.0 (true) means that only the shifted version should be used.
Color1
Gets or sets the gradient AciColor 1.
Declaration
public AciColor Color1 { get; set; }
Property Value
| Type | Description |
|---|---|
| AciColor |
Color2
Gets or sets the gradient AciColor 2.
Declaration
public AciColor Color2 { get; set; }
Property Value
| Type | Description |
|---|---|
| AciColor |
Remarks
If color 2 is defined, automatically the single color property will be set to false.
GradientType
Gets or set the gradient pattern HatchGradientPatternType.
Declaration
public HatchGradientPatternType GradientType { get; set; }
Property Value
| Type | Description |
|---|---|
| HatchGradientPatternType |
SingleColor
Gets or sets the gradient pattern color type.
Declaration
public bool SingleColor { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Tint
Gets or sets the gradient pattern tint.
Declaration
public double Tint { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Remarks
It only applies to single color gradient patterns.
Methods
| Improve this Doc View SourceClone()
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object |