update dev300-m57
[ooovba.git] / agg / inc / agg_vpgen_segmentator.h
blob8a0e3e976c4ed990304b88c14f158b30d27a6eea
1 //----------------------------------------------------------------------------
2 // Anti-Grain Geometry - Version 2.3
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_VPGEN_SEGMENTATOR_INCLUDED
17 #define AGG_VPGEN_SEGMENTATOR_INCLUDED
19 #include <math.h>
20 #include "agg_basics.h"
22 namespace agg
25 //=======================================================vpgen_segmentator
26 //
27 // See Implementation agg_vpgen_segmentator.cpp
29 class vpgen_segmentator
31 public:
32 vpgen_segmentator() : m_approximation_scale(1.0) {}
34 void approximation_scale(double s) { m_approximation_scale = s; }
35 double approximation_scale() const { return m_approximation_scale; }
37 static bool auto_close() { return false; }
38 static bool auto_unclose() { return false; }
40 void reset() { m_cmd = path_cmd_stop; }
41 void move_to(double x, double y);
42 void line_to(double x, double y);
43 unsigned vertex(double* x, double* y);
45 private:
46 double m_approximation_scale;
47 double m_x1;
48 double m_y1;
49 double m_dx;
50 double m_dy;
51 double m_dl;
52 double m_ddl;
53 unsigned m_cmd;
60 #endif