OSDN Git Service

font
[psychlops/cpp.git] / win32gl / test / main.cpp
index 1f598bd..c870389 100644 (file)
@@ -1,3 +1,33 @@
+#include <psychlops.h>
+using namespace Psychlops;
+
+void psychlops_main() {
+       Canvas cnvs(Canvas::window);\r
+\r
+       Font font(L"MS P Gothic", 32);\r
+       Letters let(L"hoge", font);\r
+       let._zoom_cache = true;\r
+\r
+       Clock after, before;\r
+       after.update();\r
+\r
+       while(!Keyboard::esc.pushed()) {\r
+        before = after;\r
+        after.update();\r
+\r
+        cnvs.clear();\r
+\r
+        font.size = random(100);\r
+        //let.setFont(font);\r
+        let.font = font;\r
+        let.centering().draw(Color::white);\r
+\r
+        cnvs.var((after-before).at_msec(), 100,100, Color::green);\r
+\r
+        cnvs.flip();\r
+       }
+}
+\r
 /*
 #include <psychlops.h>
 using namespace Psychlops;
@@ -138,7 +168,7 @@ void psychlops_main()
 }
 */
 
-
+/*
 #include <psychlops.h>
 using namespace Psychlops;     // Initially developed with Psychlops Win32 1.0.2 / 20080414
 
@@ -183,4 +213,4 @@ void psychlops_main() {
        p.run();
 
 }
-
+*/