• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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@antigrain.com
13 //          mcseemagg@yahoo.com
14 //          http://www.antigrain.com
15 //----------------------------------------------------------------------------
16 //
17 // conv_dash
18 //
19 //----------------------------------------------------------------------------
20 #ifndef AGG_CONV_DASH_INCLUDED
21 #define AGG_CONV_DASH_INCLUDED
22 #include "agg_basics.h"
23 #include "agg_vcgen_dash.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_dash : public conv_adaptor_vcgen<VertexSource, vcgen_dash, Markers> {
31     typedef Markers marker_type;
32     typedef conv_adaptor_vcgen<VertexSource, vcgen_dash, Markers> base_type;
conv_dashconv_dash33     conv_dash(VertexSource& vs) :
34         conv_adaptor_vcgen<VertexSource, vcgen_dash, Markers>(vs)
35     {
36     }
remove_all_dashesconv_dash37     void remove_all_dashes()
38     {
39         base_type::generator().remove_all_dashes();
40     }
add_dashconv_dash41     void add_dash(float dash_len, float gap_len)
42     {
43         base_type::generator().add_dash(dash_len, gap_len);
44     }
dash_startconv_dash45     void dash_start(float ds)
46     {
47         base_type::generator().dash_start(ds);
48     }
shortenconv_dash49     void shorten(float s)
50     {
51         base_type::generator().shorten(s);
52     }
shortenconv_dash53     double shorten() const
54     {
55         return base_type::generator().shorten();
56     }
57 private:
58     conv_dash(const conv_dash<VertexSource, Markers>&);
59     const conv_dash<VertexSource, Markers>&
60     operator = (const conv_dash<VertexSource, Markers>&);
61 };
62 }
63 }  // namespace pdfium
64 #endif
65