[paint-extents] Namespace
This commit is contained in:
parent
62bd26dda3
commit
959996d709
|
@ -324,29 +324,31 @@ add_point (hb_extents_t *extents,
|
|||
}
|
||||
|
||||
static void
|
||||
move_to (hb_draw_funcs_t *dfuncs,
|
||||
hb_draw_extents_move_to (hb_draw_funcs_t *dfuncs,
|
||||
void *data,
|
||||
hb_draw_state_t *st,
|
||||
float to_x, float to_y,
|
||||
void *)
|
||||
{
|
||||
hb_extents_t *extents = (hb_extents_t *)data;
|
||||
|
||||
add_point (extents, to_x, to_y);
|
||||
}
|
||||
|
||||
static void
|
||||
line_to (hb_draw_funcs_t *dfuncs,
|
||||
hb_draw_extents_line_to (hb_draw_funcs_t *dfuncs,
|
||||
void *data,
|
||||
hb_draw_state_t *st,
|
||||
float to_x, float to_y,
|
||||
void *)
|
||||
{
|
||||
hb_extents_t *extents = (hb_extents_t *)data;
|
||||
|
||||
add_point (extents, to_x, to_y);
|
||||
}
|
||||
|
||||
static void
|
||||
cubic_to (hb_draw_funcs_t *dfuncs,
|
||||
hb_draw_extents_cubic_to (hb_draw_funcs_t *dfuncs,
|
||||
void *data,
|
||||
hb_draw_state_t *st,
|
||||
float control1_x, float control1_y,
|
||||
|
@ -355,27 +357,19 @@ cubic_to (hb_draw_funcs_t *dfuncs,
|
|||
void *)
|
||||
{
|
||||
hb_extents_t *extents = (hb_extents_t *)data;
|
||||
|
||||
add_point (extents, control1_x, control1_y);
|
||||
add_point (extents, control2_x, control2_y);
|
||||
add_point (extents, to_x, to_y);
|
||||
}
|
||||
|
||||
static void
|
||||
close_path (hb_draw_funcs_t *dfuncs,
|
||||
void *data,
|
||||
hb_draw_state_t *st,
|
||||
void *)
|
||||
{
|
||||
}
|
||||
|
||||
static hb_draw_funcs_t *
|
||||
hb_draw_extent_get_funcs ()
|
||||
{
|
||||
hb_draw_funcs_t *funcs = hb_draw_funcs_create ();
|
||||
hb_draw_funcs_set_move_to_func (funcs, move_to, nullptr, nullptr);
|
||||
hb_draw_funcs_set_line_to_func (funcs, line_to, nullptr, nullptr);
|
||||
hb_draw_funcs_set_cubic_to_func (funcs, cubic_to, nullptr, nullptr);
|
||||
hb_draw_funcs_set_close_path_func (funcs, close_path, nullptr, nullptr);
|
||||
hb_draw_funcs_set_move_to_func (funcs, hb_draw_extents_move_to, nullptr, nullptr);
|
||||
hb_draw_funcs_set_line_to_func (funcs, hb_draw_extents_line_to, nullptr, nullptr);
|
||||
hb_draw_funcs_set_cubic_to_func (funcs, hb_draw_extents_cubic_to, nullptr, nullptr);
|
||||
return funcs;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue