xref: /haiku/headers/libs/agg/agg_conv_stroke.h (revision abd00302375a7845543b09df3fc8cc984de984f8)
139241fe2SDarkWyrm //----------------------------------------------------------------------------
239241fe2SDarkWyrm // Anti-Grain Geometry - Version 2.2
339241fe2SDarkWyrm // Copyright (C) 2002-2004 Maxim Shemanarev (http://www.antigrain.com)
439241fe2SDarkWyrm //
539241fe2SDarkWyrm // Permission to copy, use, modify, sell and distribute this software
639241fe2SDarkWyrm // is granted provided this copyright notice appears in all copies.
739241fe2SDarkWyrm // This software is provided "as is" without express or implied
839241fe2SDarkWyrm // warranty, and with no claim as to its suitability for any purpose.
939241fe2SDarkWyrm //
1039241fe2SDarkWyrm //----------------------------------------------------------------------------
1139241fe2SDarkWyrm // Contact: mcseem@antigrain.com
1239241fe2SDarkWyrm //          mcseemagg@yahoo.com
1339241fe2SDarkWyrm //          http://www.antigrain.com
1439241fe2SDarkWyrm //----------------------------------------------------------------------------
1539241fe2SDarkWyrm //
1639241fe2SDarkWyrm // conv_stroke
1739241fe2SDarkWyrm //
1839241fe2SDarkWyrm //----------------------------------------------------------------------------
1939241fe2SDarkWyrm #ifndef AGG_CONV_STROKE_INCLUDED
2039241fe2SDarkWyrm #define AGG_CONV_STROKE_INCLUDED
2139241fe2SDarkWyrm 
2239241fe2SDarkWyrm #include "agg_basics.h"
2339241fe2SDarkWyrm #include "agg_vcgen_stroke.h"
2439241fe2SDarkWyrm #include "agg_conv_adaptor_vcgen.h"
2539241fe2SDarkWyrm 
2639241fe2SDarkWyrm namespace agg
2739241fe2SDarkWyrm {
2839241fe2SDarkWyrm 
2939241fe2SDarkWyrm     //-------------------------------------------------------------conv_stroke
3039241fe2SDarkWyrm     template<class VertexSource, class Markers=null_markers>
3139241fe2SDarkWyrm     struct conv_stroke :
3239241fe2SDarkWyrm     public conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers>
3339241fe2SDarkWyrm     {
3439241fe2SDarkWyrm         typedef Markers marker_type;
3539241fe2SDarkWyrm         typedef conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers> base_type;
3639241fe2SDarkWyrm 
3739241fe2SDarkWyrm         conv_stroke(VertexSource& vs) :
3839241fe2SDarkWyrm             conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers>(vs)
3939241fe2SDarkWyrm         {
4039241fe2SDarkWyrm         }
4139241fe2SDarkWyrm 
42*abd00302SDarkWyrm         void line_cap(line_cap_e lc)         { base_type::generator().line_cap(lc);  }
43*abd00302SDarkWyrm         void line_join(line_join_e lj)       { base_type::generator().line_join(lj); }
44*abd00302SDarkWyrm         void inner_line_join(line_join_e lj) { base_type::generator().inner_line_join(lj); }
4539241fe2SDarkWyrm 
46*abd00302SDarkWyrm         line_cap_e  line_cap()        const { return base_type::generator().line_cap();  }
47*abd00302SDarkWyrm         line_join_e line_join()       const { return base_type::generator().line_join(); }
48*abd00302SDarkWyrm         line_join_e inner_line_join() const { return base_type::generator().inner_line_join(); }
4939241fe2SDarkWyrm 
5039241fe2SDarkWyrm         void width(double w) { base_type::generator().width(w); }
5139241fe2SDarkWyrm         void miter_limit(double ml) { base_type::generator().miter_limit(ml); }
5239241fe2SDarkWyrm         void miter_limit_theta(double t) { base_type::generator().miter_limit_theta(t); }
53*abd00302SDarkWyrm         void inner_miter_limit(double ml) { base_type::generator().inner_miter_limit(ml); }
5439241fe2SDarkWyrm         void approximation_scale(double as) { base_type::generator().approximation_scale(as); }
5539241fe2SDarkWyrm 
5639241fe2SDarkWyrm         double width() const { return base_type::generator().width(); }
5739241fe2SDarkWyrm         double miter_limit() const { return base_type::generator().miter_limit(); }
58*abd00302SDarkWyrm         double inner_miter_limit() const { return base_type::generator().inner_miter_limit(); }
5939241fe2SDarkWyrm         double approximation_scale() const { return base_type::generator().approximation_scale(); }
6039241fe2SDarkWyrm 
6139241fe2SDarkWyrm         void shorten(double s) { base_type::generator().shorten(s); }
6239241fe2SDarkWyrm         double shorten() const { return base_type::generator().shorten(); }
6339241fe2SDarkWyrm 
6439241fe2SDarkWyrm     private:
6539241fe2SDarkWyrm        conv_stroke(const conv_stroke<VertexSource, Markers>&);
6639241fe2SDarkWyrm        const conv_stroke<VertexSource, Markers>&
6739241fe2SDarkWyrm            operator = (const conv_stroke<VertexSource, Markers>&);
6839241fe2SDarkWyrm 
6939241fe2SDarkWyrm     };
7039241fe2SDarkWyrm 
7139241fe2SDarkWyrm }
7239241fe2SDarkWyrm 
7339241fe2SDarkWyrm #endif
74