|
Porytiles
|
Result type for palette matching operations. More...
#include <palette_matchers.hpp>
Public Attributes | |
| bool | is_covered = false |
| True if the palette covers all non-transparent colors in the tile, false otherwise. | |
| std::set< ColorType > | missing_colors |
| The set of non-transparent colors from the tile that are NOT present in the palette. | |
| std::set< ColorType > | covered_colors |
| The set of non-transparent colors from the tile that ARE present in the palette. | |
| std::vector< std::size_t > | uncovered_pixel_indices |
| The linear indices of tile pixels whose colors are not covered by the palette. | |
| unsigned int | pal_index = 0 |
| The palette index of the match, useful in batch operations. | |
Result type for palette matching operations.
PaletteMatchResult encapsulates the outcome of matching a PixelTile against a Palette. It indicates whether the palette completely covers all non-transparent colors in the tile, and if not, which colors are missing and which are present. It also tracks the specific pixel positions that are not covered by the palette.
| ColorType | The color type of the palette and tile |
Definition at line 23 of file palette_matchers.hpp.
| std::set<ColorType> porytiles2::PaletteMatchResult< ColorType >::covered_colors |
The set of non-transparent colors from the tile that ARE present in the palette.
Definition at line 37 of file palette_matchers.hpp.
| bool porytiles2::PaletteMatchResult< ColorType >::is_covered = false |
True if the palette covers all non-transparent colors in the tile, false otherwise.
Definition at line 27 of file palette_matchers.hpp.
| std::set<ColorType> porytiles2::PaletteMatchResult< ColorType >::missing_colors |
The set of non-transparent colors from the tile that are NOT present in the palette.
Definition at line 32 of file palette_matchers.hpp.
| unsigned int porytiles2::PaletteMatchResult< ColorType >::pal_index = 0 |
The palette index of the match, useful in batch operations.
Definition at line 52 of file palette_matchers.hpp.
| std::vector<std::size_t> porytiles2::PaletteMatchResult< ColorType >::uncovered_pixel_indices |
The linear indices of tile pixels whose colors are not covered by the palette.
This vector contains the indices [0, 64) of pixels in the tile that have non-transparent colors not present in the palette. These indices can be converted to (row, col) coordinates using tile::index_to_row_col() if needed. Empty if all non-transparent pixels are covered by the palette.
Definition at line 47 of file palette_matchers.hpp.