1*39241fe2SDarkWyrm //---------------------------------------------------------------------------- 2*39241fe2SDarkWyrm // Anti-Grain Geometry - Version 2.2 3*39241fe2SDarkWyrm // Copyright (C) 2002-2004 Maxim Shemanarev (http://www.antigrain.com) 4*39241fe2SDarkWyrm // 5*39241fe2SDarkWyrm // Permission to copy, use, modify, sell and distribute this software 6*39241fe2SDarkWyrm // is granted provided this copyright notice appears in all copies. 7*39241fe2SDarkWyrm // This software is provided "as is" without express or implied 8*39241fe2SDarkWyrm // warranty, and with no claim as to its suitability for any purpose. 9*39241fe2SDarkWyrm // 10*39241fe2SDarkWyrm //---------------------------------------------------------------------------- 11*39241fe2SDarkWyrm // Contact: mcseem@antigrain.com 12*39241fe2SDarkWyrm // mcseemagg@yahoo.com 13*39241fe2SDarkWyrm // http://www.antigrain.com 14*39241fe2SDarkWyrm //---------------------------------------------------------------------------- 15*39241fe2SDarkWyrm // 16*39241fe2SDarkWyrm // conv_stroke 17*39241fe2SDarkWyrm // 18*39241fe2SDarkWyrm //---------------------------------------------------------------------------- 19*39241fe2SDarkWyrm #ifndef AGG_CONV_STROKE_INCLUDED 20*39241fe2SDarkWyrm #define AGG_CONV_STROKE_INCLUDED 21*39241fe2SDarkWyrm 22*39241fe2SDarkWyrm #include "agg_basics.h" 23*39241fe2SDarkWyrm #include "agg_vcgen_stroke.h" 24*39241fe2SDarkWyrm #include "agg_conv_adaptor_vcgen.h" 25*39241fe2SDarkWyrm 26*39241fe2SDarkWyrm namespace agg 27*39241fe2SDarkWyrm { 28*39241fe2SDarkWyrm 29*39241fe2SDarkWyrm //-------------------------------------------------------------conv_stroke 30*39241fe2SDarkWyrm template<class VertexSource, class Markers=null_markers> 31*39241fe2SDarkWyrm struct conv_stroke : 32*39241fe2SDarkWyrm public conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers> 33*39241fe2SDarkWyrm { 34*39241fe2SDarkWyrm typedef Markers marker_type; 35*39241fe2SDarkWyrm typedef conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers> base_type; 36*39241fe2SDarkWyrm 37*39241fe2SDarkWyrm conv_stroke(VertexSource& vs) : 38*39241fe2SDarkWyrm conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers>(vs) 39*39241fe2SDarkWyrm { 40*39241fe2SDarkWyrm } 41*39241fe2SDarkWyrm 42*39241fe2SDarkWyrm void line_cap(vcgen_stroke::line_cap_e lc) { base_type::generator().line_cap(lc); } 43*39241fe2SDarkWyrm void line_join(vcgen_stroke::line_join_e lj) { base_type::generator().line_join(lj); } 44*39241fe2SDarkWyrm 45*39241fe2SDarkWyrm vcgen_stroke::line_cap_e line_cap() const { return base_type::generator().line_cap(); } 46*39241fe2SDarkWyrm vcgen_stroke::line_join_e line_join() const { return base_type::generator().line_join(); } 47*39241fe2SDarkWyrm 48*39241fe2SDarkWyrm void width(double w) { base_type::generator().width(w); } 49*39241fe2SDarkWyrm void miter_limit(double ml) { base_type::generator().miter_limit(ml); } 50*39241fe2SDarkWyrm void miter_limit_theta(double t) { base_type::generator().miter_limit_theta(t); } 51*39241fe2SDarkWyrm void approximation_scale(double as) { base_type::generator().approximation_scale(as); } 52*39241fe2SDarkWyrm 53*39241fe2SDarkWyrm double width() const { return base_type::generator().width(); } 54*39241fe2SDarkWyrm double miter_limit() const { return base_type::generator().miter_limit(); } 55*39241fe2SDarkWyrm double approximation_scale() const { return base_type::generator().approximation_scale(); } 56*39241fe2SDarkWyrm 57*39241fe2SDarkWyrm void shorten(double s) { base_type::generator().shorten(s); } 58*39241fe2SDarkWyrm double shorten() const { return base_type::generator().shorten(); } 59*39241fe2SDarkWyrm 60*39241fe2SDarkWyrm private: 61*39241fe2SDarkWyrm conv_stroke(const conv_stroke<VertexSource, Markers>&); 62*39241fe2SDarkWyrm const conv_stroke<VertexSource, Markers>& 63*39241fe2SDarkWyrm operator = (const conv_stroke<VertexSource, Markers>&); 64*39241fe2SDarkWyrm 65*39241fe2SDarkWyrm }; 66*39241fe2SDarkWyrm 67*39241fe2SDarkWyrm } 68*39241fe2SDarkWyrm 69*39241fe2SDarkWyrm #endif 70