TileImportOptions struct
#include <Jazz2/Editor/Imaging/TileImages.h>
How an image is made into a tile set, see SliceTileSet().
Public variables
- TileImportColors Colors
- What the colors become.
-
const std::
uint32_t* Palette - Palette for TileImportColors::MatchPalette, or the one TileImportColors::Reduce starts from.
- const bool* Locked
- Entries of Palette that TileImportColors::Reduce keeps, 256 of them, or
nullptrfor none. - bool Dither
- Whether colors between two entries of the palette are mixed by an ordered pattern.
- bool ErrorDiffusion
- Whether colors between two entries of the palette are mixed by spreading the error of each pixel to the pixels right of it and below it (Floyd-Steinberg) instead of the ordered pattern of Dither.
- bool SkipDuplicates
- Whether a tile that is the same as one before it is left out.
- const PngImage* Masks
- Image of the masks in the same layout, solid where it isn't transparent, or
nullptrfor the transparency of the tiles. -
std::
int32_t OffsetX - Pixels of the image left of the first column of tiles, as a sprite sheet with a margin has them.
-
std::
int32_t OffsetY - Pixels of the image above the first row of tiles.
-
std::
int32_t SpacingX - Pixels between two tiles next to each other, as a sprite sheet with gutters has them.
-
std::
int32_t SpacingY - Pixels between two rows of tiles.
- bool UseColorKey
- Whether pixels of ColorKey are transparent, as images without alpha mark it.
-
std::
uint32_t ColorKey - Color of transparent pixels as
R | G << 8 | B << 16, magenta by default. -
std::
uint8_t AlphaThreshold - Alpha from which a pixel is opaque, and a pixel of Masks is solid, 1 to 255.
-
Death::
Containers:: Function<bool(float)> Progress - Gets how far it is from 0 to 1 now and then, it stops when it returns
false, see TileImportError::Cancelled.
Variable documentation
bool Jazz2:: Editor:: TileImportOptions:: ErrorDiffusion
Whether colors between two entries of the palette are mixed by spreading the error of each pixel to the pixels right of it and below it (Floyd-Steinberg) instead of the ordered pattern of Dither.
The error goes over the whole image row by row, so tiles next to each other continue it.