Add ObjectType for Object Type
[ipdf/code.git] / src / tests / saveload.cpp
index a2d58cb..32dd1d7 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "../document.h"
 #include "../view.h"
+#include "../screen.h"
 
 using namespace std;
 using namespace IPDF;
@@ -14,7 +15,7 @@ int main(int argc, char ** argv)
        Document doc;
        for (unsigned id = 0; id < test_objects; ++id)
        {
-               doc.Add(Random(), Random(), Random(), Random());
+               doc.Add((ObjectType)(rand() % 2), Rect(Random(), Random(), Random(), Random()));
        }
        doc.Save("test.ipdf");
 
@@ -28,5 +29,14 @@ int main(int argc, char ** argv)
        }
        
 
+       View view(doc);
+       Screen scr;
+
+       while (scr.PumpEvents())
+       {
+               view.Render();
+               scr.Present();
+       }
+
        return 0;
 }

UCC git Repository :: git.ucc.asn.au