summaryrefslogtreecommitdiff
path: root/src/cairo-scaled-font-private.h
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2023-01-22 13:27:53 +1030
committerAdrian Johnson <ajohnson@redneon.com>2023-01-26 19:49:06 +1030
commite93d175aac6805692d660f1f6444e6b21492e2a7 (patch)
treebc6216ef593280b7b8c3b93af6027e727b8a9555 /src/cairo-scaled-font-private.h
parent0151a67e33f7c96645ae581b31861780b531a7e1 (diff)
downloadcairo-e93d175aac6805692d660f1f6444e6b21492e2a7.tar.gz
Add new cairo_user_scaled_font_get_foreground_source() function
The previous approach using foreground colors in user fonts does not work for gradients since the foreground color is not available at the time of recording. Add a new function cairo_user_scaled_font_get_foreground_source() that can be called by the color render function to retrieve the foreground pattern. Calling this function signals to cairo that the foreground color is used. In this case cairo will call the render function whenever the foreground color has changed.
Diffstat (limited to 'src/cairo-scaled-font-private.h')
-rw-r--r--src/cairo-scaled-font-private.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cairo-scaled-font-private.h b/src/cairo-scaled-font-private.h
index bcc13bdc8..8c10b60c7 100644
--- a/src/cairo-scaled-font-private.h
+++ b/src/cairo-scaled-font-private.h
@@ -149,8 +149,12 @@ struct _cairo_scaled_glyph {
cairo_list_t dev_privates;
cairo_color_t foreground_color; /* only used for color glyphs */
+
+ /* TRUE if the recording_surface required the foreground_color to render. */
+ unsigned recording_uses_foreground_color : 1;
+
/* TRUE if the color_surface required the foreground_color to render. */
- unsigned uses_foreground_color : 1;
+ unsigned image_uses_foreground_color : 1;
/* TRUE if color_glyph specifies if glyph is color or non color, FALSE if glyph color type unknown. */
unsigned color_glyph_set : 1;