btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / libs / agg / agg_vcgen_markers_term.h
blobee1e74e3eb4746c03cfccad627de54cf3053a0e1
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 //----------------------------------------------------------------------------
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"
22 namespace agg
25 //======================================================vcgen_markers_term
27 // See Implemantation agg_vcgen_markers_term.cpp
28 // Terminal markers generator (arrowhead/arrowtail)
30 //------------------------------------------------------------------------
31 class vcgen_markers_term
33 public:
34 vcgen_markers_term() : m_curr_id(0), m_curr_idx(0) {}
36 // Vertex Generator Interface
37 void remove_all();
38 void add_vertex(double x, double y, unsigned cmd);
40 // Vertex Source Interface
41 void rewind(unsigned path_id);
42 unsigned vertex(double* x, double* y);
44 private:
45 vcgen_markers_term(const vcgen_markers_term&);
46 const vcgen_markers_term& operator = (const vcgen_markers_term&);
48 struct coord_type
50 double x, y;
52 coord_type() {}
53 coord_type(double x_, double y_) : x(x_), y(y_) {}
56 typedef pod_bvector<coord_type, 6> coord_storage;
58 coord_storage m_markers;
59 unsigned m_curr_id;
60 unsigned m_curr_idx;
66 #endif