[draw] Rename conic_to to quadratic_to

This commit is contained in:
Ebrahim Byagowi 2020-01-28 13:45:22 +03:30
parent ac81e94016
commit 74fdcdcac8
7 changed files with 26 additions and 26 deletions

View File

@ -225,18 +225,18 @@ hb_directwrite_shape_experimental_width
<FILE>hb-draw</FILE>
hb_draw_funcs_t
hb_draw_close_path_func_t
hb_draw_conic_to_func_t
hb_draw_cubic_to_func_t
hb_draw_line_to_func_t
hb_draw_move_to_func_t
hb_draw_quadratic_to_func_t
hb_draw_funcs_create
hb_draw_funcs_destroy
hb_draw_funcs_reference
hb_draw_funcs_set_close_path_func
hb_draw_funcs_set_conic_to_func
hb_draw_funcs_set_cubic_to_func
hb_draw_funcs_set_line_to_func
hb_draw_funcs_set_move_to_func
hb_draw_funcs_set_quadratic_to_func
</SECTION>
<SECTION>

View File

@ -67,7 +67,7 @@ hb_draw_funcs_set_line_to_func (hb_draw_funcs_t *funcs,
}
/**
* hb_draw_funcs_set_conic_to_func:
* hb_draw_funcs_set_quadratic_to_func:
* @funcs: decompose functions object
* @move_to: quadratic-to callback
*
@ -76,11 +76,11 @@ hb_draw_funcs_set_line_to_func (hb_draw_funcs_t *funcs,
* Since: REPLACEME
**/
void
hb_draw_funcs_set_conic_to_func (hb_draw_funcs_t *funcs,
hb_draw_conic_to_func_t conic_to)
hb_draw_funcs_set_quadratic_to_func (hb_draw_funcs_t *funcs,
hb_draw_quadratic_to_func_t quadratic_to)
{
if (unlikely (hb_object_is_immutable (funcs))) return;
funcs->conic_to = conic_to;
funcs->quadratic_to = quadratic_to;
}
/**
@ -124,7 +124,7 @@ static void
_line_to_nil (hb_position_t to_x HB_UNUSED, hb_position_t to_y HB_UNUSED, void *user_data HB_UNUSED) {}
static void
_conic_to_nil (hb_position_t control_x HB_UNUSED, hb_position_t control_y HB_UNUSED,
_quadratic_to_nil (hb_position_t control_x HB_UNUSED, hb_position_t control_y HB_UNUSED,
hb_position_t to_x HB_UNUSED, hb_position_t to_y HB_UNUSED,
void *user_data HB_UNUSED) {}
@ -153,7 +153,7 @@ hb_draw_funcs_create ()
funcs->move_to = (hb_draw_move_to_func_t) _move_to_nil;
funcs->line_to = (hb_draw_line_to_func_t) _line_to_nil;
funcs->conic_to = (hb_draw_conic_to_func_t) _conic_to_nil;
funcs->quadratic_to = (hb_draw_quadratic_to_func_t) _quadratic_to_nil;
funcs->cubic_to = (hb_draw_cubic_to_func_t) _cubic_to_nil;
funcs->close_path = (hb_draw_close_path_func_t) _close_path_nil;
return funcs;

View File

@ -35,7 +35,7 @@ HB_BEGIN_DECLS
typedef void (*hb_draw_move_to_func_t) (hb_position_t to_x, hb_position_t to_y, void *user_data);
typedef void (*hb_draw_line_to_func_t) (hb_position_t to_x, hb_position_t to_y, void *user_data);
typedef void (*hb_draw_conic_to_func_t) (hb_position_t control_x, hb_position_t control_y,
typedef void (*hb_draw_quadratic_to_func_t) (hb_position_t control_x, hb_position_t control_y,
hb_position_t to_x, hb_position_t to_y,
void *user_data);
typedef void (*hb_draw_cubic_to_func_t) (hb_position_t control1_x, hb_position_t control1_y,
@ -62,8 +62,8 @@ hb_draw_funcs_set_line_to_func (hb_draw_funcs_t *funcs,
hb_draw_move_to_func_t line_to);
HB_EXTERN void
hb_draw_funcs_set_conic_to_func (hb_draw_funcs_t *funcs,
hb_draw_conic_to_func_t conic_to);
hb_draw_funcs_set_quadratic_to_func (hb_draw_funcs_t *funcs,
hb_draw_quadratic_to_func_t quadratic_to);
HB_EXTERN void
hb_draw_funcs_set_cubic_to_func (hb_draw_funcs_t *funcs,

View File

@ -33,7 +33,7 @@ struct hb_draw_funcs_t
hb_draw_move_to_func_t move_to;
hb_draw_line_to_func_t line_to;
hb_draw_conic_to_func_t conic_to;
hb_draw_quadratic_to_func_t quadratic_to;
hb_draw_cubic_to_func_t cubic_to;
hb_draw_close_path_func_t close_path;
};

View File

@ -1093,7 +1093,7 @@ struct glyf
float to_x, to_y;
if (next->flag & Glyph::FLAG_ON_CURVE) { to_x = next->x; to_y = next->y; }
else { to_x = (curr->x + next->x) / 2.f; to_y = (curr->y + next->y) / 2.f; }
funcs->conic_to (font->em_scalef_x (curr->x), font->em_scalef_y (curr->y),
funcs->quadratic_to (font->em_scalef_x (curr->x), font->em_scalef_y (curr->y),
font->em_scalef_x (to_x), font->em_scalef_y (to_y), user_data);
}
}

View File

@ -143,7 +143,7 @@ line_to (hb_position_t to_x, hb_position_t to_y, user_data_t &user_data)
}
static void
conic_to (hb_position_t control_x, hb_position_t control_y,
quadratic_to (hb_position_t control_x, hb_position_t control_y,
hb_position_t to_x, hb_position_t to_y,
user_data_t &user_data)
{
@ -296,7 +296,7 @@ dump_glyphs (hb_blob_t *blob, const char *font_name)
hb_draw_funcs_t *funcs = hb_draw_funcs_create ();
hb_draw_funcs_set_move_to_func (funcs, (hb_draw_move_to_func_t) move_to);
hb_draw_funcs_set_line_to_func (funcs, (hb_draw_line_to_func_t) line_to);
hb_draw_funcs_set_conic_to_func (funcs, (hb_draw_conic_to_func_t) conic_to);
hb_draw_funcs_set_quadratic_to_func (funcs, (hb_draw_quadratic_to_func_t) quadratic_to);
hb_draw_funcs_set_cubic_to_func (funcs, (hb_draw_cubic_to_func_t) cubic_to);
hb_draw_funcs_set_close_path_func (funcs, (hb_draw_close_path_func_t) close_path);

View File

@ -115,7 +115,7 @@ line_to (hb_position_t to_x, hb_position_t to_y, user_data_t *user_data)
}
static void
conic_to (hb_position_t control_x, hb_position_t control_y,
quadratic_to (hb_position_t control_x, hb_position_t control_y,
hb_position_t to_x, hb_position_t to_y,
user_data_t *user_data)
{
@ -750,7 +750,7 @@ main (int argc, char **argv)
funcs = hb_draw_funcs_create ();
hb_draw_funcs_set_move_to_func (funcs, (hb_draw_move_to_func_t) move_to);
hb_draw_funcs_set_line_to_func (funcs, (hb_draw_line_to_func_t) line_to);
hb_draw_funcs_set_conic_to_func (funcs, (hb_draw_conic_to_func_t) conic_to);
hb_draw_funcs_set_quadratic_to_func (funcs, (hb_draw_quadratic_to_func_t) quadratic_to);
hb_draw_funcs_set_cubic_to_func (funcs, (hb_draw_cubic_to_func_t) cubic_to);
hb_draw_funcs_set_close_path_func (funcs, (hb_draw_close_path_func_t) close_path);