Represents an area filled with a pattern. More...
#include <cadex/Drawing/Hatch.hxx>
Public Types | |
enum class | PatternType { Solid , ANSI_31 , ANSI_32 , ANSI_33 , ANSI_34 , ANSI_35 , ANSI_36 , ANSI_37 , ANSI_38 , ISO_02 , ISO_03 , ISO_04 , ISO_05 , ISO_06 , ISO_07 , ISO_08 , ISO_09 , ISO_10 , ISO_11 , ISO_12 , ISO_13 , ISO_14 , ISO_15 , Custom = 1000 } |
enum class | StyleType { Standard , Mirrored , Double } |
enum class | ContourType { Inner , Outer } |
![]() | |
typedef std::shared_ptr< internal::BaseObjectImpl > | ImplType |
Public Member Functions | |
Hatch () | |
Constructor. | |
bool | AddContour (const PiecewiseContour &theContour, ContourType theType=ContourType::Outer) |
Adds the hatch contour. | |
size_t | NumberOfContours () const |
Returns the number of hatch contours. | |
const PiecewiseContour & | Contour (size_t theIndex) const |
Returns the contour. | |
ContourType | TypeOfContour (size_t theIndex) const |
Returns the type of hatch contour. | |
void | SetStyle (StyleType theStyle) |
Sets the style for the hatch pattern. | |
StyleType | Style () const |
Returns the style for the hatch pattern. | |
void | SetPattern (PatternType thePattern) |
Set the hatch pattern. | |
PatternType | Pattern () const |
Returns the pattern of the hatch. | |
void | SetScale (double theScale) |
Set the scale of the hatch. | |
double | Scale () const |
Returns the scale of the hatch. | |
void | SetAngle (double theAngle) |
Set the angle of the hatch. | |
double | Angle () const |
Returns the angle of the hatch. | |
void | AddDefinitionLine (const HatchDefinitionLine &theDefinitionLine) |
Adds the definition line to the hatch. | |
size_t | NumberOfDefenitionLines () const |
Returns the number of definition lines. | |
const HatchDefinitionLine & | DefinitionLine (size_t theIndex) const |
Returns the definition line. | |
![]() | |
void | SetUuid (const Uuid &theUuid) |
cadex::Uuid | Uuid () const |
void | Accept (ElementVisitor &theVisitor) const |
![]() | |
size_t | Id () const |
Return unique identifier of public object. | |
internal::BaseObjectImpl * | Impl () const |
bool | IsNull () const |
operator bool () const | |
template<typename T > | |
bool | IsOfType () const |
template<typename T > | |
T * | Impl () const |
Reserved for internal use. | |
Static Public Member Functions | |
static bool | CompareType (const BaseObject &theObject) |
![]() | |
static bool | CompareType (const BaseObject &theObject) |
Additional Inherited Members | |
![]() | |
Element (const ImplType &theImpl) | |
![]() | |
BaseObject (const ImplType &theImpl) | |
Represents an area filled with a pattern.
The hatch pattern can be composed of solid, dashed or dash-doted lines. The pattern can be mirrored or composed with its mirror image to create double hatch. It follows the scheme used by AutoCAD to represent the set of ANSI-standard hatch patterns.
Three types of pattern styles are supported:
|
strong |
Represents pattern for drawing hatch.
|
strong |
Represents style for drawing hatch.
bool cadex::Drawing::Hatch::AddContour | ( | const PiecewiseContour & | theContour, |
ContourType | theType = ContourType::Outer ) |
Adds the hatch contour.
The contour must be closed otherwise it will not be added and the function will return false.
const PiecewiseContour & cadex::Drawing::Hatch::Contour | ( | size_t | theIndex | ) | const |
Returns the contour.
theIndex must be in the range [0, NumberOfContours()-1]. Otherwise the result is undefined.
const HatchDefinitionLine & cadex::Drawing::Hatch::DefinitionLine | ( | size_t | theIndex | ) | const |
Returns the definition line.
theIndex must be in the range [0, NumberOfDefenitionLines()-1]. Otherwise the result is undefined.
Hatch::ContourType cadex::Drawing::Hatch::TypeOfContour | ( | size_t | theIndex | ) | const |
Returns the type of hatch contour.
theIndex must be in the range [0; NumberOfContours()-1]. Otherwise the behavior is undefined.