Anti-Grain Geometry - AGG (libagg)  2.5
agg-2.5/include/agg_conv_smooth_poly1.h
Go to the documentation of this file.
00001 //----------------------------------------------------------------------------
00002 // Anti-Grain Geometry (AGG) - Version 2.5
00003 // A high quality rendering engine for C++
00004 // Copyright (C) 2002-2006 Maxim Shemanarev
00005 // Contact: mcseem@antigrain.com
00006 //          mcseemagg@yahoo.com
00007 //          http://antigrain.com
00008 // 
00009 // AGG is free software; you can redistribute it and/or
00010 // modify it under the terms of the GNU General Public License
00011 // as published by the Free Software Foundation; either version 2
00012 // of the License, or (at your option) any later version.
00013 // 
00014 // AGG is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 // GNU General Public License for more details.
00018 // 
00019 // You should have received a copy of the GNU General Public License
00020 // along with AGG; if not, write to the Free Software
00021 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
00022 // MA 02110-1301, USA.
00023 //----------------------------------------------------------------------------
00024 
00025 #ifndef AGG_CONV_SMOOTH_POLY1_INCLUDED
00026 #define AGG_CONV_SMOOTH_POLY1_INCLUDED
00027 
00028 #include "agg_basics.h"
00029 #include "agg_vcgen_smooth_poly1.h"
00030 #include "agg_conv_adaptor_vcgen.h"
00031 #include "agg_conv_curve.h"
00032 
00033 
00034 namespace agg
00035 {
00036 
00037     //-------------------------------------------------------conv_smooth_poly1
00038     template<class VertexSource> 
00039     struct conv_smooth_poly1 : 
00040     public conv_adaptor_vcgen<VertexSource, vcgen_smooth_poly1>
00041     {
00042         typedef conv_adaptor_vcgen<VertexSource, vcgen_smooth_poly1> base_type;
00043 
00044         conv_smooth_poly1(VertexSource& vs) : 
00045             conv_adaptor_vcgen<VertexSource, vcgen_smooth_poly1>(vs)
00046         {
00047         }
00048 
00049         void   smooth_value(double v) { base_type::generator().smooth_value(v); }
00050         double smooth_value() const { return base_type::generator().smooth_value(); }
00051 
00052     private:
00053         conv_smooth_poly1(const conv_smooth_poly1<VertexSource>&);
00054         const conv_smooth_poly1<VertexSource>& 
00055             operator = (const conv_smooth_poly1<VertexSource>&);
00056     };
00057 
00058 
00059 
00060     //-------------------------------------------------conv_smooth_poly1_curve
00061     template<class VertexSource> 
00062     struct conv_smooth_poly1_curve : 
00063     public conv_curve<conv_smooth_poly1<VertexSource> >
00064     {
00065         conv_smooth_poly1_curve(VertexSource& vs) :
00066             conv_curve<conv_smooth_poly1<VertexSource> >(m_smooth),
00067             m_smooth(vs)
00068         {
00069         }
00070 
00071         void   smooth_value(double v) { m_smooth.generator().smooth_value(v); }
00072         double smooth_value() const { return m_smooth.generator().smooth_value(); }
00073 
00074     private:
00075         conv_smooth_poly1_curve(const conv_smooth_poly1_curve<VertexSource>&);
00076         const conv_smooth_poly1_curve<VertexSource>& 
00077             operator = (const conv_smooth_poly1_curve<VertexSource>&);
00078 
00079         conv_smooth_poly1<VertexSource> m_smooth;
00080     };
00081 
00082 }
00083 
00084 
00085 #endif
00086 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines