CSAD
 All Classes Namespaces Functions Variables Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | List of all members
csad::TextStyle Class Reference

TextStyle - component describing the parameters of the text. More...

Inheritance diagram for csad::TextStyle:
csad::Component csad::BaseObject

Public Types

enum  Anchor {
  Top = 0x010, Center = 0x000, Bottom = 0x020, Left = 0x100,
  Right = 0x001, Left_Top = 0x110, Left_Center = 0x100, Left_Bottom = 0x120,
  Right_Top = 0x011, Right_Center = 0x001, Right_Bottom = 0x021
}
 

Public Member Functions

_FORCEINLINE int getAnchor ()
 Returns the orientation of the text.
 
_FORCEINLINE float getCharSize ()
 Returns the scale of the image characters.
 
_FORCEINLINE FontgetFont ()
 
_FORCEINLINE float getKerning ()
 Returns the scale of the character spacing.
 
_FORCEINLINE MaterialgetMatrial ()
 Returns an object of material.
 
CSAD_API void * set (unsigned _int32, void *)
 used for any interface commands.
 
CSAD_API TextStylesetAnchor (char *name)
 Specifies the orientation of the text by name.
 
CSAD_API TextStylesetAnchor (int val)
 Specifies the orientation of the text.
 
CSAD_API TextStylesetCharSize (float val)
 Specifies the scale of the image characters.
 
CSAD_API TextStylesetFont (char *path)
 Sets the font for the server name and font.
 
_FORCEINLINE TextStylesetFont (const char *path)
 Sets the font for the server name and font.
 
CSAD_API TextStylesetFont (Font *font)
 Specifies the font object.
 
CSAD_API TextStylesetKerning (float val)
 Specifies the scale of the distance between characters.
 
CSAD_API TextStylesetMaterial (char *name)
 Specifies the material by name.
 
CSAD_API TextStylesetMaterial (Material *mat)
 Sets the object's material.
 
- Public Member Functions inherited from csad::Component
template<typename T >
_FORCEINLINE T * addComponent ()
 Add component of the specified type in the container if this component already exists, returns available.
 
template<typename T >
_FORCEINLINE T * getComponent ()
 Returns the component of the given type, if it is not in a container returns 0.
 
_FORCEINLINE ContainerComponentsgetContainer ()
 Returns the container in which the component.
 
template<typename T >
_FORCEINLINE T * getContainer ()
 Returns the container in which the component, if the container does not match the given type 0 is returned.
 
virtual CSAD_API void quit ()
 The event is called before the program exits.
 
virtual CSAD_API void start ()
 This event is fired after the program start.
 
virtual CSAD_API void update ()
 This event is fired before rendering environment container component.
 
- Public Member Functions inherited from csad::BaseObject
_FORCEINLINE bool isContainer ()
 returns true if the object is a container.
 
_FORCEINLINE ParametersListread (ParametersList *data)
 read attributes object.
 
_FORCEINLINE void * type ()
 the output pointer to the typeid() of the class.
 
_FORCEINLINE void write (ParametersList *data)
 record attributes of the object.
 

Additional Inherited Members

- Static Public Member Functions inherited from csad::Component
static CSAD_API int regClass (const char *name, const void *info, tfSTDCALL_p_FUNC_p fun)
 

Detailed Description

TextStyle - component describing the parameters of the text.

For description in the configuration:

  <Style name="the name of the style">
     <TextStyle font="server/font" material="textMaterial" charsize="0.0005" kerning="1.0" />
  </Style>
See Also
csad: scene

Member Enumeration Documentation

Enumerator
Top 

on top

Center 

on center

Bottom 

relative to the bottom

Left 

относительно лева

Right 

относительно права

Left_Top 

относительно левого верхнего угла

Left_Center 

относительно лева по центру

Left_Bottom 

относительно левого нижнего угла

Right_Top 

относительно правого верхнего угла

Right_Center 

относительно права по центру

Right_Bottom 

относительно правого нижнего угла

Member Function Documentation

_FORCEINLINE Font* csad::TextStyle::getFont ( )
inline

Returns a font object

Returns
Font.