/* -*- c++ -*- * Copyright ©2008 Hugo Mills * * This software is distributed under the terms of the GNU GPL v3 * For more information on the GPL, see the file COPYING or * visit http://www.gnu.org/ * * This software is distributed without warranty */ #ifndef XFVIEW_TRANSLATE_H #define XFVIEW_TRANSLATE_H #include "magellan/xfview.h" class XfView_Translate : public XfView { public: XfView_Translate(XfView* vp, int xoff, int yoff); virtual ~XfView_Translate(); virtual bool f(ivec2&, const dvec2&) const; virtual bool g(dvec2&, const ivec2&) const; int left(void) const { return view->left()+xoffset; } int bottom(void) const { return view->bottom()+yoffset; } int right(void) const { return view->right()+xoffset; } int top(void) const { return view->top()+yoffset; } double scaling(void) const { return view->scaling(); } static XfView* parse(ConfigLexer*, const std::string&, const std::string&); private: XfView* view; int xoffset; int yoffset; }; extern "C" PluginInfo* getmodules(int i); #endif