#ifndef SCALEWINDOWTOWINDOW_HH #define SCALEWINDOWTOWINDOW_HH #include "FbTk/FbWindow.hh" namespace FbPager { template inline void scaleFromWindowToWindow(const FbTk::FbWindow &src, const FbTk::FbWindow &dest, T &x, T &y) { float xdiv = static_cast(src.width()) / static_cast(dest.width()); float ydiv = static_cast(src.height()) / static_cast(dest.height()); x = static_cast((float)(x) / xdiv); y = static_cast((float)(y) / ydiv); } } // end namespace FbPager #endif // SCALEWINDOWTOWINDOW_HH