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_ARROWHEAD_INCLUDED 00026 #define AGG_ARROWHEAD_INCLUDED 00027 00028 #include "agg_basics.h" 00029 00030 namespace agg 00031 { 00032 00033 //===============================================================arrowhead 00034 // 00035 // See implementation agg_arrowhead.cpp 00036 // 00037 class arrowhead 00038 { 00039 public: 00040 arrowhead(); 00041 00042 void head(double d1, double d2, double d3, double d4) 00043 { 00044 m_head_d1 = d1; 00045 m_head_d2 = d2; 00046 m_head_d3 = d3; 00047 m_head_d4 = d4; 00048 m_head_flag = true; 00049 } 00050 00051 void head() { m_head_flag = true; } 00052 void no_head() { m_head_flag = false; } 00053 00054 void tail(double d1, double d2, double d3, double d4) 00055 { 00056 m_tail_d1 = d1; 00057 m_tail_d2 = d2; 00058 m_tail_d3 = d3; 00059 m_tail_d4 = d4; 00060 m_tail_flag = true; 00061 } 00062 00063 void tail() { m_tail_flag = true; } 00064 void no_tail() { m_tail_flag = false; } 00065 00066 void rewind(unsigned path_id); 00067 unsigned vertex(double* x, double* y); 00068 00069 private: 00070 double m_head_d1; 00071 double m_head_d2; 00072 double m_head_d3; 00073 double m_head_d4; 00074 double m_tail_d1; 00075 double m_tail_d2; 00076 double m_tail_d3; 00077 double m_tail_d4; 00078 bool m_head_flag; 00079 bool m_tail_flag; 00080 double m_coord[16]; 00081 unsigned m_cmd[8]; 00082 unsigned m_curr_id; 00083 unsigned m_curr_coord; 00084 }; 00085 00086 } 00087 00088 #endif