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_dash
17//
18//----------------------------------------------------------------------------
19#ifndef AGG_CONV_DASH_INCLUDED
20#define AGG_CONV_DASH_INCLUDED
21
22#include "agg_basics.h"
23#include "agg_vcgen_dash.h"
24#include "agg_conv_adaptor_vcgen.h"
25
26namespace agg
27{
28
29    //---------------------------------------------------------------conv_dash
30    template<class VertexSource, class Markers=null_markers>
31    struct conv_dash : public conv_adaptor_vcgen<VertexSource, vcgen_dash, Markers>
32    {
33        typedef Markers marker_type;
34        typedef conv_adaptor_vcgen<VertexSource, vcgen_dash, Markers> base_type;
35
36        conv_dash(VertexSource& vs) :
37            conv_adaptor_vcgen<VertexSource, vcgen_dash, Markers>(vs)
38        {
39        }
40
41        void remove_all_dashes()
42        {
43            base_type::generator().remove_all_dashes();
44        }
45
46        void add_dash(double dash_len, double gap_len)
47        {
48            base_type::generator().add_dash(dash_len, gap_len);
49        }
50
51        void dash_start(double ds)
52        {
53            base_type::generator().dash_start(ds);
54        }
55
56        void shorten(double s) { base_type::generator().shorten(s); }
57        double shorten() const { return base_type::generator().shorten(); }
58
59    private:
60        conv_dash(const conv_dash<VertexSource, Markers>&);
61        const conv_dash<VertexSource, Markers>&
62            operator = (const conv_dash<VertexSource, Markers>&);
63    };
64
65
66}
67
68#endif
69