Home | History | Annotate | Download | only in agg23
      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: mcseem (at) antigrain.com
     13 //          mcseemagg (at) yahoo.com
     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 agg
     26 {
     27 template<class VertexSource, class Markers = null_markers>
     28 struct conv_stroke :
     29         public conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers> {
     30     typedef Markers marker_type;
     31     typedef conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers> base_type;
     32     conv_stroke(VertexSource& vs) :
     33         conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers>(vs)
     34     {
     35     }
     36     void line_cap(line_cap_e lc)
     37     {
     38         base_type::generator().line_cap(lc);
     39     }
     40     void line_join(line_join_e lj)
     41     {
     42         base_type::generator().line_join(lj);
     43     }
     44     void inner_join(inner_join_e ij)
     45     {
     46         base_type::generator().inner_join(ij);
     47     }
     48     line_cap_e   line_cap()   const
     49     {
     50         return base_type::generator().line_cap();
     51     }
     52     line_join_e  line_join()  const
     53     {
     54         return base_type::generator().line_join();
     55     }
     56     inner_join_e inner_join() const
     57     {
     58         return base_type::generator().inner_join();
     59     }
     60     void width(FX_FLOAT w)
     61     {
     62         base_type::generator().width(w);
     63     }
     64     void miter_limit(FX_FLOAT ml)
     65     {
     66         base_type::generator().miter_limit(ml);
     67     }
     68     void miter_limit_theta(FX_FLOAT t)
     69     {
     70         base_type::generator().miter_limit_theta(t);
     71     }
     72     void inner_miter_limit(FX_FLOAT ml)
     73     {
     74         base_type::generator().inner_miter_limit(ml);
     75     }
     76     void approximation_scale(FX_FLOAT as)
     77     {
     78         base_type::generator().approximation_scale(as);
     79     }
     80     FX_FLOAT width() const
     81     {
     82         return base_type::generator().width();
     83     }
     84     FX_FLOAT miter_limit() const
     85     {
     86         return base_type::generator().miter_limit();
     87     }
     88     FX_FLOAT inner_miter_limit() const
     89     {
     90         return base_type::generator().inner_miter_limit();
     91     }
     92     FX_FLOAT approximation_scale() const
     93     {
     94         return base_type::generator().approximation_scale();
     95     }
     96     void shorten(FX_FLOAT s)
     97     {
     98         base_type::generator().shorten(s);
     99     }
    100     FX_FLOAT shorten() const
    101     {
    102         return base_type::generator().shorten();
    103     }
    104 private:
    105     conv_stroke(const conv_stroke<VertexSource, Markers>&);
    106     const conv_stroke<VertexSource, Markers>&
    107     operator = (const conv_stroke<VertexSource, Markers>&);
    108 };
    109 }
    110 #endif
    111