width_str =
ctx.GetRequest().GetEntry(
"width");
71 stringheight_str =
ctx.GetRequest().GetEntry(
"height");
75 catch(std::exception&) {
82 catch(std::exception&) {
115 stringfont_face_str = request.
GetEntry(
"font");
116 stringfont_size_str = request.
GetEntry(
"size");
123 if(font_face == 0) {
128 if(font_size == 0) {
142glClearColor(1.0, 1.0, 1.0, 0.0);
143glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
149 intpanel_wid =
static_cast<int>(
m_Width- 20);
150 intpanel_ht =
static_cast<int>((
m_Height- 20) / 4);
159 str=
"Centered text in (";
165 str+=
" (and a tag to make it long)";
167glColor3f(0.2f, 0.0f, 0.5f);
168font.
TextOut(panel_x, panel_y, panel_x + panel_wid, panel_x + panel_ht,
171glBegin(GL_LINE_LOOP);
172glVertex2f(panel_x, panel_y);
173glVertex2f(panel_x + panel_wid, panel_y);
174glVertex2f(panel_x + panel_wid, panel_y + panel_ht);
175glVertex2f(panel_x, panel_y + panel_ht);
184 str=
"Right justified text in (";
189 str+=
" (and a tag to make it long)";
191glColor3f(0.0f, 0.0f, 0.5f);
192font.
TextOut(panel_x, panel_y, panel_x + panel_wid, panel_x + panel_ht,
195glBegin(GL_LINE_LOOP);
196glVertex2f(panel_x, panel_y);
197glVertex2f(panel_x + panel_wid, panel_y);
198glVertex2f(panel_x + panel_wid, panel_y + panel_ht);
199glVertex2f(panel_x, panel_y + panel_ht);
208 str=
"Top-Left justified text in (";
213 str+=
" (and blunt-end truncation)";
215glColor3f(0.5f, 0.0f, 0.5f);
216font.
TextOut(panel_x, panel_y, panel_x + panel_wid, panel_x + panel_ht,
220glBegin(GL_LINE_LOOP);
221glVertex2f(panel_x, panel_y);
222glVertex2f(panel_x + panel_wid, panel_y);
223glVertex2f(panel_x + panel_wid, panel_y + panel_ht);
224glVertex2f(panel_x, panel_y + panel_ht);
233 str=
"Bottom-Right justified text in (";
238 str+=
" (and a tag to make it long)";
240glColor3f(0.2f, 0.2f, 0.5f);
242font.
TextOut(panel_x, panel_y, panel_x + panel_wid, panel_x + panel_ht,
245glBegin(GL_LINE_LOOP);
246glVertex2f(panel_x, panel_y);
247glVertex2f(panel_x + panel_wid, panel_y);
248glVertex2f(panel_x + panel_wid, panel_y + panel_ht);
249glVertex2f(panel_x, panel_y + panel_ht);
262 int main(
intargc,
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