[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>
|
<FILE>hb-draw</FILE>
|
||||||
hb_draw_funcs_t
|
hb_draw_funcs_t
|
||||||
hb_draw_close_path_func_t
|
hb_draw_close_path_func_t
|
||||||
hb_draw_conic_to_func_t
|
|
||||||
hb_draw_cubic_to_func_t
|
hb_draw_cubic_to_func_t
|
||||||
hb_draw_line_to_func_t
|
hb_draw_line_to_func_t
|
||||||
hb_draw_move_to_func_t
|
hb_draw_move_to_func_t
|
||||||
|
hb_draw_quadratic_to_func_t
|
||||||
hb_draw_funcs_create
|
hb_draw_funcs_create
|
||||||
hb_draw_funcs_destroy
|
hb_draw_funcs_destroy
|
||||||
hb_draw_funcs_reference
|
hb_draw_funcs_reference
|
||||||
hb_draw_funcs_set_close_path_func
|
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_cubic_to_func
|
||||||
hb_draw_funcs_set_line_to_func
|
hb_draw_funcs_set_line_to_func
|
||||||
hb_draw_funcs_set_move_to_func
|
hb_draw_funcs_set_move_to_func
|
||||||
|
hb_draw_funcs_set_quadratic_to_func
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<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
|
* @funcs: decompose functions object
|
||||||
* @move_to: quadratic-to callback
|
* @move_to: quadratic-to callback
|
||||||
*
|
*
|
||||||
|
@ -76,11 +76,11 @@ hb_draw_funcs_set_line_to_func (hb_draw_funcs_t *funcs,
|
||||||
* Since: REPLACEME
|
* Since: REPLACEME
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
hb_draw_funcs_set_conic_to_func (hb_draw_funcs_t *funcs,
|
hb_draw_funcs_set_quadratic_to_func (hb_draw_funcs_t *funcs,
|
||||||
hb_draw_conic_to_func_t conic_to)
|
hb_draw_quadratic_to_func_t quadratic_to)
|
||||||
{
|
{
|
||||||
if (unlikely (hb_object_is_immutable (funcs))) return;
|
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) {}
|
_line_to_nil (hb_position_t to_x HB_UNUSED, hb_position_t to_y HB_UNUSED, void *user_data HB_UNUSED) {}
|
||||||
|
|
||||||
static void
|
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,
|
hb_position_t to_x HB_UNUSED, hb_position_t to_y HB_UNUSED,
|
||||||
void *user_data 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->move_to = (hb_draw_move_to_func_t) _move_to_nil;
|
||||||
funcs->line_to = (hb_draw_line_to_func_t) _line_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->cubic_to = (hb_draw_cubic_to_func_t) _cubic_to_nil;
|
||||||
funcs->close_path = (hb_draw_close_path_func_t) _close_path_nil;
|
funcs->close_path = (hb_draw_close_path_func_t) _close_path_nil;
|
||||||
return funcs;
|
return funcs;
|
||||||
|
|
|
@ -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_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_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,
|
hb_position_t to_x, hb_position_t to_y,
|
||||||
void *user_data);
|
void *user_data);
|
||||||
typedef void (*hb_draw_cubic_to_func_t) (hb_position_t control1_x, hb_position_t control1_y,
|
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_draw_move_to_func_t line_to);
|
||||||
|
|
||||||
HB_EXTERN void
|
HB_EXTERN void
|
||||||
hb_draw_funcs_set_conic_to_func (hb_draw_funcs_t *funcs,
|
hb_draw_funcs_set_quadratic_to_func (hb_draw_funcs_t *funcs,
|
||||||
hb_draw_conic_to_func_t conic_to);
|
hb_draw_quadratic_to_func_t quadratic_to);
|
||||||
|
|
||||||
HB_EXTERN void
|
HB_EXTERN void
|
||||||
hb_draw_funcs_set_cubic_to_func (hb_draw_funcs_t *funcs,
|
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_move_to_func_t move_to;
|
||||||
hb_draw_line_to_func_t line_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_cubic_to_func_t cubic_to;
|
||||||
hb_draw_close_path_func_t close_path;
|
hb_draw_close_path_func_t close_path;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1093,7 +1093,7 @@ struct glyf
|
||||||
float to_x, to_y;
|
float to_x, to_y;
|
||||||
if (next->flag & Glyph::FLAG_ON_CURVE) { to_x = next->x; to_y = next->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; }
|
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);
|
font->em_scalef_x (to_x), font->em_scalef_y (to_y), user_data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,7 +143,7 @@ line_to (hb_position_t to_x, hb_position_t to_y, user_data_t &user_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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,
|
hb_position_t to_x, hb_position_t to_y,
|
||||||
user_data_t &user_data)
|
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_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_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_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_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);
|
hb_draw_funcs_set_close_path_func (funcs, (hb_draw_close_path_func_t) close_path);
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ line_to (hb_position_t to_x, hb_position_t to_y, user_data_t *user_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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,
|
hb_position_t to_x, hb_position_t to_y,
|
||||||
user_data_t *user_data)
|
user_data_t *user_data)
|
||||||
{
|
{
|
||||||
|
@ -750,7 +750,7 @@ main (int argc, char **argv)
|
||||||
funcs = hb_draw_funcs_create ();
|
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_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_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_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);
|
hb_draw_funcs_set_close_path_func (funcs, (hb_draw_close_path_func_t) close_path);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue