vfs: check userland buffers before reading them.
[haiku.git] / headers / libs / agg / agg_conv_dash.h
blob23c13ad0ab30f2d49fbadff6e3095b73adff961e
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 // conv_dash
18 //----------------------------------------------------------------------------
19 #ifndef AGG_CONV_DASH_INCLUDED
20 #define AGG_CONV_DASH_INCLUDED
22 #include "agg_basics.h"
23 #include "agg_vcgen_dash.h"
24 #include "agg_conv_adaptor_vcgen.h"
26 namespace agg
29 //---------------------------------------------------------------conv_dash
30 template<class VertexSource, class Markers=null_markers>
31 struct conv_dash : public conv_adaptor_vcgen<VertexSource, vcgen_dash, Markers>
33 typedef Markers marker_type;
34 typedef conv_adaptor_vcgen<VertexSource, vcgen_dash, Markers> base_type;
36 conv_dash(VertexSource& vs) :
37 conv_adaptor_vcgen<VertexSource, vcgen_dash, Markers>(vs)
41 void remove_all_dashes()
43 base_type::generator().remove_all_dashes();
46 void add_dash(double dash_len, double gap_len)
48 base_type::generator().add_dash(dash_len, gap_len);
51 void dash_start(double ds)
53 base_type::generator().dash_start(ds);
56 void shorten(double s) { base_type::generator().shorten(s); }
57 double shorten() const { return base_type::generator().shorten(); }
59 private:
60 conv_dash(const conv_dash<VertexSource, Markers>&);
61 const conv_dash<VertexSource, Markers>&
62 operator = (const conv_dash<VertexSource, Markers>&);
68 #endif