#include <u_text_context.h>
Definition at line 87 of file u_text_context.h.
Public Member Functions | |
void | convertTo01Size (UDriver *drv) |
convert size in pixels to size in 0-1 relative coordinates, according to Driver current size | |
void | convertToPixelSize (UDriver *drv) |
convert back to pixels size, according to Driver current size | |
CStringInfo (float w, float h, float l) | |
CStringInfo () | |
NLMISC::CVector | getHotSpotVector (THotSpot hotspot) |
Data Fields | |
float | StringHeight |
The height of the string, in pixels (eg: 10). | |
float | StringLine |
float | StringWidth |
The width of the string, in pixels (eg: 30). |
|
Definition at line 100 of file u_text_context.h.
00100 {StringWidth= StringHeight= StringLine= 0;} |
|
Definition at line 101 of file u_text_context.h. References w.
00101 {StringWidth= w; StringHeight= h; StringLine = l;} |
|
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 NL3D::UDriver::getWindowSize(), uint32, and w.
00082 { 00083 uint32 w,h; 00084 drv->getWindowSize(w,h); 00085 StringWidth/= w; 00086 StringHeight/= h; 00087 StringLine/= h; 00088 } |
|
convert back to pixels size, according to Driver current size
Definition at line 89 of file text_context_user.cpp. References NL3D::UDriver::getWindowSize(), uint32, and w.
00090 { 00091 uint32 w,h; 00092 drv->getWindowSize(w,h); 00093 StringWidth*= w; 00094 StringHeight*= h; 00095 StringLine*= h; 00096 } |
|
Get the string's origin
|
|
The height of the string, in pixels (eg: 10).
Definition at line 92 of file u_text_context.h. |
|
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 98 of file u_text_context.h. |
|
The width of the string, in pixels (eg: 30).
Definition at line 90 of file u_text_context.h. |