agg_conv_contour.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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_CONTOUR_INCLUDED
  20. #define AGG_CONV_CONTOUR_INCLUDED
  21. #include "agg_basics.h"
  22. #include "agg_vcgen_contour.h"
  23. #include "agg_conv_adaptor_vcgen.h"
  24. namespace agg
  25. {
  26. //-----------------------------------------------------------conv_contour
  27. template<class VertexSource>
  28. struct conv_contour : public conv_adaptor_vcgen<VertexSource, vcgen_contour>
  29. {
  30. typedef conv_adaptor_vcgen<VertexSource, vcgen_contour> base_type;
  31. conv_contour(VertexSource& vs) :
  32. conv_adaptor_vcgen<VertexSource, vcgen_contour>(vs)
  33. {
  34. }
  35. void line_join(line_join_e lj) { base_type::generator().line_join(lj); }
  36. void inner_join(inner_join_e ij) { base_type::generator().inner_join(ij); }
  37. void width(double w) { base_type::generator().width(w); }
  38. void miter_limit(double ml) { base_type::generator().miter_limit(ml); }
  39. void miter_limit_theta(double t) { base_type::generator().miter_limit_theta(t); }
  40. void inner_miter_limit(double ml) { base_type::generator().inner_miter_limit(ml); }
  41. void approximation_scale(double as) { base_type::generator().approximation_scale(as); }
  42. void auto_detect_orientation(bool v) { base_type::generator().auto_detect_orientation(v); }
  43. line_join_e line_join() const { return base_type::generator().line_join(); }
  44. inner_join_e inner_join() const { return base_type::generator().inner_join(); }
  45. double width() const { return base_type::generator().width(); }
  46. double miter_limit() const { return base_type::generator().miter_limit(); }
  47. double inner_miter_limit() const { return base_type::generator().inner_miter_limit(); }
  48. double approximation_scale() const { return base_type::generator().approximation_scale(); }
  49. bool auto_detect_orientation() const { return base_type::generator().auto_detect_orientation(); }
  50. private:
  51. conv_contour(const conv_contour<VertexSource>&);
  52. const conv_contour<VertexSource>&
  53. operator = (const conv_contour<VertexSource>&);
  54. };
  55. }
  56. #endif