# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::UTextContext::CStringInfo Struct Reference

The render size of a string. More...

#include <u_text_context.h>

List of all members.

Public Methods

 CStringInfo ()
 CStringInfo (float w, float h, float l)
NLMISC::CVector getHotSpotVector (THotSpot hotspot)
 Get the string's origin. More...

void convertTo01Size (UDriver *drv)
 convert size in pixels to size in 0-1 relative coordinates, according to Driver current size. More...

void convertToPixelSize (UDriver *drv)
 convert back to pixels size, according to Driver current size. More...


Public Attributes

float StringWidth
 The width of the string, in pixels (eg: 30). More...

float StringHeight
 The height of the string, in pixels (eg: 10). More...

float StringLine
 StringLine is the size from bottom of the whole string image to the hotspot in pixels. More...


Detailed Description

The render size of a string.

Definition at line 74 of file u_text_context.h.


Constructor & Destructor Documentation

NL3D::UTextContext::CStringInfo::CStringInfo   [inline]
 

Definition at line 87 of file u_text_context.h.

References StringHeight, StringLine, and StringWidth.

NL3D::UTextContext::CStringInfo::CStringInfo float    w,
float    h,
float    l
[inline]
 

Definition at line 88 of file u_text_context.h.

References NLAISCRIPT::l, StringHeight, StringLine, StringWidth, and w.


Member Function Documentation

void NL3D::UTextContext::CStringInfo::convertTo01Size UDriver   drv
 

convert size in pixels to size in 0-1 relative coordinates, according to Driver current size.

Definition at line 81 of file text_context_user.cpp.

References StringHeight, StringLine, StringWidth, and w.

void NL3D::UTextContext::CStringInfo::convertToPixelSize UDriver   drv
 

convert back to pixels size, according to Driver current size.

Definition at line 89 of file text_context_user.cpp.

References StringHeight, StringLine, StringWidth, and w.

NLMISC::CVector NL3D::UTextContext::CStringInfo::getHotSpotVector THotSpot    hotspot
 

Get the string's origin.

Parameters:
hotspot  the origin of the string

Definition at line 45 of file text_context_user.cpp.

References NL3D_HAUTO_UI_TEXTCONTEXT, NL3D_MEM_TEXT_CONTEXT, StringHeight, and StringWidth.


Member Data Documentation

float NL3D::UTextContext::CStringInfo::StringHeight
 

The height of the string, in pixels (eg: 10).

Definition at line 79 of file u_text_context.h.

Referenced by convertTo01Size, convertToPixelSize, CStringInfo, and getHotSpotVector.

float NL3D::UTextContext::CStringInfo::StringLine
 

StringLine is the size from bottom of the whole string image to the hotspot in pixels.

for instance if the hotspot is bottomLeft the imaginary line of the string "bpc" is under the b, under the loop of the p but over the leg of the p. So StringLine is a positive value in this case. It may be a negative value for the string "^" for example.

Definition at line 85 of file u_text_context.h.

Referenced by convertTo01Size, convertToPixelSize, and CStringInfo.

float NL3D::UTextContext::CStringInfo::StringWidth
 

The width of the string, in pixels (eg: 30).

Definition at line 77 of file u_text_context.h.

Referenced by convertTo01Size, convertToPixelSize, CStringInfo, and getHotSpotVector.


The documentation for this struct was generated from the following files: