mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 06:21:16 +01:00
[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:
1 parent
6de5a0eb20
commit
8cd50a7b77
3 files changed
+26
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 *
|
||||
|
||||
Reference in new issue
Block a user