raster: add hb_raster_paint_set_foreground() API

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Behdad EsfahbodandClaude Opus 4.6 committed 2026-02-22 01:29:53 -03:00
1 parent 49838acdad
commit a6952e6523
2 files changed
+22

No files matched your search

+18
View File
@@ -1177,6 +1177,24 @@ hb_raster_paint_set_extents (hb_raster_paint_t *paint,
paint->fixed_extents.stride = paint->fixed_extents.width * 4;
}
/**
* hb_raster_paint_set_foreground:
* @paint: a paint context
* @foreground: the foreground color
*
* Sets the foreground color used when paint callbacks request it
* (e.g. `is_foreground` in color stops or solid fills).
*
* XSince: REPLACEME
**/
void
hb_raster_paint_set_foreground (hb_raster_paint_t *paint,
hb_color_t foreground)
{
if (unlikely (!paint)) return;
paint->foreground = foreground;
}
/**
* hb_raster_paint_get_funcs:
*
+4
View File
@@ -222,6 +222,10 @@ HB_EXTERN void
hb_raster_paint_set_extents (hb_raster_paint_t *paint,
const hb_raster_extents_t *extents);
HB_EXTERN void
hb_raster_paint_set_foreground (hb_raster_paint_t *paint,
hb_color_t foreground);
HB_EXTERN hb_paint_funcs_t *
hb_raster_paint_get_funcs (void);