Anti-Grain Geometry - AGG (libagg)
2.5
|
00001 //---------------------------------------------------------------------------- 00002 // Anti-Grain Geometry (AGG) - Version 2.5 00003 // A high quality rendering engine for C++ 00004 // Copyright (C) 2002-2006 Maxim Shemanarev 00005 // Contact: mcseem@antigrain.com 00006 // mcseemagg@yahoo.com 00007 // http://antigrain.com 00008 // 00009 // AGG is free software; you can redistribute it and/or 00010 // modify it under the terms of the GNU General Public License 00011 // as published by the Free Software Foundation; either version 2 00012 // of the License, or (at your option) any later version. 00013 // 00014 // AGG is distributed in the hope that it will be useful, 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 // GNU General Public License for more details. 00018 // 00019 // You should have received a copy of the GNU General Public License 00020 // along with AGG; if not, write to the Free Software 00021 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 00022 // MA 02110-1301, USA. 00023 //---------------------------------------------------------------------------- 00024 00025 #ifndef AGG_VCGEN_MARKERS_TERM_INCLUDED 00026 #define AGG_VCGEN_MARKERS_TERM_INCLUDED 00027 00028 #include "agg_basics.h" 00029 #include "agg_vertex_sequence.h" 00030 00031 namespace agg 00032 { 00033 00034 //======================================================vcgen_markers_term 00035 // 00036 // See Implemantation agg_vcgen_markers_term.cpp 00037 // Terminal markers generator (arrowhead/arrowtail) 00038 // 00039 //------------------------------------------------------------------------ 00040 class vcgen_markers_term 00041 { 00042 public: 00043 vcgen_markers_term() : m_curr_id(0), m_curr_idx(0) {} 00044 00045 // Vertex Generator Interface 00046 void remove_all(); 00047 void add_vertex(double x, double y, unsigned cmd); 00048 00049 // Vertex Source Interface 00050 void rewind(unsigned path_id); 00051 unsigned vertex(double* x, double* y); 00052 00053 private: 00054 vcgen_markers_term(const vcgen_markers_term&); 00055 const vcgen_markers_term& operator = (const vcgen_markers_term&); 00056 00057 struct coord_type 00058 { 00059 double x, y; 00060 00061 coord_type() {} 00062 coord_type(double x_, double y_) : x(x_), y(y_) {} 00063 }; 00064 00065 typedef pod_bvector<coord_type, 6> coord_storage; 00066 00067 coord_storage m_markers; 00068 unsigned m_curr_id; 00069 unsigned m_curr_idx; 00070 }; 00071 00072 00073 } 00074 00075 #endif