Anti-Grain Geometry Tutorial
agg_vcgen_markers_term.h
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 #ifndef AGG_VCGEN_MARKERS_TERM_INCLUDED
17 #define AGG_VCGEN_MARKERS_TERM_INCLUDED
18 
19 #include "agg_basics.h"
20 #include "agg_vertex_sequence.h"
21 
22 namespace agg
23 {
24 
25  //======================================================vcgen_markers_term
26  //
27  // See Implemantation agg_vcgen_markers_term.cpp
28  // Terminal markers generator (arrowhead/arrowtail)
29  //
30  //------------------------------------------------------------------------
32  {
33  public:
34  vcgen_markers_term() : m_curr_id(0), m_curr_idx(0) {}
35 
36  // Vertex Generator Interface
37  void remove_all();
38  void add_vertex(double x, double y, unsigned cmd);
39 
40  // Vertex Source Interface
41  void rewind(unsigned path_id);
42  unsigned vertex(double* x, double* y);
43 
44  private:
46  const vcgen_markers_term& operator = (const vcgen_markers_term&);
47 
48  struct coord_type
49  {
50  double x, y;
51 
52  coord_type() {}
53  coord_type(double x_, double y_) : x(x_), y(y_) {}
54  };
55 
57 
58  coord_storage m_markers;
59  unsigned m_curr_id;
60  unsigned m_curr_idx;
61  };
62 
63 
64 }
65 
66 #endif
Definition: agg_arc.cpp:24