[draw] Rename conic_to to quadratic_to
This commit is contained in:
parent
ac81e94016
commit
74fdcdcac8
|
@ -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>
|
||||
|
|
|
@ -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,9 +124,9 @@ 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,
|
||||
hb_position_t to_x HB_UNUSED, hb_position_t to_y HB_UNUSED,
|
||||
void *user_data 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) {}
|
||||
|
||||
static void
|
||||
_cubic_to_nil (hb_position_t control1_x HB_UNUSED, hb_position_t control1_y 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;
|
||||
|
|
|
@ -35,9 +35,9 @@ 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,
|
||||
hb_position_t to_x, hb_position_t to_y,
|
||||
void *user_data);
|
||||
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,
|
||||
hb_position_t control2_x, hb_position_t control2_y,
|
||||
hb_position_t to_x, hb_position_t to_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,
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -1093,8 +1093,8 @@ 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),
|
||||
font->em_scalef_x (to_x), font->em_scalef_y (to_y), user_data);
|
||||
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);
|
||||
}
|
||||
}
|
||||
contour_start += contour_length;
|
||||
|
|
|
@ -143,9 +143,9 @@ 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,
|
||||
hb_position_t to_x, hb_position_t to_y,
|
||||
user_data_t &user_data)
|
||||
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)
|
||||
{
|
||||
fprintf (user_data.f, "Q%d,%d %d,%d", control_x, user_data.ascender - control_y,
|
||||
to_x, user_data.ascender - to_y);
|
||||
|
@ -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);
|
||||
|
||||
|
|
|
@ -115,9 +115,9 @@ 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,
|
||||
hb_position_t to_x, hb_position_t to_y,
|
||||
user_data_t *user_data)
|
||||
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)
|
||||
{
|
||||
|
||||
if (user_data->consumed + 4 * ITOA_BUF_SIZE + 6 > user_data->size) return;
|
||||
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue