Show / Hide Table of Contents

Class HatchPattern

Represents a Hatch pattern style.

Inheritance
System.Object
HatchPattern
HatchGradientPattern
Implements
System.ICloneable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: netDxf.Entities
Assembly: CADability.dll
Syntax
public class HatchPattern : ICloneable

Constructors

| Improve this Doc View Source

HatchPattern(String)

Initializes a new instance of the HatchPattern class.

Declaration
public HatchPattern(string name)
Parameters
Type Name Description
System.String name

Pattern name, always stored as uppercase.

| Improve this Doc View Source

HatchPattern(String, IEnumerable<HatchPatternLineDefinition>)

Initializes a new instance of the HatchPattern class.

Declaration
public HatchPattern(string name, IEnumerable<HatchPatternLineDefinition> lineDefinitions)
Parameters
Type Name Description
System.String name

Pattern name, always stored as uppercase.

System.Collections.Generic.IEnumerable<HatchPatternLineDefinition> lineDefinitions

The definition of the lines that make up the pattern (not applicable in Solid fills).

| Improve this Doc View Source

HatchPattern(String, IEnumerable<HatchPatternLineDefinition>, String)

Initializes a new instance of the HatchPattern class.

Declaration
public HatchPattern(string name, IEnumerable<HatchPatternLineDefinition> lineDefinitions, string description)
Parameters
Type Name Description
System.String name

Pattern name, always stored as uppercase.

System.Collections.Generic.IEnumerable<HatchPatternLineDefinition> lineDefinitions

The definition of the lines that make up the pattern (not applicable in Solid fills).

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.

| Improve this Doc View Source

HatchPattern(String, String)

Initializes a new instance of the HatchPattern class.

Declaration
public HatchPattern(string name, string description)
Parameters
Type Name Description
System.String name

Pattern name, always stored as uppercase.

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 Source

Angle

Gets or sets the pattern angle in degrees.

Declaration
public double Angle { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Description

Gets or sets the hatch description (optional, this information is not saved in the DXF file).

Declaration
public string Description { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Dots

Dots hatch pattern.

Declaration
public static HatchPattern Dots { get; }
Property Value
Type Description
HatchPattern
Remarks

The predefined pattern values are based on the acad.pat file of AutoCAD.

| Improve this Doc View Source

Fill

Gets the solid fill flag.

Declaration
public HatchFillType Fill { get; }
Property Value
Type Description
HatchFillType
| Improve this Doc View Source

Line

Lines hatch pattern.

Declaration
public static HatchPattern Line { get; }
Property Value
Type Description
HatchPattern
Remarks

The predefined pattern values are based on the acad.pat file of AutoCAD.

| Improve this Doc View Source

LineDefinitions

Gets the definition of the lines that make up the pattern (not applicable in Solid fills).

Declaration
public List<HatchPatternLineDefinition> LineDefinitions { get; }
Property Value
Type Description
System.Collections.Generic.List<HatchPatternLineDefinition>
| Improve this Doc View Source

Name

Gets or sets the hatch pattern name.

Declaration
public string Name { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Net

Net or squares hatch pattern.

Declaration
public static HatchPattern Net { get; }
Property Value
Type Description
HatchPattern
Remarks

The predefined pattern values are based on the acad.pat file of AutoCAD.

| Improve this Doc View Source

Origin

Gets or sets the pattern origin.

Declaration
public Vector2 Origin { get; set; }
Property Value
Type Description
Vector2
| Improve this Doc View Source

Scale

Gets or sets the pattern scale (not applicable in Solid fills).

Declaration
public double Scale { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Solid

Solid hatch pattern.

Declaration
public static HatchPattern Solid { get; }
Property Value
Type Description
HatchPattern
Remarks

The predefined pattern values are based on the acad.pat file of AutoCAD.

| Improve this Doc View Source

Style

Gets the hatch style.

Declaration
public HatchStyle Style { get; }
Property Value
Type Description
HatchStyle
Remarks

Only normal style is implemented.

| Improve this Doc View Source

Type

Gets or sets the hatch pattern type.

Declaration
public HatchType Type { get; set; }
Property Value
Type Description
HatchType

Methods

| Improve this Doc View Source

Clone()

Declaration
public virtual object Clone()
Returns
Type Description
System.Object
| Improve this Doc View Source

Load(String, String)

Creates a new hatch pattern from the definition in a PAT file.

Declaration
public static HatchPattern Load(string file, string patternName)
Parameters
Type Name Description
System.String file

PAT file where the definition is located.

System.String patternName

Name of the pattern definition that wants to be read (ignore case).

Returns
Type Description
HatchPattern

A Hatch pattern as defined in the PAT file.

| Improve this Doc View Source

NamesFromFile(String)

Gets the list of hatch pattern names defined in a PAT file.

Declaration
public static List<string> NamesFromFile(string file)
Parameters
Type Name Description
System.String file

Hatch pattern definitions file.

Returns
Type Description
System.Collections.Generic.List<System.String>

List of hatch pattern names contained in the specified PAT file.

| Improve this Doc View Source

Save(String)

Saves the current linetype to the specified file, if the file does not exist it creates a new one.

Declaration
public void Save(string file)
Parameters
Type Name Description
System.String file

File where the current linetype will be saved.

Implements

System.ICloneable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX