X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2Fview.h;fp=src%2Fview.h;h=c6c230dfe05f23c44c1ecdbd085faa459a3efafd;hb=aaa65d90ac812f924cbbc39bef7a5f8b6cad2da3;hp=bbd575eebb4620edc2be701fb2d7164f930fdd73;hpb=e164c93218ed4599614f4f6e5e815429a3fedbf7;p=ipdf%2Fcode.git diff --git a/src/view.h b/src/view.h index bbd575e..c6c230d 100644 --- a/src/view.h +++ b/src/view.h @@ -10,7 +10,7 @@ namespace IPDF { public: View(Document & document, const Rect & bounds = Rect(0,0,1,1), const Colour & colour = Colour(0.f,0.f,0.f,1.f)) - : m_document(document), m_bounds(bounds), m_colour(colour) + : m_document(document), m_bounds(bounds), m_colour(colour), m_use_gpu_transform(false) { Debug("View Created - Bounds => {%s}", m_bounds.Str().c_str()); } @@ -20,9 +20,17 @@ namespace IPDF void Translate(Real x, Real y); void ScaleAroundPoint(Real x, Real y, Real scaleAmt); + + Rect TransformToViewCoords(const Rect& inp) const; + + const Rect& GetBounds() const { return m_bounds; } + + const bool UsingGPUTransform() const { return m_use_gpu_transform; } + void ToggleGPUTransform() { m_use_gpu_transform = (!m_use_gpu_transform); } private: void DrawGrid(); + bool m_use_gpu_transform; Document & m_document; Rect m_bounds; Colour m_colour;