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  porytiles
 
namespace  porytiles::details
 

Functions

template<SupportsTransparency PixelType, typename TransparencyPredicate >
ShapeTile< ColorIndexporytiles::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 ColorType, std::size_t N = 0, typename TransparencyPredicate >
PixelTile< IndexPixelporytiles::details::index_tile_from_color_tile_impl (const PixelTile< ColorType > &tile, const Palette< ColorType, N > &palette, TransparencyPredicate is_transparent_pred)
 Helper function implementing the core color-to-index tile conversion logic.
 
template<SupportsTransparency ColorType, std::size_t N = 0>
PixelTile< ColorType > porytiles::details::color_tile_from_index_tile_impl (const PixelTile< IndexPixel > &index_tile, const Palette< ColorType, N > &palette, const ColorType &transparent_color)
 Helper function implementing the core index-to-color tile conversion logic.
 
template<SupportsTransparency PixelType>
requires requires(const PixelType &p) { p.is_transparent(); }
ShapeTile< ColorIndexporytiles::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< ColorIndexporytiles::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 > porytiles::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 > porytiles::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.
 
template<SupportsTransparency ColorType, std::size_t N = 0>
requires requires(const ColorType &c) { c.is_transparent(); }
PixelTile< ColorType > porytiles::color_tile_from_index_tile (const PixelTile< IndexPixel > &index_tile, const Palette< ColorType, N > &palette)
 Converts a PixelTile<IndexPixel> to a PixelTile<ColorType> using a palette (intrinsic transparency).
 
template<SupportsTransparency ColorType, std::size_t N = 0>
requires requires(const ColorType &c) { c.is_transparent(c); }
PixelTile< ColorType > porytiles::color_tile_from_index_tile (const PixelTile< IndexPixel > &index_tile, const Palette< ColorType, N > &palette, const ColorType &extrinsic)
 Converts a PixelTile<IndexPixel> to a PixelTile<ColorType> using a palette (extrinsic transparency).
 
template<SupportsTransparency ColorType, std::size_t N = 0>
requires requires(const ColorType &c) { c.is_transparent(c); }
PixelTile< IndexPixelporytiles::index_tile_from_color_tile (const PixelTile< ColorType > &tile, const Palette< ColorType, N > &palette)
 Converts a PixelTile<ColorType> to indexed form using a palette (intrinsic transparency only).
 
template<SupportsTransparency ColorType, std::size_t N = 0>
requires requires(const ColorType &c) { c.is_transparent(c); }
PixelTile< IndexPixelporytiles::index_tile_from_color_tile (const PixelTile< ColorType > &tile, const Palette< ColorType, N > &palette, const ColorType &extrinsic)
 Converts a PixelTile<ColorType> to indexed form using a palette (extrinsic transparency).