1 //---------------------------------------------------------------------------- 2 // Anti-Grain Geometry - Version 2.4 3 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) 4 // 5 // Permission to copy, use, modify, sell and distribute this software 6 // is granted provided this copyright notice appears in all copies. 7 // This software is provided "as is" without express or implied 8 // warranty, and with no claim as to its suitability for any purpose. 9 // 10 //---------------------------------------------------------------------------- 11 // Contact: mcseem@antigrain.com 12 // mcseemagg@yahoo.com 13 // http://www.antigrain.com 14 //---------------------------------------------------------------------------- 15 // 16 // conv_stroke 17 // 18 //---------------------------------------------------------------------------- 19 #ifndef AGG_CONV_STROKE_INCLUDED 20 #define AGG_CONV_STROKE_INCLUDED 21 22 #include "agg_basics.h" 23 #include "agg_vcgen_stroke.h" 24 #include "agg_conv_adaptor_vcgen.h" 25 26 namespace mapserver 27 { 28 29 //-------------------------------------------------------------conv_stroke 30 template<class VertexSource, class Markers=null_markers> 31 struct conv_stroke : 32 public conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers> 33 { 34 typedef Markers marker_type; 35 typedef conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers> base_type; 36 conv_strokeconv_stroke37 conv_stroke(VertexSource& vs) : 38 conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers>(vs) 39 { 40 } 41 line_capconv_stroke42 void line_cap(line_cap_e lc) { base_type::generator().line_cap(lc); } line_joinconv_stroke43 void line_join(line_join_e lj) { base_type::generator().line_join(lj); } inner_joinconv_stroke44 void inner_join(inner_join_e ij) { base_type::generator().inner_join(ij); } 45 line_capconv_stroke46 line_cap_e line_cap() const { return base_type::generator().line_cap(); } line_joinconv_stroke47 line_join_e line_join() const { return base_type::generator().line_join(); } inner_joinconv_stroke48 inner_join_e inner_join() const { return base_type::generator().inner_join(); } 49 widthconv_stroke50 void width(double w) { base_type::generator().width(w); } miter_limitconv_stroke51 void miter_limit(double ml) { base_type::generator().miter_limit(ml); } miter_limit_thetaconv_stroke52 void miter_limit_theta(double t) { base_type::generator().miter_limit_theta(t); } inner_miter_limitconv_stroke53 void inner_miter_limit(double ml) { base_type::generator().inner_miter_limit(ml); } approximation_scaleconv_stroke54 void approximation_scale(double as) { base_type::generator().approximation_scale(as); } 55 widthconv_stroke56 double width() const { return base_type::generator().width(); } miter_limitconv_stroke57 double miter_limit() const { return base_type::generator().miter_limit(); } inner_miter_limitconv_stroke58 double inner_miter_limit() const { return base_type::generator().inner_miter_limit(); } approximation_scaleconv_stroke59 double approximation_scale() const { return base_type::generator().approximation_scale(); } 60 shortenconv_stroke61 void shorten(double s) { base_type::generator().shorten(s); } shortenconv_stroke62 double shorten() const { return base_type::generator().shorten(); } 63 64 private: 65 conv_stroke(const conv_stroke<VertexSource, Markers>&); 66 const conv_stroke<VertexSource, Markers>& 67 operator = (const conv_stroke<VertexSource, Markers>&); 68 69 }; 70 71 } 72 73 #endif 74