Ajout de l'ensemble du workspace.
[GPU.git] / WCudaMSE / API_Bilat_Image_GL / INC / common / Graphic2Ds.h
diff --git a/WCudaMSE/API_Bilat_Image_GL/INC/common/Graphic2Ds.h b/WCudaMSE/API_Bilat_Image_GL/INC/common/Graphic2Ds.h
new file mode 100755 (executable)
index 0000000..d333176
--- /dev/null
@@ -0,0 +1,124 @@
+#ifndef GRAPHIC2DS_H\r
+#define GRAPHIC2DS_H\r
+\r
+#include "envGLImage.h"\r
+#include "Panel_A.h"\r
+#include "Font_A.h"\r
+#include "Color3f.h"\r
+#include "Primitives_A.h"\r
+\r
+#include <string>\r
+#include <queue>\r
+\r
+using std::queue;\r
+using std::string;\r
+\r
+/*----------------------------------------------------------------------*\\r
+ |*                    Declaration                                     *|\r
+ \*---------------------------------------------------------------------*/\r
+\r
+/*--------------------------------------*\\r
+ |*            Public                  *|\r
+ \*-------------------------------------*/\r
+\r
+class CBI_GLIMAGE Graphic2Ds\r
+    {\r
+    public:\r
+\r
+       /*--------------------------------------*\\r
+        |*             Constructor             *|\r
+        \*-------------------------------------*/\r
+\r
+       Graphic2Ds(int width, int height);\r
+\r
+       /*--------------------------------------*\\r
+        |*             Destructor              *|\r
+        \*-------------------------------------*/\r
+\r
+       virtual ~Graphic2Ds();\r
+\r
+       /*--------------------------------------*\\r
+        |*             Methodes                *|\r
+        \*-------------------------------------*/\r
+\r
+       /*--------------*\\r
+        |*     User    *|\r
+        \*-------------*/\r
+\r
+    public:\r
+\r
+       void setColor(Colorf colorf);\r
+\r
+       void setColorRGB(float r01, float g01, float b01, float a01 = 1.0f);\r
+\r
+       void setColorHSB(float h01, float s01, float b01, float a01 = 1.0f);\r
+\r
+       void drawLigne(int x1, int y1, int x2, int y2);\r
+\r
+       void drawVerticalLigne(int x, int y, int height);\r
+\r
+       void drawHorizontalLigne(int x, int y, int width);\r
+\r
+       void drawWiredRect2D(int x, int y, int width, int height);\r
+\r
+       void drawRect2D(int x, int y, int width, int height);\r
+\r
+       void drawText(int x, int y, string texte, const Font_A* font);\r
+\r
+       void drawTitleTop(string texte, const Font_A* font);\r
+\r
+       void drawTitleMiddle(string texte, const Font_A* font);\r
+\r
+       void drawTitleBottom(string texte, const Font_A* font);\r
+\r
+       const Font_A* getFont(string fontname);\r
+\r
+       const Font_A* getFont(FontType type = HELVETICA_12);\r
+\r
+       int texteWidth(string texte, const Font_A* font);\r
+\r
+       int texteHeight(string texte, const Font_A* font);\r
+\r
+       /*--------------*\\r
+       |*  Developer   *|\r
+        \*--------------*/\r
+\r
+       unsigned int getSize();\r
+\r
+       bool isEmpty();\r
+\r
+       void reshape(int width, int height);\r
+\r
+       void startPainPrimitive(Panel_A &ptrPanel);\r
+\r
+       void drawPrimitive(Primitives_A* primitive);\r
+\r
+       Primitives_A* popPrimitive();\r
+\r
+       Colorf popColor();\r
+\r
+       /*--------------------------------------*\\r
+        |*             Attributs               *|\r
+        \*-------------------------------------*/\r
+    private:\r
+\r
+       // Inputs\r
+       int width;\r
+       int height;\r
+       Panel_A* ptrPanel;\r
+\r
+       // Tools\r
+       Colorf currentColor;\r
+       queue<Colorf> queueColors;\r
+       queue<Primitives_A*> queuePrimitives;\r
+\r
+       int frameWidth;\r
+       int frameHeight;\r
+    };\r
+\r
+#endif\r
+\r
+/*----------------------------------------------------------------------*\\r
+ |*                    End                                             *|\r
+ \*---------------------------------------------------------------------*/\r
+\r