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 agg 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 37 conv_stroke(VertexSource& vs) : 38 conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers>(vs) 39 { 40 } 41 42 void line_cap(line_cap_e lc) { base_type::generator().line_cap(lc); } 43 void line_join(line_join_e lj) { base_type::generator().line_join(lj); } 44 void inner_join(inner_join_e ij) { base_type::generator().inner_join(ij); } 45 46 line_cap_e line_cap() const { return base_type::generator().line_cap(); } 47 line_join_e line_join() const { return base_type::generator().line_join(); } 48 inner_join_e inner_join() const { return base_type::generator().inner_join(); } 49 50 void width(double w) { base_type::generator().width(w); } 51 void miter_limit(double ml) { base_type::generator().miter_limit(ml); } 52 void miter_limit_theta(double t) { base_type::generator().miter_limit_theta(t); } 53 void inner_miter_limit(double ml) { base_type::generator().inner_miter_limit(ml); } 54 void approximation_scale(double as) { base_type::generator().approximation_scale(as); } 55 56 double width() const { return base_type::generator().width(); } 57 double miter_limit() const { return base_type::generator().miter_limit(); } 58 double inner_miter_limit() const { return base_type::generator().inner_miter_limit(); } 59 double approximation_scale() const { return base_type::generator().approximation_scale(); } 60 61 void shorten(double s) { base_type::generator().shorten(s); } 62 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