MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
MGStringWriter.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 
6 #pragma once
7 
8 #include "mg/MGCL.h"
9 #include "mg/Position.h"
10 
11 class FTFont;
12 class MGColor;
13 class VBObyAnchorPt;
14 class mgVBOElement;
15 
20 
25 class MG_DLL_DECLR MGStringWriter{
26 public:
27 
29  static mgVBOElement* Draw(
30  const char *str, //String to display
31  const MGPosition& pos,//position for the string to display at.
32  const MGColor* color=NULL
33  );
34 
36  static mgVBOElement* Draw(
37  const wchar_t *str, //String to display
38  const MGPosition& pos,//position for the string to display at.
39  const MGColor* color=NULL
40  );
41 
43  static mgVBOElement* DrawByScreen(
44  const char *str, //String to display
45  const MGPosition& pos,//position for the string to display at.
46  const MGColor* color=NULL
47  );
48 
50  static mgVBOElement* DrawByScreen(
51  const wchar_t *str, //String to display
52  const MGPosition& pos,//position for the string to display at.
53  const MGColor* color=NULL
54  );
55 
56  static void Init();
57 
58 private:
59  static MGStringWriter* getInstance();
60 
61  MGStringWriter(void);
62  virtual ~MGStringWriter(void);
63 
64  void DrawString(VBObyAnchorPt& vbo,
65  const char *str, //String to display
66  const MGPosition& pos,//position for the string to display at.
67  const MGColor* color
68  );
69 
70  void DrawString(VBObyAnchorPt& vbo,
71  const wchar_t *str, //String to display
72  const MGPosition& pos,//position for the string to display at.
73  const MGColor* color
74  );
75 
76  FTFont* m_pFont;
77 };
78  // end of DisplayHandling group
Interface class to include an element in mgVBO class's.
Definition: VBOElement.h:44
MGColor defines the OpenGL color (R,G,B,A).
Definition: Color.h:26
Represent a positional data.
Definition: Position.h:28
文字列描画のためのVBOクラス.
Definition: VBObyAnchorPt.h:26
Defines String writer class using mgVBO(OpenGL infrastructure).
Definition: MGStringWriter.h:25