diff options
author | Matthias Clasen <mclasen@redhat.com> | 2023-01-18 23:00:41 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2023-01-20 15:20:22 -0500 |
commit | 67eeed44cd5499b654088eb7e6c964d60a011139 (patch) | |
tree | 4148fe9dfc2a56719238c7c2e9d622aa7b03cd13 /src/cairo-types-private.h | |
parent | 2e4afeb4bc88a9eefdf926f547776466493f6832 (diff) | |
download | cairo-67eeed44cd5499b654088eb7e6c964d60a011139.tar.gz |
Add a custom palette to font options
Add a way to define a custom color palette as
part of cairo_font_options_t. To use the custom
palette when rendering color fonts, set the palette
index to CAIRO_COLOR_PALETTE_CUSTOM.
Diffstat (limited to 'src/cairo-types-private.h')
-rw-r--r-- | src/cairo-types-private.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cairo-types-private.h b/src/cairo-types-private.h index a9980f3b9..736a1bcb3 100644 --- a/src/cairo-types-private.h +++ b/src/cairo-types-private.h @@ -187,6 +187,11 @@ typedef enum _cairo_round_glyph_positions { CAIRO_ROUND_GLYPH_POS_OFF } cairo_round_glyph_positions_t; +typedef struct { + unsigned int index; + double red, green, blue, alpha; +} cairo_palette_color_t; + struct _cairo_font_options { cairo_antialias_t antialias; cairo_subpixel_order_t subpixel_order; @@ -197,6 +202,8 @@ struct _cairo_font_options { char *variations; cairo_color_mode_t color_mode; unsigned int palette_index; + cairo_palette_color_t *custom_palette; + unsigned int custom_palette_size; }; struct _cairo_glyph_text_info { |