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_CONV_SHORTEN_PATH_INCLUDED
17 #define AGG_CONV_SHORTEN_PATH_INCLUDED
19 #include "agg_basics.h"
20 #include "agg_conv_adaptor_vcgen.h"
21 #include "agg_vcgen_vertex_sequence.h"
26 //=======================================================conv_shorten_path
27 template<class VertexSource
> class conv_shorten_path
:
28 public conv_adaptor_vcgen
<VertexSource
, vcgen_vertex_sequence
>
31 typedef conv_adaptor_vcgen
<VertexSource
, vcgen_vertex_sequence
> base_type
;
33 conv_shorten_path(VertexSource
& vs
) :
34 conv_adaptor_vcgen
<VertexSource
, vcgen_vertex_sequence
>(vs
)
38 void shorten(double s
) { base_type::generator().shorten(s
); }
39 double shorten() const { return base_type::generator().shorten(); }
42 conv_shorten_path(const conv_shorten_path
<VertexSource
>&);
43 const conv_shorten_path
<VertexSource
>&
44 operator = (const conv_shorten_path
<VertexSource
>&);