api fixes: use floats consistently

This commit is contained in:
Matthias Clasen 2022-12-14 23:58:25 -05:00 committed by Behdad Esfahbod
parent 627c857f8b
commit 64f1b55d01
3 changed files with 17 additions and 16 deletions

View File

@ -30,9 +30,9 @@
static void
hb_paint_push_transform_nil (hb_paint_funcs_t *funcs, void *paint_data,
float xx, float xy,
float yx, float yy,
float x0, float y0,
float xx, float yx,
float xy, float yy,
float dx, float dy,
void *user_data) {}
static void
@ -241,11 +241,11 @@ hb_paint_funcs_is_immutable (hb_paint_funcs_t *funcs)
void
hb_paint_push_transform (hb_paint_funcs_t *funcs, void *paint_data,
float xx, float xy,
float yx, float yy,
float x0, float y0)
float xx, float yx,
float xy, float yy,
float dx, float dy)
{
funcs->push_transform (paint_data, xx, xy, yx, yy, x0, y0);
funcs->push_transform (paint_data, xx, yx, xy, yy, dx, dy);
}
void

View File

@ -88,12 +88,13 @@ typedef struct hb_color_line_t hb_color_line_t;
typedef struct {
float offset;
unsigned int color_index;
float alpha;
} hb_color_stop_t;
HB_EXTERN unsigned int
hb_color_line_get_color_stops (hb_color_line_t color_line,
hb_color_line_get_color_stops (hb_color_line_t *color_line,
unsigned int start,
unsigned int count,
unsigned int *count,
hb_color_stop_t *color_stops);
typedef enum {
@ -313,9 +314,9 @@ hb_paint_funcs_set_pop_group_func (hb_paint_funcs_t *funcs,
HB_EXTERN void
hb_paint_push_transform (hb_paint_funcs_t *funcs, void *paint_data,
float xx, float xy,
float yx, float yy,
float x0, float y0);
float xx, float yx,
float xy, float yy,
float dx, float dy);
HB_EXTERN void
hb_paint_pop_transform (hb_paint_funcs_t *funcs, void *paint_data);

View File

@ -64,11 +64,11 @@ struct hb_paint_funcs_t
} *destroy;
void push_transform (void *paint_data,
float xx, float xy,
float yx, float yy,
float x0, float y0)
float xx, float yx,
float xy, float yy,
float dx, float dy)
{ func.push_transform (this, paint_data,
xx, xy, yx, yy, x0, y0,
xx, yx, xy, yy, dx, dy,
!user_data ? nullptr : user_data->push_transform); }
void pop_transform (void *paint_data)
{ func.pop_transform (this, paint_data,