-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added apply_rasterizer() free function (#695)
This PR implements the gil::apply_rasterizer() free function mentioned in #680.
- Loading branch information
1 parent
adddbec
commit d5492e1
Showing
14 changed files
with
240 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
include/boost/gil/extension/rasterization/apply_rasterizer.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef BOOST_GIL_EXTENSION_RASTERIZATION_APPLY_RASTERIZER | ||
#define BOOST_GIL_EXTENSION_RASTERIZATION_APPLY_RASTERIZER | ||
|
||
namespace boost { namespace gil { | ||
|
||
namespace detail { | ||
|
||
template <typename View, typename Rasterizer, typename Pixel, typename Tag> | ||
struct apply_rasterizer_op | ||
{ | ||
void operator()( | ||
View const& view, Rasterizer const& rasterizer, Pixel const& pixel); | ||
}; | ||
|
||
} // namespace detail | ||
|
||
template <typename View, typename Rasterizer, typename Pixel> | ||
void apply_rasterizer( | ||
View const& view, Rasterizer const& rasterizer, Pixel const& pixel) | ||
{ | ||
using tag_t = typename Rasterizer::type; | ||
detail::apply_rasterizer_op<View, Rasterizer, Pixel, tag_t>{}( | ||
view, rasterizer, pixel); | ||
} | ||
|
||
}} // namespace boost::gil | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.