agg_conv_stroke.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. //----------------------------------------------------------------------------
  15. //
  16. // conv_stroke
  17. //
  18. //----------------------------------------------------------------------------
  19. #ifndef AGG_CONV_STROKE_INCLUDED
  20. #define AGG_CONV_STROKE_INCLUDED
  21. #include "agg_basics.h"
  22. #include "agg_vcgen_stroke.h"
  23. #include "agg_conv_adaptor_vcgen.h"
  24. namespace agg
  25. {
  26. //-------------------------------------------------------------conv_stroke
  27. template<class VertexSource, class Markers=null_markers>
  28. struct conv_stroke :
  29. public conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers>
  30. {
  31. typedef Markers marker_type;
  32. typedef conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers> base_type;
  33. conv_stroke(VertexSource& vs) :
  34. conv_adaptor_vcgen<VertexSource, vcgen_stroke, Markers>(vs)
  35. {
  36. }
  37. void line_cap(line_cap_e lc) { base_type::generator().line_cap(lc); }
  38. void line_join(line_join_e lj) { base_type::generator().line_join(lj); }
  39. void inner_join(inner_join_e ij) { base_type::generator().inner_join(ij); }
  40. line_cap_e line_cap() const { return base_type::generator().line_cap(); }
  41. line_join_e line_join() const { return base_type::generator().line_join(); }
  42. inner_join_e inner_join() const { return base_type::generator().inner_join(); }
  43. void width(double w) { base_type::generator().width(w); }
  44. void miter_limit(double ml) { base_type::generator().miter_limit(ml); }
  45. void miter_limit_theta(double t) { base_type::generator().miter_limit_theta(t); }
  46. void inner_miter_limit(double ml) { base_type::generator().inner_miter_limit(ml); }
  47. void approximation_scale(double as) { base_type::generator().approximation_scale(as); }
  48. double width() const { return base_type::generator().width(); }
  49. double miter_limit() const { return base_type::generator().miter_limit(); }
  50. double inner_miter_limit() const { return base_type::generator().inner_miter_limit(); }
  51. double approximation_scale() const { return base_type::generator().approximation_scale(); }
  52. void shorten(double s) { base_type::generator().shorten(s); }
  53. double shorten() const { return base_type::generator().shorten(); }
  54. private:
  55. conv_stroke(const conv_stroke<VertexSource, Markers>&);
  56. const conv_stroke<VertexSource, Markers>&
  57. operator = (const conv_stroke<VertexSource, Markers>&);
  58. };
  59. }
  60. #endif