139241fe2SDarkWyrm //---------------------------------------------------------------------------- 2*e39da397SStephan Aßmus // Anti-Grain Geometry - Version 2.4 3*e39da397SStephan Aßmus // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) 439241fe2SDarkWyrm // 539241fe2SDarkWyrm // Permission to copy, use, modify, sell and distribute this software 639241fe2SDarkWyrm // is granted provided this copyright notice appears in all copies. 739241fe2SDarkWyrm // This software is provided "as is" without express or implied 839241fe2SDarkWyrm // warranty, and with no claim as to its suitability for any purpose. 939241fe2SDarkWyrm // 1039241fe2SDarkWyrm //---------------------------------------------------------------------------- 1139241fe2SDarkWyrm // Contact: mcseem@antigrain.com 1239241fe2SDarkWyrm // mcseemagg@yahoo.com 1339241fe2SDarkWyrm // http://www.antigrain.com 1439241fe2SDarkWyrm //---------------------------------------------------------------------------- 1539241fe2SDarkWyrm 1639241fe2SDarkWyrm #ifndef AGG_WARP_MAGNIFIER_INCLUDED 1739241fe2SDarkWyrm #define AGG_WARP_MAGNIFIER_INCLUDED 1839241fe2SDarkWyrm 1939241fe2SDarkWyrm 2039241fe2SDarkWyrm namespace agg 2139241fe2SDarkWyrm { 2239241fe2SDarkWyrm 2339241fe2SDarkWyrm //----------------------------------------------------trans_warp_magnifier 2439241fe2SDarkWyrm // 2539241fe2SDarkWyrm // See Inmplementation agg_trans_warp_magnifier.cpp 2639241fe2SDarkWyrm // 2739241fe2SDarkWyrm class trans_warp_magnifier 2839241fe2SDarkWyrm { 2939241fe2SDarkWyrm public: trans_warp_magnifier()3039241fe2SDarkWyrm trans_warp_magnifier() : m_xc(0.0), m_yc(0.0), m_magn(1.0), m_radius(1.0) {} 3139241fe2SDarkWyrm center(double x,double y)3239241fe2SDarkWyrm void center(double x, double y) { m_xc = x; m_yc = y; } magnification(double m)3339241fe2SDarkWyrm void magnification(double m) { m_magn = m; } radius(double r)3439241fe2SDarkWyrm void radius(double r) { m_radius = r; } 3539241fe2SDarkWyrm 3639241fe2SDarkWyrm void transform(double* x, double* y) const; 3739241fe2SDarkWyrm void inverse_transform(double* x, double* y) const; 3839241fe2SDarkWyrm 3939241fe2SDarkWyrm private: 4039241fe2SDarkWyrm double m_xc; 4139241fe2SDarkWyrm double m_yc; 4239241fe2SDarkWyrm double m_magn; 4339241fe2SDarkWyrm double m_radius; 4439241fe2SDarkWyrm }; 4539241fe2SDarkWyrm 4639241fe2SDarkWyrm 4739241fe2SDarkWyrm } 4839241fe2SDarkWyrm 4939241fe2SDarkWyrm 5039241fe2SDarkWyrm #endif 5139241fe2SDarkWyrm 52