All of the SDL2 graphics stuff.
[ipdf/code.git] / src / ipdf.h
1 #ifndef _IPDF_H
2 #define _IPDF_H
3
4 #include "common.h"
5
6 namespace IPDF
7 {
8         typedef float Real;
9         
10         inline float RealToFloat(Real r) {return r;}
11
12         typedef unsigned ObjectID;
13
14         struct Rect
15         {
16                 Real x; Real y; Real w; Real h;
17                 Rect(Real _x, Real _y, Real _w, Real _h) : x(_x), y(_y), w(_w), h(_h) {}
18                 std::string Str() 
19                 {
20                         std::stringstream s;
21                         s << "{" << x << ", " << y << ", " << w << ", " << h << "}";
22                         return s.str();
23                 }
24         };
25
26         struct Objects
27         {
28                 std::vector<Rect> bounds;
29         };
30
31         class View;
32 }
33
34
35 #endif //_IPDF_H

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