Anti-Grain Geometry - AGG (libagg)  2.5
agg-2.5/include/agg_conv_stroke.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_STROKE_INCLUDED
00026 #define AGG_CONV_STROKE_INCLUDED
00027 
00028 #include "agg_basics.h"
00029 #include "agg_vcgen_stroke.h"
00030 #include "agg_conv_adaptor_vcgen.h"
00031 
00032 namespace agg
00033 {
00034 
00035     //-------------------------------------------------------------conv_stroke
00036     template<class VertexSource, class Markers=null_markers> 
00037     struct conv_stroke : 
00038     public conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers>
00039     {
00040         typedef Markers marker_type;
00041         typedef conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers> base_type;
00042 
00043         conv_stroke(VertexSource& vs) : 
00044             conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers>(vs)
00045         {
00046         }
00047 
00048         void line_cap(line_cap_e lc)     { base_type::generator().line_cap(lc);  }
00049         void line_join(line_join_e lj)   { base_type::generator().line_join(lj); }
00050         void inner_join(inner_join_e ij) { base_type::generator().inner_join(ij); }
00051 
00052         line_cap_e   line_cap()   const { return base_type::generator().line_cap();  }
00053         line_join_e  line_join()  const { return base_type::generator().line_join(); }
00054         inner_join_e inner_join() const { return base_type::generator().inner_join(); }
00055 
00056         void width(double w) { base_type::generator().width(w); }
00057         void miter_limit(double ml) { base_type::generator().miter_limit(ml); }
00058         void miter_limit_theta(double t) { base_type::generator().miter_limit_theta(t); }
00059         void inner_miter_limit(double ml) { base_type::generator().inner_miter_limit(ml); }
00060         void approximation_scale(double as) { base_type::generator().approximation_scale(as); }
00061 
00062         double width() const { return base_type::generator().width(); }
00063         double miter_limit() const { return base_type::generator().miter_limit(); }
00064         double inner_miter_limit() const { return base_type::generator().inner_miter_limit(); }
00065         double approximation_scale() const { return base_type::generator().approximation_scale(); }
00066 
00067         void shorten(double s) { base_type::generator().shorten(s); }
00068         double shorten() const { return base_type::generator().shorten(); }
00069 
00070     private:
00071        conv_stroke(const conv_stroke<VertexSource, Markers>&);
00072        const conv_stroke<VertexSource, Markers>& 
00073            operator = (const conv_stroke<VertexSource, Markers>&);
00074 
00075     };
00076 
00077 }
00078 
00079 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines