TK_Text_Font
-
class
TK_Text_Font Handles the TKE_Text_Font opcode.
TK_Text_Fontprovides 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.
Inherits from:
BBaseOpcodeHandlerIndex
Methods
Clone()GetExtraSpace()GetExtraSpaceUnits()GetGreekingLimit()GetGreekingLimitUnits()GetGreekingMode()GetLayout()GetLineSpacing()GetMask()GetNames()GetNames()GetPreference()GetPreferenceCutoff()GetPreferenceCutoffUnits()GetPreferences()GetRenderer()GetRendererCutoff()GetRendererCutoffUnits()GetRenderers()GetRotation()GetShape()GetShape()GetSize()GetSizeUnits()GetSlant()GetStyle()GetStyle()GetTolerance()GetToleranceUnits()GetTransforms()GetValue()GetWidthScale()Read()ReadAscii()Reset()set_names()set_names()SetExtraSpace()SetExtraSpaceUnits()SetGreekingLimit()SetGreekingLimitUnits()SetGreekingMode()SetLayout()SetLineSpacing()SetMask()SetNames()SetNames()SetPreference()SetPreferenceCutoff()SetPreferenceCutoffUnits()SetPreferences()SetRenderer()SetRendererCutoff()SetRendererCutoffUnits()SetRenderers()SetRotation()SetShape()SetShape()SetSize()SetSizeUnits()SetSlant()SetStyle()SetStyle()SetTolerance()SetToleranceUnits()SetTransforms()SetValue()SetWidthScale()TK_Text_Font()Write()WriteAscii()~TK_Text_Font()
Variables
m_extra_spacem_greeking_limitm_greeking_modem_greeking_unitsm_layoutm_line_spacingm_margin_countm_margin_unitsm_marginsm_maskm_namesm_names_lengthm_preference_cutoffm_preference_cutoff_unitsm_preferencesm_renderer_cutoffm_renderer_cutoff_unitsm_renderersm_rotationm_shapem_shape_lengthm_sizem_size_unitsm_slantm_space_unitsm_stylem_style_lengthm_tolerancem_tolerance_unitsm_transformsm_valuem_width_scale
Methods
-
void
TK_Text_Font::set_names(int length) protected
for internal use only
-
void
TK_Text_Font::set_names(char const *names) protected
for internal use only
-
TK_Text_Font::TK_Text_Font() constructor
-
TK_Text_Font::~TK_Text_Font()
-
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 theBStreamFileToolkitobject.Returns
The result of the function call.
-
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 theBStreamFileToolkitobject.Returns
The result of the function call.
-
TK_Status
TK_Text_Font::Clone(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const const virtual
Copies the opcode handler
Parameters
tk: A reference to the
BStreamFileToolkitobject.handler: A pointer to the opcode handler object. Passed by reference.
Returns
The result of the function call.
-
TK_Status
TK_Text_Font::ReadAscii(BStreamFileToolkit &tk) Deprecated.
-
TK_Status
TK_Text_Font::WriteAscii(BStreamFileToolkit &tk) Deprecated.
-
void
TK_Text_Font::Reset() 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.
-
void
TK_Text_Font::SetMask(int m) Sets the mask indicating which font options are specified. Options are defined in
TKO_Font_Options.
-
int
TK_Text_Font::GetMask() const const
Returns the mask indicating which font options are specified. Options are defined in
TKO_Font_Options.
-
void
TK_Text_Font::SetValue(int v) Sets the mask indicating which font options are on/active. Options are defined in
TKO_Font_Options.
-
int
TK_Text_Font::GetValue() const const
Returns the mask indicating which font options are on/active. Options are defined in
TKO_Font_Options.
-
void
TK_Text_Font::SetNames(char const *names) Sets the font names. Allocates the buffer and copies the names string
-
void
TK_Text_Font::SetNames(int length) Sets the font names buffer. Allocates a buffer large enough to hold a string of ‘length’ characters
-
char const *
TK_Text_Font::GetNames() const const
Returns the font names string
-
char *
TK_Text_Font::GetNames() Returns the font names string buffer, which may be modified directly
-
void
TK_Text_Font::SetShape(char const *shape) Sets the font background shape. Allocates the buffer and copies the shape string
-
void
TK_Text_Font::SetShape(int length) Sets the font background shape buffer. Allocates a buffer large enough to hold a string of ‘length’ characters
-
char const *
TK_Text_Font::GetShape() const const
Returns the font background shape string
-
char *
TK_Text_Font::GetShape() Returns the font background shape string buffer, which may be modified directly
-
void
TK_Text_Font::SetStyle(char const *shape) Sets the font background/leader style. Allocates the buffer and copies the shape string
-
void
TK_Text_Font::SetStyle(int length) Sets the font background/leader style buffer. Allocates a buffer large enough to hold a string of ‘length’ characters
-
char const *
TK_Text_Font::GetStyle() const const
Returns the font background/leader style string
-
char *
TK_Text_Font::GetStyle() Returns the font background/leader style string buffer, which may be modified directly
-
void
TK_Text_Font::SetSize(float s) Sets the text size
-
float
TK_Text_Font::GetSize() const const
Returns the text size
-
void
TK_Text_Font::SetSizeUnits(int u) Sets the units used to interpret the size. Units are defined in #TKO_Font_Size_Units.
-
int
TK_Text_Font::GetSizeUnits() const const
Returns the units used to interpret the size. Units are defined in #TKO_Font_Size_Units.
-
void
TK_Text_Font::SetTolerance(float t) Sets the text size tolerance
-
float
TK_Text_Font::GetTolerance() const const
Returns the text size tolerance
-
void
TK_Text_Font::SetToleranceUnits(int u) Sets the units used to interpret the size tolerance. Units are defined in #TKO_Font_Size_Units.
-
int
TK_Text_Font::GetToleranceUnits() const const
Returns the units used to interpret the size tolerance. Units are defined in #TKO_Font_Size_Units.
-
void
TK_Text_Font::SetRotation(float r) Sets the rotation angle of characters
-
float
TK_Text_Font::GetRotation() const const
Returns the rotation angle of characters
-
void
TK_Text_Font::SetSlant(float s) Sets the slant factor applied to characters
-
float
TK_Text_Font::GetSlant() const const
Returns the slant factor applied to characters
-
void
TK_Text_Font::SetWidthScale(float s) Sets the horizontal scaling applied to characters
-
float
TK_Text_Font::GetWidthScale() const const
Returns the horizontal scaling applied to characters
-
void
TK_Text_Font::SetExtraSpace(float s) Sets the amount of extra space inserted between characters
-
float
TK_Text_Font::GetExtraSpace() const const
Returns the amount of extra space inserted between characters
-
void
TK_Text_Font::SetExtraSpaceUnits(int u) Sets the units used to interpret the extra space. Units are defined in #TKO_Font_Size_Units.
-
int
TK_Text_Font::GetExtraSpaceUnits() const const
Returns the units used to interpret the extra space. Units are defined in #TKO_Font_Size_Units.
-
void
TK_Text_Font::SetLineSpacing(float s) Sets the spacing between lines of multi-line strings
-
float
TK_Text_Font::GetLineSpacing() const const
Returns the spacing between lines of multi-line strings
-
void
TK_Text_Font::SetTransforms(int t) Sets how the string is affected by any modeling transforms. Transforms are defined in
TKO_Font_Transforms.
-
int
TK_Text_Font::GetTransforms() const const
Returns how the string is affected by any modeling transforms. Transforms are defined in
TKO_Font_Transforms.
-
void
TK_Text_Font::SetGreekingLimit(float s) Sets the limit below which text drawing will be “greeked” (not drawn or drawn as simple geometry)
-
float
TK_Text_Font::GetGreekingLimit() const const
Returns the greeking limit
-
void
TK_Text_Font::SetGreekingLimitUnits(int u) Sets the units used to interpret the greeking limit. Units are defined in #TKO_Font_Size_Units.
-
int
TK_Text_Font::GetGreekingLimitUnits() const const
Returns the units used to interpret the greeking limit. Units are defined in #TKO_Font_Size_Units.
-
void
TK_Text_Font::SetGreekingMode(int m) Sets the method used for handling greeked text.
-
int
TK_Text_Font::GetGreekingMode() const const
Returns the method used for handling greeked text.
-
void
TK_Text_Font::SetRenderer(int r) Sets which types of fonts may be used. Renderers are defined in
TKO_Font_Renderers.
-
int
TK_Text_Font::GetRenderer() const const
Returns which types of fonts may be used. Renderers are defined in
TKO_Font_Renderers.
-
void
TK_Text_Font::SetRenderers(int r1, int r2) Sets which types of fonts may be used. Renderers are defined in
TKO_Font_Renderers.
-
int const *
TK_Text_Font::GetRenderers() const const
Returns which types of fonts may be used. Renderers are defined in
TKO_Font_Renderers.
-
void
TK_Text_Font::SetRendererCutoff(float s) Sets the limit below which text drawing will use the “lower” renderer
-
float
TK_Text_Font::GetRendererCutoff() const const
Returns the renderer cutoff limit
-
void
TK_Text_Font::SetRendererCutoffUnits(int u) Sets the units used to interpret the renderer cutoff. Units are defined in #TKO_Font_Size_Units.
-
int
TK_Text_Font::GetRendererCutoffUnits() const const
Returns the units used to interpret the renderer cutoff. Units are defined in #TKO_Font_Size_Units.
-
void
TK_Text_Font::SetPreference(int r) Sets which drawing modes may be used. Preferences are defined in
TKO_Font_Preferences.
-
int
TK_Text_Font::GetPreference() const const
Returns which types of fonts may be used. Preferences are defined in
TKO_Font_Preferences.
-
void
TK_Text_Font::SetPreferences(int r1, int r2) Sets which drawing modes may be used. Preferences are defined in
TKO_Font_Preferences.
-
int const *
TK_Text_Font::GetPreferences() const const
Returns which types of fonts may be used. Preferences are defined in
TKO_Font_Preferences.
-
void
TK_Text_Font::SetPreferenceCutoff(float s) Sets the limit below which text drawing will use the “lower” preference
-
float
TK_Text_Font::GetPreferenceCutoff() const const
Returns the preference cutoff limit
-
void
TK_Text_Font::SetPreferenceCutoffUnits(int u) Sets the units used to interpret the preference cutoff. Units are defined in #TKO_Font_Size_Units.
-
int
TK_Text_Font::GetPreferenceCutoffUnits() const const
Returns the units used to interpret the preference cutoff. Units are defined in #TKO_Font_Size_Units.
-
void
TK_Text_Font::SetLayout(int l) Sets the layout. Layouts are defined in
TKO_Font_Layout.
-
int
TK_Text_Font::GetLayout() const const
Returns the layout. Layouts are defined in
TKO_Font_Layout.
Variables
-
int
TK_Text_Font::m_mask protected
intspecifies which rendering options are active (and hence, which are valid). For internal use only.
-
int
TK_Text_Font::m_value protected
intspecifies what values to set for boolean options. For internal use only.
-
int
TK_Text_Font::m_names_length protected
intfor internal use only
-
char *
TK_Text_Font::m_names protected
charfor internal use only
-
float
TK_Text_Font::m_size protected
floatfor internal use only
-
float
TK_Text_Font::m_tolerance protected
floatfor internal use only
-
float
TK_Text_Font::m_rotation protected
floatfor internal use only
-
float
TK_Text_Font::m_slant protected
floatfor internal use only
-
float
TK_Text_Font::m_width_scale protected
floatfor internal use only
-
float
TK_Text_Font::m_extra_space protected
floatfor internal use only
-
float
TK_Text_Font::m_line_spacing protected
floatfor internal use only
-
float
TK_Text_Font::m_greeking_limit protected
floatfor internal use only
-
float
TK_Text_Font::m_renderer_cutoff protected
floatfor internal use only
-
float
TK_Text_Font::m_preference_cutoff protected
floatfor internal use only
-
int
TK_Text_Font::m_renderers[2] protected
intfor internal use only
-
int
TK_Text_Font::m_preferences[2] protected
intfor internal use only
-
int
TK_Text_Font::m_shape_length protected
intfor internal use only
-
int
TK_Text_Font::m_style_length protected
intfor internal use only
-
char *
TK_Text_Font::m_shape protected
charfor internal use only
-
char *
TK_Text_Font::m_style protected
charfor internal use only
-
int
TK_Text_Font::m_margin_count protected
intfor internal use only
-
float
TK_Text_Font::m_margins[4] protected
floatfor internal use only
-
unsigned char
TK_Text_Font::m_margin_units[4] protected
unsigned charfor internal use only
-
unsigned char
TK_Text_Font::m_size_units protected
unsigned charfor internal use only
-
unsigned char
TK_Text_Font::m_tolerance_units protected
unsigned charfor internal use only
-
unsigned char
TK_Text_Font::m_space_units protected
unsigned charfor internal use only
-
unsigned char
TK_Text_Font::m_greeking_units protected
unsigned charfor internal use only
-
unsigned char
TK_Text_Font::m_greeking_mode protected
unsigned charfor internal use only
-
unsigned char
TK_Text_Font::m_transforms protected
unsigned charfor internal use only
-
unsigned char
TK_Text_Font::m_renderer_cutoff_units protected
unsigned charfor internal use only
-
unsigned char
TK_Text_Font::m_preference_cutoff_units protected
unsigned charfor internal use only
-
unsigned char
TK_Text_Font::m_layout protected
unsigned charfor internal use only