2020-01-18 18:20:16 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
2020-06-05 23:21:56 -04:00
|
|
|
#include <stdint.h>
|
2021-03-18 17:08:11 -04:00
|
|
|
#include <stddef.h>
|
2020-01-18 18:20:16 -05:00
|
|
|
|
|
|
|
|
namespace PortabilityLayer
|
|
|
|
|
{
|
|
|
|
|
struct RGBAColor;
|
|
|
|
|
|
2020-06-05 23:21:56 -04:00
|
|
|
struct AntiAliasTable
|
2020-01-18 18:20:16 -05:00
|
|
|
{
|
|
|
|
|
// Striped 256x16 because constant background color is more likely than constant sample
|
|
|
|
|
uint8_t m_aaTranslate[256][16];
|
|
|
|
|
|
2021-04-15 19:32:15 -04:00
|
|
|
void GenerateForPalette(const RGBAColor &baseColor, const RGBAColor *colors, size_t numColors);
|
2021-03-27 03:01:43 -04:00
|
|
|
void GenerateForPaletteFast(const RGBAColor &baseColor);
|
2021-04-15 19:32:15 -04:00
|
|
|
void GenerateForSimpleScale(uint8_t colorChannel);
|
2020-01-18 18:20:16 -05:00
|
|
|
};
|
|
|
|
|
}
|