1 //----------------------------------------------------------------------------
2 // Anti-Grain Geometry - Version 2.3
3 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com)
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.
10 //----------------------------------------------------------------------------
11 // Contact: mcseem@antigrain.com
12 // mcseemagg@yahoo.com
13 // http://www.antigrain.com
14 //----------------------------------------------------------------------------
16 #ifndef AGG_VCGEN_MARKERS_TERM_INCLUDED
17 #define AGG_VCGEN_MARKERS_TERM_INCLUDED
19 #include "agg_basics.h"
20 #include "agg_vertex_sequence.h"
21 #include "agg_vertex_iterator.h"
26 //======================================================vcgen_markers_term
28 // See Implemantation agg_vcgen_markers_term.cpp
29 // Terminal markers generator (arrowhead/arrowtail)
31 //------------------------------------------------------------------------
32 class vcgen_markers_term
35 vcgen_markers_term() : m_curr_id(0), m_curr_idx(0) {}
37 // Vertex Generator Interface
39 void add_vertex(double x
, double y
, unsigned cmd
);
41 // Vertex Source Interface
42 void rewind(unsigned id
);
43 unsigned vertex(double* x
, double* y
);
45 typedef vcgen_markers_term source_type
;
46 typedef vertex_iterator
<source_type
> iterator
;
47 iterator
begin(unsigned id
) { return iterator(*this, id
); }
48 iterator
end() { return iterator(path_cmd_stop
); }
51 vcgen_markers_term(const vcgen_markers_term
&);
52 const vcgen_markers_term
& operator = (const vcgen_markers_term
&);
59 coord_type(double x_
, double y_
) : x(x_
), y(y_
) {}
62 typedef pod_deque
<coord_type
, 6> coord_storage
;
64 coord_storage m_markers
;