1 2//---------------------------------------------------------------------------- 3// Anti-Grain Geometry - Version 2.3 4// Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) 5// 6// Permission to copy, use, modify, sell and distribute this software 7// is granted provided this copyright notice appears in all copies. 8// This software is provided "as is" without express or implied 9// warranty, and with no claim as to its suitability for any purpose. 10// 11//---------------------------------------------------------------------------- 12// Contact: mcseem@antigrain.com 13// mcseemagg@yahoo.com 14// http://www.antigrain.com 15//---------------------------------------------------------------------------- 16// 17// conv_dash 18// 19//---------------------------------------------------------------------------- 20#ifndef AGG_CONV_DASH_INCLUDED 21#define AGG_CONV_DASH_INCLUDED 22#include "agg_basics.h" 23#include "agg_vcgen_dash.h" 24#include "agg_conv_adaptor_vcgen.h" 25namespace agg 26{ 27template<class VertexSource, class Markers = null_markers> 28struct conv_dash : public conv_adaptor_vcgen<VertexSource, vcgen_dash, Markers> { 29 typedef Markers marker_type; 30 typedef conv_adaptor_vcgen<VertexSource, vcgen_dash, Markers> base_type; 31 conv_dash(VertexSource& vs) : 32 conv_adaptor_vcgen<VertexSource, vcgen_dash, Markers>(vs) 33 { 34 } 35 void remove_all_dashes() 36 { 37 base_type::generator().remove_all_dashes(); 38 } 39 void add_dash(FX_FLOAT dash_len, FX_FLOAT gap_len) 40 { 41 base_type::generator().add_dash(dash_len, gap_len); 42 } 43 void dash_start(FX_FLOAT ds) 44 { 45 base_type::generator().dash_start(ds); 46 } 47 void shorten(FX_FLOAT s) 48 { 49 base_type::generator().shorten(s); 50 } 51 double shorten() const 52 { 53 return base_type::generator().shorten(); 54 } 55private: 56 conv_dash(const conv_dash<VertexSource, Markers>&); 57 const conv_dash<VertexSource, Markers>& 58 operator = (const conv_dash<VertexSource, Markers>&); 59}; 60} 61#endif 62