diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2023-01-22 13:27:53 +1030 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2023-01-26 19:49:06 +1030 |
commit | e93d175aac6805692d660f1f6444e6b21492e2a7 (patch) | |
tree | bc6216ef593280b7b8c3b93af6027e727b8a9555 /src/cairoint.h | |
parent | 0151a67e33f7c96645ae581b31861780b531a7e1 (diff) | |
download | cairo-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/cairoint.h')
-rw-r--r-- | src/cairoint.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cairoint.h b/src/cairoint.h index 65bc16f53..af2501057 100644 --- a/src/cairoint.h +++ b/src/cairoint.h @@ -1292,13 +1292,14 @@ _cairo_scaled_glyph_set_path (cairo_scaled_glyph_t *scaled_glyph, cairo_private void _cairo_scaled_glyph_set_recording_surface (cairo_scaled_glyph_t *scaled_glyph, cairo_scaled_font_t *scaled_font, - cairo_surface_t *recording_surface); + cairo_surface_t *recording_surface, + const cairo_color_t *foreground_color); cairo_private void _cairo_scaled_glyph_set_color_surface (cairo_scaled_glyph_t *scaled_glyph, cairo_scaled_font_t *scaled_font, cairo_image_surface_t *surface, - cairo_bool_t uses_foreground_color); + const cairo_color_t *foreground_color); cairo_private cairo_int_status_t _cairo_scaled_glyph_lookup (cairo_scaled_font_t *scaled_font, |