summaryrefslogtreecommitdiff
path: root/src/cairo.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-01-18 23:00:41 -0500
committerMatthias Clasen <mclasen@redhat.com>2023-01-20 15:20:22 -0500
commit67eeed44cd5499b654088eb7e6c964d60a011139 (patch)
tree4148fe9dfc2a56719238c7c2e9d622aa7b03cd13 /src/cairo.h
parent2e4afeb4bc88a9eefdf926f547776466493f6832 (diff)
downloadcairo-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.h')
-rw-r--r--src/cairo.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cairo.h b/src/cairo.h
index 82e2c69d8..7f3461534 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -1485,6 +1485,18 @@ cairo_public void
cairo_font_options_set_color_palette (cairo_font_options_t *options,
unsigned int palette_index);
+cairo_public void
+cairo_font_options_set_custom_palette_color (cairo_font_options_t *options,
+ unsigned int index,
+ double red, double green,
+ double blue, double alpha);
+
+cairo_public cairo_status_t
+cairo_font_options_get_custom_palette_color (cairo_font_options_t *options,
+ unsigned int index,
+ double *red, double *green,
+ double *blue, double *alpha);
+
/* This interface is for dealing with text as text, not caring about the
font object inside the the cairo_t. */