[gpu] Add hb_gpu_draw_get_scale companion getter

hb_gpu_draw_set_scale() existed without a paired getter; all other
draw/paint contexts have get/set pairs.  Fill the gap for symmetry.

Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Behdad Esfahbod committed 2026-04-13 01:58:06 -06:00
1 parent 6de5a0eb20
commit 8cd50a7b77
3 files changed
+26

No files matched your search

+1
View File
@@ -1129,6 +1129,7 @@ hb_gpu_draw_set_user_data
hb_gpu_draw_get_user_data
hb_gpu_draw_get_funcs
hb_gpu_draw_set_scale
hb_gpu_draw_get_scale
hb_gpu_draw_glyph
hb_gpu_draw_encode
hb_gpu_draw_clear
+20
View File
@@ -1014,6 +1014,26 @@ hb_gpu_draw_set_scale (hb_gpu_draw_t *draw,
draw->y_scale = y_scale;
}
/**
* hb_gpu_draw_get_scale:
* @draw: a GPU shape encoder
* @x_scale: (out): horizontal scale
* @y_scale: (out): vertical scale
*
* Gets the font scale previously set via hb_gpu_draw_set_scale() or
* hb_gpu_draw_glyph().
*
* XSince: REPLACEME
**/
void
hb_gpu_draw_get_scale (const hb_gpu_draw_t *draw,
int *x_scale,
int *y_scale)
{
if (x_scale) *x_scale = draw->x_scale;
if (y_scale) *y_scale = draw->y_scale;
}
/**
* hb_gpu_draw_glyph:
* @draw: a GPU shape encoder
+5
View File
@@ -96,6 +96,11 @@ hb_gpu_draw_set_scale (hb_gpu_draw_t *draw,
int x_scale,
int y_scale);
HB_EXTERN void
hb_gpu_draw_get_scale (const hb_gpu_draw_t *draw,
int *x_scale,
int *y_scale);
/* Draw */
HB_EXTERN hb_draw_funcs_t *