git.ucc.asn.au
/
ipdf
/
code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git.ucc.asn.au:ipdf/code
[ipdf/code.git]
/
src
/
view.h
diff --git
a/src/view.h
b/src/view.h
index
24ae6d9
..
c6c230d
100644
(file)
--- a/
src/view.h
+++ b/
src/view.h
@@
-10,16
+10,27
@@
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))
{
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());
+ }
virtual ~View() {}
void Render();
void Translate(Real x, Real y);
void ScaleAroundPoint(Real x, Real y, Real scaleAmt);
virtual ~View() {}
void Render();
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();
private:
void DrawGrid();
+ bool m_use_gpu_transform;
Document & m_document;
Rect m_bounds;
Colour m_colour;
Document & m_document;
Rect m_bounds;
Colour m_colour;
UCC
git Repository :: git.ucc.asn.au