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 5209 of file BOpcodeHandler.h.

Public Member Functions

 TK_Text_Font ()
TK_Status Read (BStreamFileToolkit &tk) alter
TK_Status Write (BStreamFileToolkit &tk) alter
TK_Status Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const
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
void SetGreekingLimit (float s) alter
float GetGreekingLimit (void) const
void SetGreekingLimitUnits (int u) alter
int GetGreekingLimitUnits (void) const
void SetGreekingMode (int m) alter
int GetGreekingMode (void) const
void SetRenderer (int r) alter
int GetRenderer (void) const
void SetRenderers (int r1, int r2) alter
int const * GetRenderers (void) const
void SetRendererCutoff (float s) alter
float GetRendererCutoff (void) const
void SetRendererCutoffUnits (int u) alter
int GetRendererCutoffUnits (void) const
void SetPreference (int r) alter
int GetPreference (void) const
void SetPreferences (int r1, int r2) alter
int const * GetPreferences (void) const
void SetPreferenceCutoff (float s) alter
float GetPreferenceCutoff (void) const
void SetPreferenceCutoffUnits (int u) alter
int GetPreferenceCutoffUnits (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
float m_greeking_limit
 for internal use only
float m_renderer_cutoff
 for internal use only
float m_preference_cutoff
 for internal use only
int m_renderers [2]
 for internal use only
int m_preferences [2]
 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_greeking_units
 for internal use only
unsigned char m_greeking_mode
 for internal use only
unsigned char m_transforms
 for internal use only
unsigned char m_renderer_cutoff_units
 for internal use only
unsigned char m_preference_cutoff_units
 for internal use only


Constructor & Destructor Documentation

TK_Text_Font::TK_Text_Font  )  [inline]
 

constructor

Definition at line 5245 of file BOpcodeHandler.h.


Member Function Documentation

TK_Status TK_Text_Font::Clone BStreamFileToolkit tk,
BBaseOpcodeHandler **  handler
const [virtual]
 

Copies the opcode handler

Parameters:
tk A reference to the BStreamFileToolkit object.
handler A pointer to the opcode handler object. Passed by reference.
Returns:
The result of the function call.

Reimplemented from BBaseOpcodeHandler.

float TK_Text_Font::GetExtraSpace void   )  const [inline]
 

Returns the amount of extra space inserted between characters

Definition at line 5321 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 5326 of file BOpcodeHandler.h.

float TK_Text_Font::GetGreekingLimit void   )  const [inline]
 

Returns the greeking limit

Definition at line 5341 of file BOpcodeHandler.h.

int TK_Text_Font::GetGreekingLimitUnits void   )  const [inline]
 

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

Definition at line 5346 of file BOpcodeHandler.h.

int TK_Text_Font::GetGreekingMode void   )  const [inline]
 

Returns the method used for handling greeked text.

Definition at line 5351 of file BOpcodeHandler.h.

float TK_Text_Font::GetLineSpacing void   )  const [inline]
 

Returns the spacing between lines of multi-line strings

Definition at line 5331 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 5267 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 5281 of file BOpcodeHandler.h.

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

Returns the font names string

Definition at line 5279 of file BOpcodeHandler.h.

int TK_Text_Font::GetPreference void   )  const [inline]
 

Returns which types of fonts may be used. Preferences are defined in TKO_Font_Preferences.

Definition at line 5378 of file BOpcodeHandler.h.

float TK_Text_Font::GetPreferenceCutoff void   )  const [inline]
 

Returns the preference cutoff limit

Definition at line 5388 of file BOpcodeHandler.h.

int TK_Text_Font::GetPreferenceCutoffUnits void   )  const [inline]
 

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

Definition at line 5393 of file BOpcodeHandler.h.

int const* TK_Text_Font::GetPreferences void   )  const [inline]
 

Returns which types of fonts may be used. Preferences are defined in TKO_Font_Preferences.

Definition at line 5383 of file BOpcodeHandler.h.

int TK_Text_Font::GetRenderer void   )  const [inline]
 

Returns which types of fonts may be used. Renderers are defined in TKO_Font_Renderers.

Definition at line 5357 of file BOpcodeHandler.h.

float TK_Text_Font::GetRendererCutoff void   )  const [inline]
 

Returns the renderer cutoff limit

Definition at line 5367 of file BOpcodeHandler.h.

int TK_Text_Font::GetRendererCutoffUnits void   )  const [inline]
 

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

Definition at line 5372 of file BOpcodeHandler.h.

int const* TK_Text_Font::GetRenderers void   )  const [inline]
 

Returns which types of fonts may be used. Renderers are defined in TKO_Font_Renderers.

Definition at line 5362 of file BOpcodeHandler.h.

float TK_Text_Font::GetRotation void   )  const [inline]
 

Returns the rotation angle of characters

Definition at line 5306 of file BOpcodeHandler.h.

float TK_Text_Font::GetSize void   )  const [inline]
 

Returns the text size

Definition at line 5286 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 5291 of file BOpcodeHandler.h.

float TK_Text_Font::GetSlant void   )  const [inline]
 

Returns the slant factor applied to characters

Definition at line 5311 of file BOpcodeHandler.h.

float TK_Text_Font::GetTolerance void   )  const [inline]
 

Returns the text size tolerance

Definition at line 5296 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 5301 of file BOpcodeHandler.h.

int TK_Text_Font::GetTransforms void   )  const [inline]
 

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

Definition at line 5336 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 5272 of file BOpcodeHandler.h.

float TK_Text_Font::GetWidthScale void   )  const [inline]
 

Returns the horizontal scaling applied to characters

Definition at line 5316 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 5319 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 5324 of file BOpcodeHandler.h.

void TK_Text_Font::SetGreekingLimit float  s  )  [inline]
 

Sets the limit below which text drawing will be "greeked" (not drawn or drawn as simple geometry)

Definition at line 5339 of file BOpcodeHandler.h.

void TK_Text_Font::SetGreekingLimitUnits int  u  )  [inline]
 

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

Definition at line 5344 of file BOpcodeHandler.h.

void TK_Text_Font::SetGreekingMode int  m  )  [inline]
 

Sets the method used for handling greeked text.

Definition at line 5349 of file BOpcodeHandler.h.

void TK_Text_Font::SetLineSpacing float  s  )  [inline]
 

Sets the spacing between lines of multi-line strings

Definition at line 5329 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 5259 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 5277 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 5275 of file BOpcodeHandler.h.

void TK_Text_Font::SetPreference int  r  )  [inline]
 

Sets which drawing modes may be used. Preferences are defined in TKO_Font_Preferences.

Definition at line 5376 of file BOpcodeHandler.h.

void TK_Text_Font::SetPreferenceCutoff float  s  )  [inline]
 

Sets the limit below which text drawing will use the "lower" preference

Definition at line 5386 of file BOpcodeHandler.h.

void TK_Text_Font::SetPreferenceCutoffUnits int  u  )  [inline]
 

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

Definition at line 5391 of file BOpcodeHandler.h.

void TK_Text_Font::SetPreferences int  r1,
int  r2
[inline]
 

Sets which drawing modes may be used. Preferences are defined in TKO_Font_Preferences.

Definition at line 5381 of file BOpcodeHandler.h.

void TK_Text_Font::SetRenderer int  r  )  [inline]
 

Sets which types of fonts may be used. Renderers are defined in TKO_Font_Renderers.

Definition at line 5355 of file BOpcodeHandler.h.

void TK_Text_Font::SetRendererCutoff float  s  )  [inline]
 

Sets the limit below which text drawing will use the "lower" renderer

Definition at line 5365 of file BOpcodeHandler.h.

void TK_Text_Font::SetRendererCutoffUnits int  u  )  [inline]
 

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

Definition at line 5370 of file BOpcodeHandler.h.

void TK_Text_Font::SetRenderers int  r1,
int  r2
[inline]
 

Sets which types of fonts may be used. Renderers are defined in TKO_Font_Renderers.

Definition at line 5360 of file BOpcodeHandler.h.

void TK_Text_Font::SetRotation float  r  )  [inline]
 

Sets the rotation angle of characters

Definition at line 5304 of file BOpcodeHandler.h.

void TK_Text_Font::SetSize float  s  )  [inline]
 

Sets the text size

Definition at line 5284 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 5289 of file BOpcodeHandler.h.

void TK_Text_Font::SetSlant float  s  )  [inline]
 

Sets the slant factor applied to characters

Definition at line 5309 of file BOpcodeHandler.h.

void TK_Text_Font::SetTolerance float  t  )  [inline]
 

Sets the text size tolerance

Definition at line 5294 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 5299 of file BOpcodeHandler.h.

void TK_Text_Font::SetTransforms int  t  )  [inline]
 

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

Definition at line 5334 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 5270 of file BOpcodeHandler.h.

void TK_Text_Font::SetWidthScale float  s  )  [inline]
 

Sets the horizontal scaling applied to characters

Definition at line 5314 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 Jan 6 22:41:47 2009 for Autodesk DWF 3D Toolkit by  doxygen 1.4.5