Go nuts with Qt
[ipdf/code.git] / src / view.cpp
index a953579..d7d1e34 100644 (file)
@@ -77,6 +77,21 @@ void View::Translate(Real x, Real y)
        m_bounds_dirty = true;
 }
 
+/**
+ * Set View bounds
+ * @param bounds - New bounds
+ */
+void View::SetBounds(const Rect & bounds)
+{
+       m_bounds.x = bounds.x;
+       m_bounds.y = bounds.y;
+       m_bounds.w = bounds.w;
+       m_bounds.h = bounds.h;
+       if (!m_use_gpu_transform)
+               m_buffer_dirty = true;
+       m_bounds_dirty = true;
+}
+
 /**
  * Scale the View at a point
  * @param x, y - Coordinates to scale at (eg: Mouse cursor position)

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