static void create_dummy_control_points (EntityState *entity_state) { RigSelectionTool *tool = entity_state->tool; CoglTexture *tex = rut_load_texture_from_data_file (tool->ctx, "dot.png", NULL); ControlPoint *point; point = g_slice_new0 (ControlPoint); point->entity_state = entity_state; point->x = 0; point->y = 0; point->z = 0; point->transform = rut_transform_new (tool->ctx); rut_graphable_add_child (tool->tool_overlay, point->transform); rut_refable_unref (point->transform); point->marker = rut_nine_slice_new (tool->ctx, tex, 0, 0, 0, 0, 10, 10); rut_graphable_add_child (point->transform, point->marker); rut_refable_unref (point->marker); point->input_region = rut_input_region_new_circle (0, 0, 5, control_point_input_cb, point); rut_graphable_add_child (tool->tool_overlay, point->input_region); rut_refable_unref (point->input_region); entity_state->control_points = g_list_prepend (entity_state->control_points, point); point = g_slice_new0 (ControlPoint); point->entity_state = entity_state; point->x = 100; point->y = 0; point->z = 0; point->transform = rut_transform_new (tool->ctx); rut_graphable_add_child (tool->tool_overlay, point->transform); rut_refable_unref (point->transform); point->marker = rut_nine_slice_new (tool->ctx, tex, 0, 0, 0, 0, 10, 10); rut_graphable_add_child (point->transform, point->marker); rut_refable_unref (point->marker); point->input_region = rut_input_region_new_circle (0, 0, 5, control_point_input_cb, point); rut_graphable_add_child (tool->tool_overlay, point->input_region); rut_refable_unref (point->input_region); entity_state->control_points = g_list_prepend (entity_state->control_points, point); cogl_object_unref (tex); }
static void create_dummy_control_points(entity_state_t *entity_state) { rig_selection_tool_t *tool = entity_state->tool; cg_texture_t *tex = rut_load_texture_from_data_file(tool->shell, "dot.png", NULL); control_point_t *point; point = c_slice_new0(control_point_t); point->entity_state = entity_state; point->x = 0; point->y = 0; point->z = 0; point->transform = rut_transform_new(tool->shell); rut_graphable_add_child(tool->tool_overlay, point->transform); rut_object_unref(point->transform); point->marker = rut_nine_slice_new(tool->shell, tex, 0, 0, 0, 0, 10, 10); rut_graphable_add_child(point->transform, point->marker); rut_object_unref(point->marker); point->input_region = rut_input_region_new_circle(0, 0, 5, control_point_input_cb, point); rut_graphable_add_child(tool->tool_overlay, point->input_region); rut_object_unref(point->input_region); entity_state->control_points = c_llist_prepend(entity_state->control_points, point); point = c_slice_new0(control_point_t); point->entity_state = entity_state; point->x = 100; point->y = 0; point->z = 0; point->transform = rut_transform_new(tool->shell); rut_graphable_add_child(tool->tool_overlay, point->transform); rut_object_unref(point->transform); point->marker = rut_nine_slice_new(tool->shell, tex, 0, 0, 0, 0, 10, 10); rut_graphable_add_child(point->transform, point->marker); rut_object_unref(point->marker); point->input_region = rut_input_region_new_circle(0, 0, 5, control_point_input_cb, point); rut_graphable_add_child(tool->tool_overlay, point->input_region); rut_object_unref(point->input_region); entity_state->control_points = c_llist_prepend(entity_state->control_points, point); cg_object_unref(tex); }