Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

TK_Text_Font Class Reference

#include <BOpcodeHandler.h>

Inheritance diagram for TK_Text_Font:

Inheritance graph
[legend]
Collaboration diagram for TK_Text_Font:

Collaboration graph
[legend]
List of all members.

Detailed Description

Handles the TKE_Text_Font opcode.

TK_Text_Font provides support for writing/reading the TKE_Text_Font opcode object to/from an HSF file.

The HOOPS/3dGS scene-graph supports various text attributes. Text_Font contains information about the font, including name, size, size units, spacing, spacing units, tolerance, tolerance units, slant, transforms, rotation and width scaling.

Definition at line 3307 of file BOpcodeHandler.h.

Public Member Functions

 TK_Text_Font ()
TK_Status Read (BStreamFileToolkit &tk) alter
TK_Status Write (BStreamFileToolkit &tk) alter
void Reset (void) alter
void SetMask (int m) alter
int GetMask (void) const
void SetValue (int v) alter
int GetValue (void) const
void SetNames (char const *names) alter
void SetNames (int length) alter
char const * GetNames (void) const
char alter * GetNames (void) alter
void SetSize (float s) alter
float GetSize (void) const
void SetSizeUnits (int u) alter
int GetSizeUnits (void) const
void SetTolerance (float t) alter
float GetTolerance (void) const
void SetToleranceUnits (int u) alter
int GetToleranceUnits (void) const
void SetRotation (float r) alter
float GetRotation (void) const
void SetSlant (float s) alter
float GetSlant (void) const
void SetWidthScale (float s) alter
float GetWidthScale (void) const
void SetExtraSpace (float s) alter
float GetExtraSpace (void) const
void SetExtraSpaceUnits (int u) alter
int GetExtraSpaceUnits (void) const
void SetLineSpacing (float s) alter
float GetLineSpacing (void) const
void SetTransforms (int t) alter
int GetTransforms (void) const

Protected Member Functions

void set_names (int length) alter
 for internal use only
void set_names (char const *names) alter
 for internal use only

Protected Attributes

int m_mask
 specifies which rendering options are active (and hence, which are valid). For internal use only.
int m_value
 specifies what values to set for boolean options. For internal use only.
int m_names_length
 for internal use only
char * m_names
 for internal use only
float m_size
 for internal use only
float m_tolerance
 for internal use only
float m_rotation
 for internal use only
float m_slant
 for internal use only
float m_width_scale
 for internal use only
float m_extra_space
 for internal use only
float m_line_spacing
 for internal use only
unsigned char m_size_units
 for internal use only
unsigned char m_tolerance_units
 for internal use only
unsigned char m_space_units
 for internal use only
unsigned char m_transforms
 for internal use only


Constructor & Destructor Documentation

TK_Text_Font::TK_Text_Font  )  [inline]
 

constructor

Definition at line 3334 of file BOpcodeHandler.h.


Member Function Documentation

float TK_Text_Font::GetExtraSpace void   )  const [inline]
 

Returns the amount of extra space inserted between characters

Definition at line 3399 of file BOpcodeHandler.h.

int TK_Text_Font::GetExtraSpaceUnits void   )  const [inline]
 

Returns the units used to interpret the extra space. Units are defined in TKO_Font_Size_Units.

Definition at line 3404 of file BOpcodeHandler.h.

float TK_Text_Font::GetLineSpacing void   )  const [inline]
 

Returns the spacing between lines of multi-line strings

Definition at line 3409 of file BOpcodeHandler.h.

int TK_Text_Font::GetMask void   )  const [inline]
 

Returns the mask indicating which font options are specified. Options are defined in TKO_Font_Options.

Definition at line 3345 of file BOpcodeHandler.h.

char alter* TK_Text_Font::GetNames void   )  [inline]
 

Returns the font names string buffer, which may be modified directly

Definition at line 3359 of file BOpcodeHandler.h.

char const* TK_Text_Font::GetNames void   )  const [inline]
 

Returns the font names string

Definition at line 3357 of file BOpcodeHandler.h.

float TK_Text_Font::GetRotation void   )  const [inline]
 

Returns the rotation angle of characters

Definition at line 3384 of file BOpcodeHandler.h.

float TK_Text_Font::GetSize void   )  const [inline]
 

Returns the text size

Definition at line 3364 of file BOpcodeHandler.h.

int TK_Text_Font::GetSizeUnits void   )  const [inline]
 

Returns the units used to interpret the size. Units are defined in TKO_Font_Size_Units.

Definition at line 3369 of file BOpcodeHandler.h.

float TK_Text_Font::GetSlant void   )  const [inline]
 

Returns the slant factor applied to characters

Definition at line 3389 of file BOpcodeHandler.h.

float TK_Text_Font::GetTolerance void   )  const [inline]
 

Returns the text size tolerance

Definition at line 3374 of file BOpcodeHandler.h.

int TK_Text_Font::GetToleranceUnits void   )  const [inline]
 

Returns the units used to interpret the size tolerance. Units are defined in TKO_Font_Size_Units.

Definition at line 3379 of file BOpcodeHandler.h.

int TK_Text_Font::GetTransforms void   )  const [inline]
 

Returns how the string is affected by any modelling transforms. Transforms are defined in TKO_Font_Transforms.

Definition at line 3414 of file BOpcodeHandler.h.

int TK_Text_Font::GetValue void   )  const [inline]
 

Returns the mask indicating which font options are on/active. Options are defined in TKO_Font_Options.

Definition at line 3350 of file BOpcodeHandler.h.

float TK_Text_Font::GetWidthScale void   )  const [inline]
 

Returns the horizontal scaling applied to characters

Definition at line 3394 of file BOpcodeHandler.h.

TK_Status TK_Text_Font::Read BStreamFileToolkit tk  )  [virtual]
 

Reads data from the toolkit buffer, decodes/decompresses it, and maps it to the opcode handlers data members. User-defined classes which need to write out custom data should utilize one of the available GetData() methods.

Parameters:
tk A reference to the BStreamFileToolkit object.
Returns:
The result of the function call.

Implements BBaseOpcodeHandler.

void TK_Text_Font::Reset void   )  [virtual]
 

Resets the current opcode handler. This is called by the toolkit when it is done processing an opcode. This method reinitializes any opcode handler variables and frees up temporary data.

Reimplemented from BBaseOpcodeHandler.

void TK_Text_Font::SetExtraSpace float  s  )  [inline]
 

Sets the amount of extra space inserted between characters

Definition at line 3397 of file BOpcodeHandler.h.

void TK_Text_Font::SetExtraSpaceUnits int  u  )  [inline]
 

Sets the units used to interpret the extra space. Units are defined in TKO_Font_Size_Units.

Definition at line 3402 of file BOpcodeHandler.h.

void TK_Text_Font::SetLineSpacing float  s  )  [inline]
 

Sets the spacing between lines of multi-line strings

Definition at line 3407 of file BOpcodeHandler.h.

void TK_Text_Font::SetMask int  m  )  [inline]
 

Sets the mask indicating which font options are specified. Options are defined in TKO_Font_Options.

Definition at line 3343 of file BOpcodeHandler.h.

void TK_Text_Font::SetNames int  length  )  [inline]
 

Sets the font names buffer. Allocates a buffer large enough to hold a string of 'length' characters

Definition at line 3355 of file BOpcodeHandler.h.

void TK_Text_Font::SetNames char const *  names  )  [inline]
 

Sets the font names. Allocates the buffer and copies the names string

Definition at line 3353 of file BOpcodeHandler.h.

void TK_Text_Font::SetRotation float  r  )  [inline]
 

Sets the rotation angle of characters

Definition at line 3382 of file BOpcodeHandler.h.

void TK_Text_Font::SetSize float  s  )  [inline]
 

Sets the text size

Definition at line 3362 of file BOpcodeHandler.h.

void TK_Text_Font::SetSizeUnits int  u  )  [inline]
 

Sets the units used to interpret the size. Units are defined in TKO_Font_Size_Units.

Definition at line 3367 of file BOpcodeHandler.h.

void TK_Text_Font::SetSlant float  s  )  [inline]
 

Sets the slant factor applied to characters

Definition at line 3387 of file BOpcodeHandler.h.

void TK_Text_Font::SetTolerance float  t  )  [inline]
 

Sets the text size tolerance

Definition at line 3372 of file BOpcodeHandler.h.

void TK_Text_Font::SetToleranceUnits int  u  )  [inline]
 

Sets the units used to interpret the size tolerance. Units are defined in TKO_Font_Size_Units.

Definition at line 3377 of file BOpcodeHandler.h.

void TK_Text_Font::SetTransforms int  t  )  [inline]
 

Sets how the string is affected by any modelling transforms. Transforms are defined in TKO_Font_Transforms.

Definition at line 3412 of file BOpcodeHandler.h.

void TK_Text_Font::SetValue int  v  )  [inline]
 

Sets the mask indicating which font options are on/active. Options are defined in TKO_Font_Options.

Definition at line 3348 of file BOpcodeHandler.h.

void TK_Text_Font::SetWidthScale float  s  )  [inline]
 

Sets the horizontal scaling applied to characters

Definition at line 3392 of file BOpcodeHandler.h.

TK_Status TK_Text_Font::Write BStreamFileToolkit tk  )  [virtual]
 

Encodes/compresses data and writes data to the toolkit buffer. User-defined classes which need to write out custom data should utilize one of the available PutData() methods, and first write out the opcode associated with the group of binary data followed by the data itself.

Parameters:
tk A reference to the BStreamFileToolkit object.
Returns:
The result of the function call.

Implements BBaseOpcodeHandler.


The documentation for this class was generated from the following file:
Generated on Tue May 17 12:06:15 2005 for Autodesk DWF 3D Toolkit by  doxygen 1.4.1