TK_Font
-
class
TK_Font Handles the TKE_Font opcode.
TK_Fontprovides support for writing/reading the TKE_Font opcode object to/from an HSF file.The HOOPS/3dGS scene-graph supports user-defined fonts. Refer to the function ::HC_Define_Font in the HOOPS/3dGS Reference Manual
Inherits from:
BBaseOpcodeHandlerIndex
Methods
Clone()GetBytes()GetBytes()GetBytesCount()GetEncoding()GetLookup()GetLookup()GetName()GetName()GetType()Read()ReadAscii()Reset()set_bytes()set_lookup()set_lookup()set_name()set_name()SetBytes()SetEncoding()SetLookup()SetLookup()SetName()SetName()SetType()TK_Font()Write()WriteAscii()~TK_Font()
Variables
Methods
-
TK_Status
TK_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_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_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_Font::ReadAscii(BStreamFileToolkit &tk) Deprecated.
-
TK_Status
TK_Font::WriteAscii(BStreamFileToolkit &tk) Deprecated.
-
void
TK_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_Font::SetType(int t) Set the type of the font (HOOPS stroked font definition is the only one supported so far)
-
void
TK_Font::SetBytes(int size, char const *bytes = 0) Sets the font data. Allocates a buffer which can hold ‘size’ bytes, and if specified, copies the data from ‘bytes’ to the buffer
-
void
TK_Font::SetName(char const *string) Sets the name of the font. Allocates the buffer and copies the string
-
void
TK_Font::SetName(int length) Sets the name buffer. Allocates a buffer large enough to hold a string of ‘length’ characters
-
void
TK_Font::SetLookup(char const *string) Sets the name of the lookup function. Allocates the buffer and copies the string
-
void
TK_Font::SetLookup(int length) Sets the lookup name buffer. Allocates a buffer large enough to hold a string of ‘length’ characters
Variables