1 2 //---------------------------------------------------------------------------- 3 // Anti-Grain Geometry - Version 2.3 4 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) 5 // 6 // Permission to copy, use, modify, sell and distribute this software 7 // is granted provided this copyright notice appears in all copies. 8 // This software is provided "as is" without express or implied 9 // warranty, and with no claim as to its suitability for any purpose. 10 // 11 //---------------------------------------------------------------------------- 12 // Contact: [email protected] 13 // [email protected] 14 // http://www.antigrain.com 15 //---------------------------------------------------------------------------- 16 // 17 // conv_stroke 18 // 19 //---------------------------------------------------------------------------- 20 #ifndef AGG_CONV_STROKE_INCLUDED 21 #define AGG_CONV_STROKE_INCLUDED 22 #include "agg_basics.h" 23 #include "agg_vcgen_stroke.h" 24 #include "agg_conv_adaptor_vcgen.h" 25 namespace pdfium 26 { 27 namespace agg 28 { 29 template<class VertexSource, class Markers = null_markers> 30 struct conv_stroke : 31 public conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers> { 32 typedef Markers marker_type; 33 typedef conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers> base_type; conv_strokeconv_stroke34 conv_stroke(VertexSource& vs) : 35 conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers>(vs) 36 { 37 } line_capconv_stroke38 void line_cap(line_cap_e lc) 39 { 40 base_type::generator().line_cap(lc); 41 } line_joinconv_stroke42 void line_join(line_join_e lj) 43 { 44 base_type::generator().line_join(lj); 45 } inner_joinconv_stroke46 void inner_join(inner_join_e ij) 47 { 48 base_type::generator().inner_join(ij); 49 } line_capconv_stroke50 line_cap_e line_cap() const 51 { 52 return base_type::generator().line_cap(); 53 } line_joinconv_stroke54 line_join_e line_join() const 55 { 56 return base_type::generator().line_join(); 57 } inner_joinconv_stroke58 inner_join_e inner_join() const 59 { 60 return base_type::generator().inner_join(); 61 } widthconv_stroke62 void width(float w) 63 { 64 base_type::generator().width(w); 65 } miter_limitconv_stroke66 void miter_limit(float ml) 67 { 68 base_type::generator().miter_limit(ml); 69 } miter_limit_thetaconv_stroke70 void miter_limit_theta(float t) 71 { 72 base_type::generator().miter_limit_theta(t); 73 } inner_miter_limitconv_stroke74 void inner_miter_limit(float ml) 75 { 76 base_type::generator().inner_miter_limit(ml); 77 } approximation_scaleconv_stroke78 void approximation_scale(float as) 79 { 80 base_type::generator().approximation_scale(as); 81 } widthconv_stroke82 float width() const 83 { 84 return base_type::generator().width(); 85 } miter_limitconv_stroke86 float miter_limit() const 87 { 88 return base_type::generator().miter_limit(); 89 } inner_miter_limitconv_stroke90 float inner_miter_limit() const 91 { 92 return base_type::generator().inner_miter_limit(); 93 } approximation_scaleconv_stroke94 float approximation_scale() const 95 { 96 return base_type::generator().approximation_scale(); 97 } shortenconv_stroke98 void shorten(float s) 99 { 100 base_type::generator().shorten(s); 101 } shortenconv_stroke102 float shorten() const 103 { 104 return base_type::generator().shorten(); 105 } 106 private: 107 conv_stroke(const conv_stroke<VertexSource, Markers>&); 108 const conv_stroke<VertexSource, Markers>& 109 operator = (const conv_stroke<VertexSource, Markers>&); 110 }; 111 } 112 } // namespace pdfium 113 #endif 114