apply_rasterizer.hpp 747 B

12345678910111213141516171819202122232425262728
  1. #ifndef BOOST_GIL_EXTENSION_RASTERIZATION_APPLY_RASTERIZER
  2. #define BOOST_GIL_EXTENSION_RASTERIZATION_APPLY_RASTERIZER
  3. namespace boost { namespace gil {
  4. namespace detail {
  5. template <typename View, typename Rasterizer, typename Pixel, typename Tag>
  6. struct apply_rasterizer_op
  7. {
  8. void operator()(
  9. View const& view, Rasterizer const& rasterizer, Pixel const& pixel);
  10. };
  11. } // namespace detail
  12. template <typename View, typename Rasterizer, typename Pixel>
  13. void apply_rasterizer(
  14. View const& view, Rasterizer const& rasterizer, Pixel const& pixel)
  15. {
  16. using tag_t = typename Rasterizer::type;
  17. detail::apply_rasterizer_op<View, Rasterizer, Pixel, tag_t>{}(
  18. view, rasterizer, pixel);
  19. }
  20. }} // namespace boost::gil
  21. #endif