A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/demo__font_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/opengl/mesa/demo/demo_font.cpp Source File

70  string

width_str =

ctx

.GetRequest().GetEntry(

"width"

);

71  string

height_str =

ctx

.GetRequest().GetEntry(

"height"

);

75  catch

(std::exception&) {

82  catch

(std::exception&) {

115  string

font_face_str = request.

GetEntry

(

"font"

);

116  string

font_size_str = request.

GetEntry

(

"size"

);

123  if

(font_face == 0) {

128  if

(font_size == 0) {

142

glClearColor(1.0, 1.0, 1.0, 0.0);

143

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

149  int

panel_wid =

static_cast<int>

(

m_Width

- 20);

150  int

panel_ht =

static_cast<int>

((

m_Height

- 20) / 4);

159  str

=

"Centered text in ("

;

165  str

+=

" (and a tag to make it long)"

;

167

glColor3f(0.2f, 0.0f, 0.5f);

168

font.

TextOut

(panel_x, panel_y, panel_x + panel_wid, panel_x + panel_ht,

171

glBegin(GL_LINE_LOOP);

172

glVertex2f(panel_x, panel_y);

173

glVertex2f(panel_x + panel_wid, panel_y);

174

glVertex2f(panel_x + panel_wid, panel_y + panel_ht);

175

glVertex2f(panel_x, panel_y + panel_ht);

184  str

=

"Right justified text in ("

;

189  str

+=

" (and a tag to make it long)"

;

191

glColor3f(0.0f, 0.0f, 0.5f);

192

font.

TextOut

(panel_x, panel_y, panel_x + panel_wid, panel_x + panel_ht,

195

glBegin(GL_LINE_LOOP);

196

glVertex2f(panel_x, panel_y);

197

glVertex2f(panel_x + panel_wid, panel_y);

198

glVertex2f(panel_x + panel_wid, panel_y + panel_ht);

199

glVertex2f(panel_x, panel_y + panel_ht);

208  str

=

"Top-Left justified text in ("

;

213  str

+=

" (and blunt-end truncation)"

;

215

glColor3f(0.5f, 0.0f, 0.5f);

216

font.

TextOut

(panel_x, panel_y, panel_x + panel_wid, panel_x + panel_ht,

220

glBegin(GL_LINE_LOOP);

221

glVertex2f(panel_x, panel_y);

222

glVertex2f(panel_x + panel_wid, panel_y);

223

glVertex2f(panel_x + panel_wid, panel_y + panel_ht);

224

glVertex2f(panel_x, panel_y + panel_ht);

233  str

=

"Bottom-Right justified text in ("

;

238  str

+=

" (and a tag to make it long)"

;

240

glColor3f(0.2f, 0.2f, 0.5f);

242

font.

TextOut

(panel_x, panel_y, panel_x + panel_wid, panel_x + panel_ht,

245

glBegin(GL_LINE_LOOP);

246

glVertex2f(panel_x, panel_y);

247

glVertex2f(panel_x + panel_wid, panel_y);

248

glVertex2f(panel_x + panel_wid, panel_y + panel_ht);

249

glVertex2f(panel_x, panel_y + panel_ht);

262 int main

(

int

argc,

const char

* argv[])

void x_PreProcess(CCgiContext &ctx)

virtual void Render(CCgiContext &ctx)

int main(int argc, const char *argv[])

static const char * str(char *buf, int n)

int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)

Main function (entry point) for the NCBI application.

const CCgiEntry & GetEntry(const string &name, bool *is_found=0) const

Get entry value by name.

@ eDS_Default

Try standard log file (app.name + ".log") in /log/, use stderr on failure.

void SetBottomPlane(GLdouble f)

virtual void TextOut(const char *text) const

void SetFontSize(EFontSize size)

void SetRightPlane(GLdouble f)

void SetLayout(EType type)

void SetLeftPlane(GLdouble f)

virtual TModelUnit TextHeight(void) const

compute the height of a string

static EFontFace FaceFromString(const string &str)

void SetTopPlane(GLdouble f)

void MakeCurrent(bool save_matrices=false)

void SetFarPlane(GLdouble)

static EFontSize SizeFromString(const string &str)

void SetFontFace(EFontFace face)

void SetNearPlane(GLdouble)

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)

Convert string to int.

static string IntToString(int value, TNumToStringFlags flags=0, int base=10)

Convert int to string.

unsigned int

A callback function used to compare two keys in a database.

Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...


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