Rhino C++ API  7.19
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ON_TextMask Class Reference

#include <opennurbs_dimensionstyle.h>

Public Types

enum  MaskFrame : unsigned char { MaskFrame::NoFrame = 0, MaskFrame::RectFrame = 1 }
 Draw a frame stroke around the text mask area More...
 
enum  MaskType : unsigned char { MaskType::BackgroundColor = 0, MaskType::MaskColor = 1 }
 Text mask drawn with background color or explicit color More...
 

Public Member Functions

 ON_TextMask ()=default
 
 ON_TextMask (const ON_TextMask &src)=default
 
 ~ON_TextMask ()=default
 
const ON_SHA1_HashContentHash () const
 
bool DrawTextMask () const
 Specifies whether or not to draw a Text Mask. More...
 
double MaskBorder () const
 
ON_Color MaskColor () const
 
ON_TextMask::MaskType MaskFillType () const
 
ON_TextMask::MaskFrame MaskFrameType () const
 Determines whether or not to draw a rectangular frame around a text mask. More...
 
ON_TextMaskoperator= (const ON_TextMask &src)=default
 
bool Read (ON_BinaryArchive &archive)
 
void SetDrawTextMask (bool bDraw)
 
void SetMaskBorder (double offset)
 
void SetMaskColor (ON_Color color)
 
void SetMaskFillType (ON_TextMask::MaskType source)
 
void SetMaskFrameType (ON_TextMask::MaskFrame frame)
 
bool Write (ON_BinaryArchive &archive) const
 

Static Public Member Functions

static int Compare (const ON_TextMask &lhs, const ON_TextMask &rhs)
 
static ON_TextMask::MaskFrame MaskFrameFromUnsigned (unsigned int mask_frame_as_unsigned)
 
static ON_TextMask::MaskType MaskTypeFromUnsigned (unsigned int mask_border_as_unsigned)
 

Static Public Attributes

static const ON_TextMask None
 

Member Enumeration Documentation

◆ MaskFrame

enum ON_TextMask::MaskFrame : unsigned char
strong

Draw a frame stroke around the text mask area

Enumerator
NoFrame 

Text mask frame not drawn

RectFrame 

Text mask frame outline rectangle drawn

◆ MaskType

enum ON_TextMask::MaskType : unsigned char
strong

Text mask drawn with background color or explicit color

Enumerator
BackgroundColor 

Text mask drawn with background color

MaskColor 

Text mask drawn with explicit color

Constructor & Destructor Documentation

◆ ON_TextMask() [1/2]

ON_TextMask::ON_TextMask ( )
default

The default constructor content is idenical to ON_TextMask::None.

◆ ~ON_TextMask()

ON_TextMask::~ON_TextMask ( )
default

◆ ON_TextMask() [2/2]

ON_TextMask::ON_TextMask ( const ON_TextMask src)
default

Member Function Documentation

◆ Compare()

static int ON_TextMask::Compare ( const ON_TextMask lhs,
const ON_TextMask rhs 
)
static

Description: ON_TextMask::Compare() compares content in a repeatable and well ordered way. Returns: 0: lhs and rhs have identical content. <0: lhs content is less than rhs content >0: lhs content is greater than rhs content

◆ ContentHash()

const ON_SHA1_Hash& ON_TextMask::ContentHash ( ) const

Returns: A SHA1 of the values defining the text mask. Two text masks have the same content if and only if they have identical content hash values.

◆ DrawTextMask()

bool ON_TextMask::DrawTextMask ( ) const

Specifies whether or not to draw a Text Mask.

◆ MaskBorder()

double ON_TextMask::MaskBorder ( ) const

Returns: Width of border area around text to be masked. The default value is 0.0.

◆ MaskColor()

ON_Color ON_TextMask::MaskColor ( ) const

Returns: Mask color. Remarks: The mask color is applied only when MaskFillType() = ON_TextMask::MaskType::MaskColor

◆ MaskFillType()

ON_TextMask::MaskType ON_TextMask::MaskFillType ( ) const

Determines where to get the color to draw a Text Mask Can be background color or a specific color

◆ MaskFrameFromUnsigned()

static ON_TextMask::MaskFrame ON_TextMask::MaskFrameFromUnsigned ( unsigned int  mask_frame_as_unsigned)
static

◆ MaskFrameType()

ON_TextMask::MaskFrame ON_TextMask::MaskFrameType ( ) const

Determines whether or not to draw a rectangular frame around a text mask.

◆ MaskTypeFromUnsigned()

static ON_TextMask::MaskType ON_TextMask::MaskTypeFromUnsigned ( unsigned int  mask_border_as_unsigned)
static

◆ operator=()

ON_TextMask& ON_TextMask::operator= ( const ON_TextMask src)
default

◆ Read()

bool ON_TextMask::Read ( ON_BinaryArchive archive)

◆ SetDrawTextMask()

void ON_TextMask::SetDrawTextMask ( bool  bDraw)

◆ SetMaskBorder()

void ON_TextMask::SetMaskBorder ( double  offset)

◆ SetMaskColor()

void ON_TextMask::SetMaskColor ( ON_Color  color)

◆ SetMaskFillType()

void ON_TextMask::SetMaskFillType ( ON_TextMask::MaskType  source)

◆ SetMaskFrameType()

void ON_TextMask::SetMaskFrameType ( ON_TextMask::MaskFrame  frame)

◆ Write()

bool ON_TextMask::Write ( ON_BinaryArchive archive) const

Member Data Documentation

◆ None

const ON_TextMask ON_TextMask::None
static

ON_TextMask::None has no effect on text appearance.