vfs: check userland buffers before reading them.
[haiku.git] / headers / libs / agg / agg_arrowhead.h
blob5e029ddee0314ce9882880f901aee5591ca4afff
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 // Simple arrowhead/arrowtail generator
18 //----------------------------------------------------------------------------
19 #ifndef AGG_ARROWHEAD_INCLUDED
20 #define AGG_ARROWHEAD_INCLUDED
22 #include "agg_basics.h"
24 namespace agg
27 //===============================================================arrowhead
29 // See implementation agg_arrowhead.cpp
31 class arrowhead
33 public:
34 arrowhead();
36 void head(double d1, double d2, double d3, double d4)
38 m_head_d1 = d1;
39 m_head_d2 = d2;
40 m_head_d3 = d3;
41 m_head_d4 = d4;
42 m_head_flag = true;
45 void head() { m_head_flag = true; }
46 void no_head() { m_head_flag = false; }
48 void tail(double d1, double d2, double d3, double d4)
50 m_tail_d1 = d1;
51 m_tail_d2 = d2;
52 m_tail_d3 = d3;
53 m_tail_d4 = d4;
54 m_tail_flag = true;
57 void tail() { m_tail_flag = true; }
58 void no_tail() { m_tail_flag = false; }
60 void rewind(unsigned path_id);
61 unsigned vertex(double* x, double* y);
63 private:
64 double m_head_d1;
65 double m_head_d2;
66 double m_head_d3;
67 double m_head_d4;
68 double m_tail_d1;
69 double m_tail_d2;
70 double m_tail_d3;
71 double m_tail_d4;
72 bool m_head_flag;
73 bool m_tail_flag;
74 double m_coord[16];
75 unsigned m_cmd[8];
76 unsigned m_curr_id;
77 unsigned m_curr_coord;
82 #endif