Lines Matching defs:tc

325 sp_tweak_extinput(TweakTool *tc, GdkEvent *event)
327 if (gdk_event_get_axis (event, GDK_AXIS_PRESSURE, &tc->pressure)) {
328 tc->pressure = CLAMP (tc->pressure, TC_MIN_PRESSURE, TC_MAX_PRESSURE);
330 tc->pressure = TC_DEFAULT_PRESSURE;
335 get_dilate_radius (TweakTool *tc)
338 return 500 * tc->width/SP_EVENT_CONTEXT(tc)->desktop->current_zoom();
342 get_path_force (TweakTool *tc)
344 double force = 8 * (tc->usepressure? tc->pressure : TC_DEFAULT_PRESSURE)
345 /sqrt(SP_EVENT_CONTEXT(tc)->desktop->current_zoom());
349 return force * tc->force;
353 get_move_force (TweakTool *tc)
355 double force = (tc->usepressure? tc->pressure : TC_DEFAULT_PRESSURE);
356 return force * tc->force;
1021 sp_tweak_dilate (TweakTool *tc, Geom::Point event_p, Geom::Point p, Geom::Point vector, bool reverse)
1023 Inkscape::Selection *selection = tc->desktop->getSelection();
1024 SPDesktop *desktop = SP_EVENT_CONTEXT(tc)->desktop;
1031 double radius = get_dilate_radius(tc);
1033 SPItem *item_at_point = SP_EVENT_CONTEXT(tc)->desktop->getItemAtPoint(event_p, TRUE);
1072 double path_force = get_path_force(tc);
1076 double move_force = get_move_force(tc);
1083 if (is_color_mode (tc->mode)) {
1085 if (sp_tweak_color_recursive (tc->mode, item, item_at_point,
1089 tc->mode == TWEAK_MODE_BLUR, reverse,
1090 p, radius, color_force, tc->do_h, tc->do_s, tc->do_l, tc->do_o)) {
1094 } else if (is_transform_mode(tc->mode)) {
1095 if (sp_tweak_dilate_recursive (selection, item, p, vector, tc->mode, radius, move_force, tc->fidelity, reverse)) {
1099 if (sp_tweak_dilate_recursive (selection, item, p, vector, tc->mode, radius, path_force, tc->fidelity, reverse)) {
1109 sp_tweak_update_area (TweakTool *tc)
1111 double radius = get_dilate_radius(tc);
1112 Geom::Affine const sm (Geom::Scale(radius, radius) * Geom::Translate(SP_EVENT_CONTEXT(tc)->desktop->point()));
1113 sp_canvas_item_affine_absolute(tc->dilate_area, sm);
1114 sp_canvas_item_show(tc->dilate_area);
1118 sp_tweak_switch_mode (TweakTool *tc, gint mode, bool with_shift)
1120 SP_EVENT_CONTEXT(tc)->desktop->setToolboxSelectOneValue ("tweak_tool_mode", mode);
1122 tc->mode = mode;
1123 tc->update_cursor(with_shift);
1127 sp_tweak_switch_mode_temporarily (TweakTool *tc, gint mode, bool with_shift)
1130 // Juggling about so that prefs have the old value but tc->mode and the button show new mode:
1132 SP_EVENT_CONTEXT(tc)->desktop->setToolboxSelectOneValue ("tweak_tool_mode", mode);
1135 // changing prefs changed tc->mode, restore back :)
1136 tc->mode = mode;
1137 tc->update_cursor(with_shift);