Lines Matching +refs:val +refs:mode
92 // with the mode: spray object in single path)
171 , mode(0)
219 switch (this->mode) {
270 sp_event_context_read(this, "mode");
303 void SprayTool::set(const Inkscape::Preferences::Entry& val) {
304 Glib::ustring path = val.getEntryName();
306 if (path == "mode") {
307 this->mode = val.getInt();
310 this->width = 0.01 * CLAMP(val.getInt(10), 1, 100);
312 this->usepressurewidth = val.getBool();
314 this->usepressurepopulation = val.getBool();
316 this->usepressurescale = val.getBool();
318 this->population = 0.01 * CLAMP(val.getInt(10), 1, 100);
320 this->rotation_variation = CLAMP(val.getDouble(0.0), 0, 100.0);
322 this->scale_variation = CLAMP(val.getDouble(1.0), 0, 100.0);
324 this->standard_deviation = 0.01 * CLAMP(val.getInt(10), 1, 100);
326 this->mean = 0.01 * CLAMP(val.getInt(10), 1, 100);
329 this->distrib = val.getInt(1);
331 this->tilt = CLAMP(val.getDouble(0.1), 0, 1000.0);
333 this->ratio = CLAMP(val.getDouble(), 0.0, 0.9);
335 this->offset = val.getDoubleLimited(100.0, 0, 1000.0);
337 this->pick_center = val.getBool(true);
339 this->pick_inverse_value = val.getBool(false);
341 this->pick_fill = val.getBool(false);
343 this->pick_stroke = val.getBool(false);
345 this->pick_no_overlap = val.getBool(false);
347 this->over_no_transparent = val.getBool(true);
349 this->over_transparent = val.getBool(true);
351 this->no_overlap = val.getBool(false);
353 this->picker = val.getBool(false);
453 Randomizes \a val by \a rand, with 0 < val < 1 and all values (including 0, 1) having the same
456 double randomize01(double val, double rand)
458 double base = MIN (val - rand, 1 - 2*rand);
462 val = base + g_random_double_range (0, MIN (2 * rand, 1 - base));
463 return CLAMP(val, 0, 1); // this should be unnecessary with the above provisions, but just in case...
495 gint mode,
564 if(mode != SPRAY_MODE_ERASER) {
573 if(mode != SPRAY_MODE_ERASER) {
578 if(mode != SPRAY_MODE_ERASER) {
615 if(mode == SPRAY_MODE_ERASER) {
636 if(mode == SPRAY_MODE_ERASER){
684 gdouble val = 0;
687 val = 1 - hsl[2]; // inverse lightness; to match other picks where black = max
690 val = a;
693 val = r;
696 val = g;
699 val = b;
702 val = hsl[0];
705 val = hsl[1];
708 val = 1 - hsl[2];
715 val = randomize01 (val, rand_picked);
728 val = pow (val, power);
735 val = 1 - val;
741 val = CLAMP (val, 0, 1);
751 _scale = 1.0 - val;
753 _scale = val;
766 , mode
803 opacity *= 1.0 - val;
805 opacity *= val;
813 if (g_random_double_range (0, 1) > val) {
869 gint mode,
924 if (mode == SPRAY_MODE_COPY || mode == SPRAY_MODE_ERASER) {
939 if(mode == SPRAY_MODE_ERASER || no_overlap || picker || !over_transparent || !over_no_transparent){
945 , mode
998 } else if (mode == SPRAY_MODE_SINGLE_PATH) {
1061 } else if (mode == SPRAY_MODE_CLONE) {
1075 if(mode == SPRAY_MODE_ERASER || no_overlap || picker || !over_transparent || !over_no_transparent){
1081 , mode
1188 , tc->mode
1243 static void sp_spray_switch_mode(SprayTool *tc, gint mode, bool with_shift)
1245 // Select the button mode
1246 SP_EVENT_CONTEXT(tc)->desktop->setToolboxSelectOneValue("spray_tool_mode", mode);
1248 tc->mode = mode;
1377 switch (this->mode) {
1515 sp_spray_switch_mode (this, prefs->getInt("/tools/spray/mode"), MOD__SHIFT(event));
1519 sp_spray_switch_mode (this, prefs->getInt("/tools/spray/mode"), MOD__SHIFT(event));
1544 mode:c++
1547 indent-tabs-mode:nil