Porytiles
Loading...
Searching...
No Matches
tile_converters.hpp File Reference
Include dependency graph for tile_converters.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  porytiles2
 
namespace  porytiles2::details
 

Functions

template<SupportsTransparency PixelType, typename TransparencyPredicate >
ShapeTile< ColorIndexporytiles2::details::from_pixel_tile_impl (const PixelTile< PixelType > &pixel_tile, const ColorIndexMap< PixelType > &color_index_map, TransparencyPredicate is_transparent_pred)
 Helper function implementing the core PixelTile to ShapeTile conversion logic.
 
template<SupportsTransparency PixelType>
requires requires(const PixelType &p) { p.is_transparent(); }
ShapeTile< ColorIndexporytiles2::from_pixel_tile (const PixelTile< PixelType > &pixel_tile, const ColorIndexMap< PixelType > &color_index_map)
 Converts a PixelTile to a ShapeTile<ColorIndex> using a ColorIndexMap (intrinsic transparency).
 
template<SupportsTransparency PixelType>
requires requires(const PixelType &p) { p.is_transparent(p); }
ShapeTile< ColorIndexporytiles2::from_pixel_tile (const PixelTile< PixelType > &pixel_tile, const ColorIndexMap< PixelType > &color_index_map, const PixelType &extrinsic)
 Converts a PixelTile to a ShapeTile<ColorIndex> using a ColorIndexMap (extrinsic transparency).
 
template<SupportsTransparency PixelType>
PixelTile< PixelType > porytiles2::from_shape_tile (const ShapeTile< ColorIndex > &shape_tile, const ColorIndexMap< PixelType > &color_index_map)
 Converts a ShapeTile<ColorIndex> to a PixelTile using a ColorIndexMap.
 
template<SupportsTransparency PixelType>
ShapeTile< PixelType > porytiles2::shape_tile_to_pixel_colors (const ShapeTile< ColorIndex > &shape_tile, const ColorIndexMap< PixelType > &color_index_map)
 Converts a ShapeTile<ColorIndex> to a ShapeTile<PixelType> using a ColorIndexMap.