Lines Matching defs:tc
357 static void sp_spray_extinput(SprayTool *tc, GdkEvent *event)
359 if (gdk_event_get_axis(event, GDK_AXIS_PRESSURE, &tc->pressure)) {
360 tc->pressure = CLAMP(tc->pressure, TC_MIN_PRESSURE, TC_MAX_PRESSURE);
362 tc->pressure = TC_DEFAULT_PRESSURE;
366 static double get_width(SprayTool *tc)
368 double pressure = (tc->usepressurewidth? tc->pressure / TC_DEFAULT_PRESSURE : 1);
369 return pressure * tc->width;
372 static double get_dilate_radius(SprayTool *tc)
374 return 250 * get_width(tc)/SP_EVENT_CONTEXT(tc)->desktop->current_zoom();
377 static double get_path_mean(SprayTool *tc)
379 return tc->mean;
382 static double get_path_standard_deviation(SprayTool *tc)
384 return tc->standard_deviation;
387 static double get_population(SprayTool *tc)
389 double pressure = (tc->usepressurepopulation? tc->pressure / TC_DEFAULT_PRESSURE : 1);
390 return pressure * tc->population;
393 static double get_pressure(SprayTool *tc)
395 double pressure = tc->pressure / TC_DEFAULT_PRESSURE;
399 static double get_move_mean(SprayTool *tc)
401 return tc->mean;
404 static double get_move_standard_deviation(SprayTool *tc)
406 return tc->standard_deviation;
1146 static bool sp_spray_dilate(SprayTool *tc, Geom::Point /*event_p*/, Geom::Point p, Geom::Point vector, bool reverse)
1148 SPDesktop *desktop = tc->desktop;
1156 double radius = get_dilate_radius(tc);
1157 double population = get_population(tc);
1161 double path_mean = get_path_mean(tc);
1165 double path_standard_deviation = get_path_standard_deviation(tc);
1169 double move_mean = get_move_mean(tc);
1170 double move_standard_deviation = get_move_standard_deviation(tc);
1188 , tc->mode
1191 , tc->scale
1192 , tc->scale_variation
1196 , tc->ratio
1197 , tc->tilt
1198 , tc->rotation_variation
1199 , tc->distrib
1200 , tc->no_overlap
1201 , tc->picker
1202 , tc->pick_center
1203 , tc->pick_inverse_value
1204 , tc->pick_fill
1205 , tc->pick_stroke
1206 , tc->pick_no_overlap
1207 , tc->over_no_transparent
1208 , tc->over_transparent
1209 , tc->offset
1210 , tc->usepressurescale
1211 , get_pressure(tc)
1212 , tc->pick
1213 , tc->do_trace
1214 , tc->pick_to_size
1215 , tc->pick_to_presence
1216 , tc->pick_to_color
1217 , tc->pick_to_opacity
1218 , tc->invert_picked
1219 , tc->gamma_picked
1220 , tc->rand_picked)) {
1235 static void sp_spray_update_area(SprayTool *tc)
1237 double radius = get_dilate_radius(tc);
1238 Geom::Affine const sm ( Geom::Scale(radius/(1-tc->ratio), radius/(1+tc->ratio)) );
1239 sp_canvas_item_affine_absolute(tc->dilate_area, (sm* Geom::Rotate(tc->tilt))* Geom::Translate(SP_EVENT_CONTEXT(tc)->desktop->point()));
1240 sp_canvas_item_show(tc->dilate_area);
1243 static void sp_spray_switch_mode(SprayTool *tc, gint mode, bool with_shift)
1246 SP_EVENT_CONTEXT(tc)->desktop->setToolboxSelectOneValue("spray_tool_mode", mode);
1248 tc->mode = mode;
1249 tc->update_cursor(with_shift);