bbd575eebb4620edc2be701fb2d7164f930fdd73
[ipdf/code.git] / src / view.h
1 #ifndef _VIEW_H
2 #define _VIEW_H
3
4 #include "ipdf.h"
5 #include "document.h"
6
7 namespace IPDF
8 {
9         class View
10         {
11                 public:
12                         View(Document & document, const Rect & bounds = Rect(0,0,1,1), const Colour & colour = Colour(0.f,0.f,0.f,1.f)) 
13                                 : m_document(document), m_bounds(bounds), m_colour(colour)
14                         {
15                                 Debug("View Created - Bounds => {%s}", m_bounds.Str().c_str());
16                         }
17                         virtual ~View() {}
18
19                         void Render();
20                         
21                         void Translate(Real x, Real y);
22                         void ScaleAroundPoint(Real x, Real y, Real scaleAmt);
23                 
24                 private:
25                         void DrawGrid();
26                         Document & m_document;
27                         Rect m_bounds;
28                         Colour m_colour;
29         };
30 }
31
32 #endif //_VIEW_H

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