1 //----------------------------------------------------------------------------
2 // Anti-Grain Geometry - Version 2.4
3 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com)
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.
10 //----------------------------------------------------------------------------
11 // Contact: mcseem@antigrain.com
12 // mcseemagg@yahoo.com
13 // http://www.antigrain.com
14 //----------------------------------------------------------------------------
16 #ifndef AGG_VPGEN_CLIP_POLYLINE_INCLUDED
17 #define AGG_VPGEN_CLIP_POLYLINE_INCLUDED
19 #include "agg_basics.h"
24 //======================================================vpgen_clip_polyline
26 // See Implementation agg_vpgen_clip_polyline.cpp
28 class vpgen_clip_polyline
31 vpgen_clip_polyline() :
32 m_clip_box(0, 0, 1, 1),
41 void clip_box(double x1
, double y1
, double x2
, double y2
)
47 m_clip_box
.normalize();
50 double x1() const { return m_clip_box
.x1
; }
51 double y1() const { return m_clip_box
.y1
; }
52 double x2() const { return m_clip_box
.x2
; }
53 double y2() const { return m_clip_box
.y2
; }
55 static bool auto_close() { return false; }
56 static bool auto_unclose() { return true; }
59 void move_to(double x
, double y
);
60 void line_to(double x
, double y
);
61 unsigned vertex(double* x
, double* y
);
70 unsigned m_num_vertices
;