eFontFace_Helvetica = 0,
88eFontFace_LastBitmapFont
93fFontRotateBase = (1 << 0),
94fFontRotateMid = (1 << 1),
95fFontRotateCap = (1 << 2),
96fReorientText = (1 << 4)
119 voidSetFontFace(EFontFace face,
booluse_bitmap_overrides=
true);
120EFontFace GetFontFace()
const;
123 voidSetFontSize(
unsigned int size);
124 unsigned intGetFontSize()
const;
127 boolSetFont(
stringfont_file_name,
128 unsigned intfont_size,
129 booluse_bitmap_overrides=
true);
135 static stringGetFontFileForFace(EFontFace face);
146 voidSetSnapToPixel(
boolxpix,
boolypix);
161 voidBeginText()
const;
164 voidBeginText(
const TVPRect& viewport)
const;
165 voidBeginText(
const TVPRect& viewport,
166GLdouble* mview, GLdouble* proj )
const;
169 voidEndText()
const;
180TAlign align = eAlign_Center,
181ETruncate
trunc= eTruncate_Ellipsis,
186 const float*
color,
194 const float*
color,
205TAlign align = eAlign_Center,
206ETruncate
trunc= eTruncate_Ellipsis,
226TAlign align = eAlign_Center,
227ETruncate
trunc= eTruncate_Ellipsis,
234ETruncate
trunc= eTruncate_Ellipsis)
const;
267 int len= -1)
const;
275 static stringFaceToString(
EFontFaceface);
284 boolFromString(
const string&
value);
291 static voidGetAllFaces(vector<string>& faces);
292 static voidGetAllSizes(vector<string>& sizes);
299 intx_Truncate(
const char*
text,
304 intx_Truncate2(
const char*
text,
318 boolwrite_text)
const;
323 stringfont_file_name,
324 unsigned intfont_size,
325 booluse_bitmap_overrides=
true)
const;
328 voidx_ComputeMetrics();
332 static strings_FontFileNames[];
335 static strings_FontNames[];
340 static ints_FontSizes[];
374 mutableGLint m_Viewport[4];
375 mutableGLdouble m_ModelviewMatrix[16];
376 mutableGLdouble m_ProjectionMatrix[16];
static const Colors colors
static const char * str(char *buf, int n)
TFontRotateFlags m_Rotate
flags for center of rotation and how to handle direction and orientation
string Truncate(const string &text, TModelUnit w, ETruncate trunc=eTruncate_Ellipsis) const
void SetFontRotate(TFontRotateFlags rot)
Set rotation flags (for center of rotation and re-orienting)
TFontRotateFlags GetFontRotate(void) const
virtual TModelUnit TextWidth(const char *text) const =0
EFontRotateFlags
Font rotate options.
bool m_SnapToPixelX
Normally, when text is written to the screen the position is synched to the nearest pixel.
virtual void TextOut(const char *text) const =0
TModelUnit m_MetricFullCharHeight
TModelUnit m_MetricMaxCharWidth
FTFont * m_Font
The current font for writing. These are owned by CFtglFontManager class.
string m_FontFile
File from which current font was loaded.
GLint m_PrevShader
Switch back to previous shader after writing text.
EFontFace m_FontFace
Current font face held by m_Font.
virtual bool IsBitmapFont() const
This is needed by pdf but really on for gltexture font subclass since those may be either texture or ...
TModelUnit m_MetricDescender
unsigned int m_FontSize
Size of current font.
virtual TModelUnit TextHeight(void) const =0
EFontFace
Set of pre-defined fonts for which we know we have valid font files.
CGlTextureFont(const string &font_file_name, unsigned int font_size=12)
create a font with a face loaded from a file
string GetFontFile() const
Get current font filename. Fonts set via EFontFace also have filenames.
virtual TModelUnit GetMetric(EMetric metric, const char *text=NULL, int len=-1) const =0
~CGlTextureFont()
use default copy ctor and operator=()
TModelUnit m_MetricCharHeight
Pre-computed metrics (may be computed first time accessed)
TModelUnit m_MetricAvgCharWidth
@ eFontFace_Helvetica_Bold
@ eFontFace_TimesRoman_Italic
@ eFontFace_Lucida_BoldItalic
@ eFontFace_BPMono_Italic
@ eFontFace_BPMono_BoldStencil
@ eFontFace_Courier_Italic
@ eFontFace_Helvetica_BoldItalic
@ eFontFace_Helvetica_Italic
@ eFontFace_Fixed_BoldItalic
@ eFontFace_TimesRoman_BoldItalic
@ eFontFace_TimesRoman_Bold
@ eFontFace_Courier_BoldItalic
@ eFontFace_Lucida_Italic
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
CTime Truncate(const CTime &t)
#define NCBI_GUIOPENGL_EXPORT
static void text(MDB_val *v)
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
string ToString(const wxRect &rc)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4