X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2Fview.cpp;h=d7d1e34c30b245fa823b63146e58033d66914a2a;hb=398e6b2732decd57cdb57deb3f91d3ff08669e8b;hp=a953579e1ef307b4639cc0c2424c4f5b3d455102;hpb=6dd539966821debd18e0b86ed126742cd81d7fc9;p=ipdf%2Fcode.git diff --git a/src/view.cpp b/src/view.cpp index a953579..d7d1e34 100644 --- a/src/view.cpp +++ b/src/view.cpp @@ -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)