AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
NTV2Line21Attributes Struct Reference

CEA-608 Character Attributes. More...

#include <ntv2caption608types.h>

Public Member Functions

 NTV2Line21Attributes ()
 Constructs a default NTV2Line21Attributes instance, i.e., no flashing, no italics, no underline, white on black with an opaque background. More...
 
 NTV2Line21Attributes (const NTV2Line21Color inFGColor, const NTV2Line21Color inBGColor=NTV2_CC608_Black, const NTV2Line21Opacity inOpacity=NTV2_CC608_Opaque, const bool inItalics=false, const bool inUnderline=false, const bool inFlash=false)
 Constructs a NTV2Line21Attributes instance with the given settings. More...
 
 NTV2Line21Attributes (const NTV2Line21Attributes &inRHS)
 
NTV2Line21Attributesoperator= (const NTV2Line21Attributes &inRHS)
 
bool IsSet (void) const
 Returns true if I'm any different from the default, i.e., if IsFlashing(), IsItalicized(), IsUnderlined() return true, or if my foreground color is anything but white, or if my background color is anything but black, or if my opacity is anything but opaque. More...
 
NTV2Line21Color GetColor (void) const
 Returns my foreground color. More...
 
NTV2Line21Color GetBGColor (void) const
 Returns my background color. More...
 
NTV2Line21Opacity GetOpacity (void) const
 Returns my background opacity. More...
 
bool IsItalicized (void) const
 Returns true if I'm italicized; otherwise returns false. More...
 
bool IsUnderlined (void) const
 Returns true if I'm underlined; otherwise returns false. More...
 
bool IsFlashing (void) const
 Returns true if I'm flashing; otherwise returns false. More...
 
NTV2Line21AttributesAddItalics (void)
 Enables italics. More...
 
NTV2Line21AttributesRemoveItalics (void)
 Removes italics. More...
 
NTV2Line21AttributesSetItalics (const bool inItalics)
 Sets my italics setting. More...
 
NTV2Line21AttributesAddUnderline (void)
 Enables my underline attribute setting. More...
 
NTV2Line21AttributesRemoveUnderline (void)
 Disables my underline attribute setting. More...
 
NTV2Line21AttributesSetUnderline (const bool inUnderline)
 Sets my underline attribute setting. More...
 
NTV2Line21AttributesAddFlash (void)
 Enables my flashing attribute setting. More...
 
NTV2Line21AttributesRemoveFlash (void)
 Disables my flashing attribute setting. More...
 
NTV2Line21AttributesSetFlash (const bool inFlash)
 Sets my flashing attribute setting. More...
 
NTV2Line21AttributesSetColor (const NTV2Line21Color inFGColor)
 Sets my foreground color attribute. More...
 
NTV2Line21AttributesSetBGColor (const NTV2Line21Color inBGColor)
 Sets my background color attribute. More...
 
NTV2Line21AttributesSetOpacity (const NTV2Line21Opacity inOpacity)
 Sets my background opacity attribute. More...
 
void Clear (void)
 Clears all of my attributes, returning me to a default state, i.e., no flashing, no italics, no underline, white on black with an opaque background. More...
 
bool operator< (const NTV2Line21Attributes &inRHS) const
 Compares my attributes with those of another, and returns true if my magnitude is less than the right-hand operand's. More...
 
bool operator== (const NTV2Line21Attributes &inRHS) const
 Compares my attributes with those of another, and returns true if they're identical. More...
 
bool operator!= (const NTV2Line21Attributes &inRHS) const
 Compares my attributes with those of another, and returns false if any of them mismatch. More...
 
std::string GetHexString (void) const
 For dumping the attributes backbuffer. More...
 
uint16_t GetHashKey (void) const
 Returns my magnitude used to implement operator < for sorting or using a Line21 attribute as an index key. More...
 

Detailed Description

CEA-608 Character Attributes.

Note
The non-bool elements in the struct must be "unsigned", otherwise they'll be considered signed. For example, NTV2_CC608_Black (= 7) will be read as "-1" in the following case: int x = attr.bgColor. If it's "unsigned", the value will correctly read out as "7".

Definition at line 357 of file ntv2caption608types.h.

Constructor & Destructor Documentation

◆ NTV2Line21Attributes() [1/3]

NTV2Line21Attributes::NTV2Line21Attributes ( )
explicit

Constructs a default NTV2Line21Attributes instance, i.e., no flashing, no italics, no underline, white on black with an opaque background.

◆ NTV2Line21Attributes() [2/3]

NTV2Line21Attributes::NTV2Line21Attributes ( const NTV2Line21Color  inFGColor,
const NTV2Line21Color  inBGColor = NTV2_CC608_Black,
const NTV2Line21Opacity  inOpacity = NTV2_CC608_Opaque,
const bool  inItalics = false,
const bool  inUnderline = false,
const bool  inFlash = false 
)
explicit

Constructs a NTV2Line21Attributes instance with the given settings.

Parameters
[in]inFGColorSpecifies the foreground color (required).
[in]inBGColorOptionally specifies the background color. Defaults to black.
[in]inOpacityOptionally specifies the background opacity. Defaults to opaque.
[in]inItalicsOptionally specifies the italics setting. Defaults to normal (no italics).
[in]inUnderlineOptionally specifies the underline setting. Defaults to normal (no underline).
[in]inFlashOptionally specifies the flash setting. Defaults to normal (no flashing).

◆ NTV2Line21Attributes() [3/3]

NTV2Line21Attributes::NTV2Line21Attributes ( const NTV2Line21Attributes inRHS)
inline

Definition at line 381 of file ntv2caption608types.h.

Member Function Documentation

◆ AddFlash()

NTV2Line21Attributes& NTV2Line21Attributes::AddFlash ( void  )
inline

Enables my flashing attribute setting.

Returns
A non-constant reference to me.

Definition at line 478 of file ntv2caption608types.h.

◆ AddItalics()

NTV2Line21Attributes& NTV2Line21Attributes::AddItalics ( void  )
inline

Enables italics.

Returns
A non-constant reference to me.

Definition at line 438 of file ntv2caption608types.h.

◆ AddUnderline()

NTV2Line21Attributes& NTV2Line21Attributes::AddUnderline ( void  )
inline

Enables my underline attribute setting.

Returns
A non-constant reference to me.

Definition at line 458 of file ntv2caption608types.h.

◆ Clear()

void NTV2Line21Attributes::Clear ( void  )
inline

Clears all of my attributes, returning me to a default state, i.e., no flashing, no italics, no underline, white on black with an opaque background.

Definition at line 520 of file ntv2caption608types.h.

◆ GetBGColor()

NTV2Line21Color NTV2Line21Attributes::GetBGColor ( void  ) const
inline

Returns my background color.

Definition at line 412 of file ntv2caption608types.h.

◆ GetColor()

NTV2Line21Color NTV2Line21Attributes::GetColor ( void  ) const
inline

Returns my foreground color.

Definition at line 407 of file ntv2caption608types.h.

◆ GetHashKey()

uint16_t NTV2Line21Attributes::GetHashKey ( void  ) const

Returns my magnitude used to implement operator < for sorting or using a Line21 attribute as an index key.

◆ GetHexString()

std::string NTV2Line21Attributes::GetHexString ( void  ) const

For dumping the attributes backbuffer.

◆ GetOpacity()

NTV2Line21Opacity NTV2Line21Attributes::GetOpacity ( void  ) const
inline

Returns my background opacity.

Definition at line 417 of file ntv2caption608types.h.

◆ IsFlashing()

bool NTV2Line21Attributes::IsFlashing ( void  ) const
inline

Returns true if I'm flashing; otherwise returns false.

Definition at line 432 of file ntv2caption608types.h.

◆ IsItalicized()

bool NTV2Line21Attributes::IsItalicized ( void  ) const
inline

Returns true if I'm italicized; otherwise returns false.

Definition at line 422 of file ntv2caption608types.h.

◆ IsSet()

bool NTV2Line21Attributes::IsSet ( void  ) const
inline

Returns true if I'm any different from the default, i.e., if IsFlashing(), IsItalicized(), IsUnderlined() return true, or if my foreground color is anything but white, or if my background color is anything but black, or if my opacity is anything but opaque.

Definition at line 399 of file ntv2caption608types.h.

◆ IsUnderlined()

bool NTV2Line21Attributes::IsUnderlined ( void  ) const
inline

Returns true if I'm underlined; otherwise returns false.

Definition at line 427 of file ntv2caption608types.h.

◆ operator!=()

bool NTV2Line21Attributes::operator!= ( const NTV2Line21Attributes inRHS) const
inline

Compares my attributes with those of another, and returns false if any of them mismatch.

Parameters
[in]inRHSSpecifies the other NTV2Line21Attributes instance to compare.
Returns
True if any attribute doesn't match.

Definition at line 544 of file ntv2caption608types.h.

◆ operator<()

bool NTV2Line21Attributes::operator< ( const NTV2Line21Attributes inRHS) const
inline

Compares my attributes with those of another, and returns true if my magnitude is less than the right-hand operand's.

Parameters
[in]inRHSSpecifies the other NTV2Line21Attributes instance to compare.
Returns
True if my magnitude is less than those of the right-hand operand; otherwise false.

Definition at line 530 of file ntv2caption608types.h.

◆ operator=()

NTV2Line21Attributes& NTV2Line21Attributes::operator= ( const NTV2Line21Attributes inRHS)
inline

Definition at line 387 of file ntv2caption608types.h.

◆ operator==()

bool NTV2Line21Attributes::operator== ( const NTV2Line21Attributes inRHS) const
inline

Compares my attributes with those of another, and returns true if they're identical.

Parameters
[in]inRHSSpecifies the other NTV2Line21Attributes instance to compare.
Returns
True if all attributes match.

Definition at line 537 of file ntv2caption608types.h.

◆ RemoveFlash()

NTV2Line21Attributes& NTV2Line21Attributes::RemoveFlash ( void  )
inline

Disables my flashing attribute setting.

Returns
A non-constant reference to me.

Definition at line 484 of file ntv2caption608types.h.

◆ RemoveItalics()

NTV2Line21Attributes& NTV2Line21Attributes::RemoveItalics ( void  )
inline

Removes italics.

Returns
A non-constant reference to me.

Definition at line 444 of file ntv2caption608types.h.

◆ RemoveUnderline()

NTV2Line21Attributes& NTV2Line21Attributes::RemoveUnderline ( void  )
inline

Disables my underline attribute setting.

Returns
A non-constant reference to me.

Definition at line 464 of file ntv2caption608types.h.

◆ SetBGColor()

NTV2Line21Attributes& NTV2Line21Attributes::SetBGColor ( const NTV2Line21Color  inBGColor)
inline

Sets my background color attribute.

Parameters
[in]inBGColorSpecifies my new background color attribute.
Returns
A non-constant reference to me.

Definition at line 506 of file ntv2caption608types.h.

◆ SetColor()

NTV2Line21Attributes& NTV2Line21Attributes::SetColor ( const NTV2Line21Color  inFGColor)
inline

Sets my foreground color attribute.

Parameters
[in]inFGColorSpecifies my new foreground color attribute.
Returns
A non-constant reference to me.

Definition at line 499 of file ntv2caption608types.h.

◆ SetFlash()

NTV2Line21Attributes& NTV2Line21Attributes::SetFlash ( const bool  inFlash)
inline

Sets my flashing attribute setting.

Parameters
[in]inFlashSpecifies my new flashing attribute setting.
Returns
A non-constant reference to me.

Definition at line 491 of file ntv2caption608types.h.

◆ SetItalics()

NTV2Line21Attributes& NTV2Line21Attributes::SetItalics ( const bool  inItalics)
inline

Sets my italics setting.

Parameters
[in]inItalicsSpecifies my new italics setting.
Returns
A non-constant reference to me.

Definition at line 451 of file ntv2caption608types.h.

◆ SetOpacity()

NTV2Line21Attributes& NTV2Line21Attributes::SetOpacity ( const NTV2Line21Opacity  inOpacity)
inline

Sets my background opacity attribute.

Parameters
[in]inOpacitySpecifies my new background opacity attribute.
Returns
A non-constant reference to me.

Definition at line 513 of file ntv2caption608types.h.

◆ SetUnderline()

NTV2Line21Attributes& NTV2Line21Attributes::SetUnderline ( const bool  inUnderline)
inline

Sets my underline attribute setting.

Parameters
[in]inUnderlineSpecifies my new underline setting.
Returns
A non-constant reference to me.

Definition at line 471 of file ntv2caption608types.h.


The documentation for this struct was generated from the following file: