diff options
author | Mattias Andrée <maandree@kth.se> | 2023-01-22 02:00:18 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-01-22 02:00:18 +0100 |
commit | c326ecac54782734d5e27dc82b14d375238d1f79 (patch) | |
tree | c7af5105aa5edb3075bbc0487a8b6091d4652414 /libglitter.h | |
parent | m (diff) | |
download | libglitter-c326ecac54782734d5e27dc82b14d375238d1f79.tar.gz libglitter-c326ecac54782734d5e27dc82b14d375238d1f79.tar.bz2 libglitter-c326ecac54782734d5e27dc82b14d375238d1f79.tar.xz |
Add libglitter_split_uint{64,32}_raster
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | libglitter.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/libglitter.h b/libglitter.h index 826ca16..dfb9e30 100644 --- a/libglitter.h +++ b/libglitter.h @@ -158,6 +158,39 @@ void libglitter_compose_uint8(uint8_t **, const uint8_t *restrict, size_t, size_ /** + * Splits a `uint64_t` raster into one `uint16_t` raster per channel + * + * @param rasters Output array for the rasters, they will be in the + * order (0) red, (1) green, (2) blue + * @param alphap Output parameter for the alpha mask rasters, or `NULL` + * @param raster The raster that is being split + * @param red The value `0xFFFF` shifted such that value + * expresses pure red (closest primary colour) + * @param green The value `0xFFFF` shifted such that value + * expresses pure green (closest primary colour) + * @param blue The value `0xFFFF` shifted such that value + * expresses pure blue (closest primary colour) + */ +void libglitter_split_uint64_raster(uint16_t *[3], uint16_t **, uint64_t *, uint64_t, uint64_t, uint64_t); + +/** + * Splits a `uint32_t` raster into one `uint8_t` raster per channel + * + * @param rasters Output array for the rasters, they will be in the + * order (0) red, (1) green, (2) blue + * @param alphap Output parameter for the alpha mask rasters, or `NULL` + * @param raster The raster that is being split + * @param red The value `0xFF` shifted such that value + * expresses pure red (closest primary colour) + * @param green The value `0xFF` shifted such that value + * expresses pure green (closest primary colour) + * @param blue The value `0xFF` shifted such that value + * expresses pure blue (closest primary colour) + */ +void libglitter_split_uint32_raster(uint8_t *[3], uint8_t **, uint32_t *, uint32_t, uint32_t, uint32_t); + + +/** * Transform rasters from fully using subpixel rendering to * balance between subpixel rendering and greyscale antialiasing * |