From db164d8341a6dca5cab6fdc4576234bc656ac6f7 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sun, 12 Nov 2017 18:10:11 +0100 Subject: Base refactor --- src/ui/dialog/inkscape-preferences.cpp | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'src/ui/dialog/inkscape-preferences.cpp') diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 79d8b7411..665b9643c 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -204,12 +204,12 @@ void InkscapePreferences::AddBaseSimplifySpinbutton(DialogPage &p, Glib::ustring false ); } -void InkscapePreferences::AddPressureSensibility(DialogPage &p, Glib::ustring const &prefs_path, double def_value) +void InkscapePreferences::AddPressureSensitivity(DialogPage &p, Glib::ustring const &prefs_path, double def_value) { PrefSpinButton* sb = Gtk::manage( new PrefSpinButton); - sb->init ( prefs_path + "/pressure-sensibility", 1, 100.0, 1.0, 10.0, def_value, true, false); - p.add_line( false, _("Pressure sensibility:"), *sb, _("on tablet usage"), - _("Pressure sensibility, 12 is the default value"), + sb->init ( prefs_path + "/pressure-sensitivity", 1, 100.0, 1.0, 10.0, def_value, true, false); + p.add_line( false, _("Pressure sensitivity:"), *sb, _("on tablet usage"), + _("Pressure sensitivity, 12 is the default value"), false ); } @@ -217,8 +217,8 @@ void InkscapePreferences::AddPowerStrokeKnotDistanceFactor(DialogPage &p, Glib:: { PrefSpinButton* sb = Gtk::manage( new PrefSpinButton); sb->init ( prefs_path + "/knots-distance", 0.1, 9999.0, 1.0, 10.0, def_value, false, false); - p.add_line( false, _("Pressure min knot distance factor:"), *sb, _("on tablet usage"), - _("Min distance between knots, this is a factor value computed with other parameters, 135 is the default one"), + p.add_line( false, _("Minimum knot distance factor:"), *sb, _("on tablet usage"), + _("This unitless value affects the density of LPE knots. The default value is 135. A small value allows you to draw squiggly lines, while a higher value creates smoother lines with less width differences."), false ); } @@ -226,19 +226,11 @@ void InkscapePreferences::AddPowerStrokeGapPressureFactor(DialogPage &p, Glib::u { PrefSpinButton* sb = Gtk::manage( new PrefSpinButton); sb->init ( prefs_path + "/gap-pressure", 0.01, 9999.0, 1.0, 10.0, def_value, false, false); - p.add_line( false, _("Pressure inputs difference for made knots:"), *sb, _("on tablet usage"), - _("Diference between input pressure to make a powerstroke knot, this is a factor value computed with other parameters, 1 is the default value"), + p.add_line( false, _("Pressure change needed to create knot:"), *sb, _("on tablet usage"), + _("Difference in pressure that is required to create a new PowerStroke knot. This factor is one of several that are taken into account when deciding where to place a knot. The default value is 1."), false ); } -void InkscapePreferences::AddPowerStrokeUseOptimusValues(DialogPage &p, Glib::ustring const &prefs_path, bool def_value) -{ - PrefCheckButton* cb = Gtk::manage( new PrefCheckButton); - cb->init ( _("Use optimiced powerstroke values instead the default ones:"), prefs_path + "/optimus-powerstroke", def_value); - p.add_line( false, "", *cb, "", _("Use optimized powerstroke parameters values in pencil tool por pressure inputs instead the default ones")); -} - - static void StyleFromSelectionToTool(Glib::ustring const &prefs_path, StyleSwatch *swatch) { SPDesktop *desktop = SP_ACTIVE_DESKTOP; @@ -457,9 +449,8 @@ void InkscapePreferences::initPageTools() this->AddNewObjectsStyle(_page_pencil, "/tools/freehand/pencil"); this->AddDotSizeSpinbutton(_page_pencil, "/tools/freehand/pencil", 3.0); this->AddBaseSimplifySpinbutton(_page_pencil, "/tools/freehand/pencil", 25.0); - _page_pencil.add_group_header( _("Pencil pressure")); - this->AddPowerStrokeUseOptimusValues(_page_pencil, "/tools/freehand/pencil", true); - this->AddPressureSensibility(_page_pencil, "/tools/freehand/pencil", 12.0); + _page_pencil.add_group_header( _("Pressure sensitivity settings")); + this->AddPressureSensitivity(_page_pencil, "/tools/freehand/pencil", 12.0); this->AddPowerStrokeKnotDistanceFactor(_page_pencil, "/tools/freehand/pencil", 135.0); this->AddPowerStrokeGapPressureFactor(_page_pencil, "/tools/freehand/pencil", 1.0); -- cgit v1.2.3 From 4c790c63b7918e2745420c082bfa13e69cec74bd Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sun, 19 Nov 2017 02:47:56 +0100 Subject: Working on fix smooth draw --- src/ui/dialog/inkscape-preferences.cpp | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'src/ui/dialog/inkscape-preferences.cpp') diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 665b9643c..93168a727 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -204,30 +204,22 @@ void InkscapePreferences::AddBaseSimplifySpinbutton(DialogPage &p, Glib::ustring false ); } -void InkscapePreferences::AddPressureSensitivity(DialogPage &p, Glib::ustring const &prefs_path, double def_value) -{ - PrefSpinButton* sb = Gtk::manage( new PrefSpinButton); - sb->init ( prefs_path + "/pressure-sensitivity", 1, 100.0, 1.0, 10.0, def_value, true, false); - p.add_line( false, _("Pressure sensitivity:"), *sb, _("on tablet usage"), - _("Pressure sensitivity, 12 is the default value"), - false ); -} void InkscapePreferences::AddPowerStrokeKnotDistanceFactor(DialogPage &p, Glib::ustring const &prefs_path, double def_value) { PrefSpinButton* sb = Gtk::manage( new PrefSpinButton); sb->init ( prefs_path + "/knots-distance", 0.1, 9999.0, 1.0, 10.0, def_value, false, false); p.add_line( false, _("Minimum knot distance factor:"), *sb, _("on tablet usage"), - _("This unitless value affects the density of LPE knots. The default value is 135. A small value allows you to draw squiggly lines, while a higher value creates smoother lines with less width differences."), + _("This unitless value affects the density of LPE knots. A small value allows you to draw squiggly lines, while a higher value creates smoother lines with less width differences."), false ); } -void InkscapePreferences::AddPowerStrokeGapPressureFactor(DialogPage &p, Glib::ustring const &prefs_path, double def_value) +void InkscapePreferences::AddPowerStrokeGapPressureFactor(DialogPage &p, Glib::ustring const &prefs_path, gint def_value) { PrefSpinButton* sb = Gtk::manage( new PrefSpinButton); - sb->init ( prefs_path + "/gap-pressure", 0.01, 9999.0, 1.0, 10.0, def_value, false, false); - p.add_line( false, _("Pressure change needed to create knot:"), *sb, _("on tablet usage"), - _("Difference in pressure that is required to create a new PowerStroke knot. This factor is one of several that are taken into account when deciding where to place a knot. The default value is 1."), + sb->init ( prefs_path + "/gap-pressure", 1, 100, 1, 10, def_value, true, false); + p.add_line( false, _("Minimun pressure % diference needed to create knot:"), *sb, _("on tablet usage"), + _("Minimun percent difference in pressure that is required to create a new PowerStroke knot."), false ); } @@ -450,9 +442,8 @@ void InkscapePreferences::initPageTools() this->AddDotSizeSpinbutton(_page_pencil, "/tools/freehand/pencil", 3.0); this->AddBaseSimplifySpinbutton(_page_pencil, "/tools/freehand/pencil", 25.0); _page_pencil.add_group_header( _("Pressure sensitivity settings")); - this->AddPressureSensitivity(_page_pencil, "/tools/freehand/pencil", 12.0); this->AddPowerStrokeKnotDistanceFactor(_page_pencil, "/tools/freehand/pencil", 135.0); - this->AddPowerStrokeGapPressureFactor(_page_pencil, "/tools/freehand/pencil", 1.0); + this->AddPowerStrokeGapPressureFactor(_page_pencil, "/tools/freehand/pencil", 10); _page_pencil.add_group_header( _("Sketch mode")); _page_pencil.add_line( true, "", _pencil_average_all_sketches, "", -- cgit v1.2.3 From d91112f7116f50489bd93047f6e7bc0985512c68 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sun, 19 Nov 2017 23:54:21 +0100 Subject: Working on coontinuing paths --- src/ui/dialog/inkscape-preferences.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'src/ui/dialog/inkscape-preferences.cpp') diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 93168a727..ef69fdade 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -204,22 +204,12 @@ void InkscapePreferences::AddBaseSimplifySpinbutton(DialogPage &p, Glib::ustring false ); } - -void InkscapePreferences::AddPowerStrokeKnotDistanceFactor(DialogPage &p, Glib::ustring const &prefs_path, double def_value) -{ - PrefSpinButton* sb = Gtk::manage( new PrefSpinButton); - sb->init ( prefs_path + "/knots-distance", 0.1, 9999.0, 1.0, 10.0, def_value, false, false); - p.add_line( false, _("Minimum knot distance factor:"), *sb, _("on tablet usage"), - _("This unitless value affects the density of LPE knots. A small value allows you to draw squiggly lines, while a higher value creates smoother lines with less width differences."), - false ); -} - void InkscapePreferences::AddPowerStrokeGapPressureFactor(DialogPage &p, Glib::ustring const &prefs_path, gint def_value) { PrefSpinButton* sb = Gtk::manage( new PrefSpinButton); sb->init ( prefs_path + "/gap-pressure", 1, 100, 1, 10, def_value, true, false); - p.add_line( false, _("Minimun pressure % diference needed to create knot:"), *sb, _("on tablet usage"), - _("Minimun percent difference in pressure that is required to create a new PowerStroke knot."), + p.add_line( false, _("Pressure diference on knots:"), *sb, _("%"), + _("Pressure diference percent that is required to create a new PowerStroke knot."), false ); } @@ -442,7 +432,6 @@ void InkscapePreferences::initPageTools() this->AddDotSizeSpinbutton(_page_pencil, "/tools/freehand/pencil", 3.0); this->AddBaseSimplifySpinbutton(_page_pencil, "/tools/freehand/pencil", 25.0); _page_pencil.add_group_header( _("Pressure sensitivity settings")); - this->AddPowerStrokeKnotDistanceFactor(_page_pencil, "/tools/freehand/pencil", 135.0); this->AddPowerStrokeGapPressureFactor(_page_pencil, "/tools/freehand/pencil", 10); _page_pencil.add_group_header( _("Sketch mode")); -- cgit v1.2.3 From 157d892c95684c195bfe9ad050e8c881cc3d4555 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Wed, 22 Nov 2017 23:58:26 +0100 Subject: Working on continuous paths --- src/ui/dialog/inkscape-preferences.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ui/dialog/inkscape-preferences.cpp') diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index ef69fdade..99312f8c8 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -204,12 +204,12 @@ void InkscapePreferences::AddBaseSimplifySpinbutton(DialogPage &p, Glib::ustring false ); } -void InkscapePreferences::AddPowerStrokeGapPressureFactor(DialogPage &p, Glib::ustring const &prefs_path, gint def_value) +void InkscapePreferences::AddPencilPowerStrokePressureStep(DialogPage &p, Glib::ustring const &prefs_path, gint def_value) { PrefSpinButton* sb = Gtk::manage( new PrefSpinButton); - sb->init ( prefs_path + "/gap-pressure", 1, 100, 1, 10, def_value, true, false); - p.add_line( false, _("Pressure diference on knots:"), *sb, _("%"), - _("Pressure diference percent that is required to create a new PowerStroke knot."), + sb->init ( prefs_path + "/ps-step-pressure", 1, 100, 1, 10, def_value, true, false); + p.add_line( false, _("Pressure change for new knot:"), *sb, _("%"), + _("Percentage increase / decrease of stylus pressure that is required to create a new PowerStroke knot."), false ); } @@ -432,7 +432,7 @@ void InkscapePreferences::initPageTools() this->AddDotSizeSpinbutton(_page_pencil, "/tools/freehand/pencil", 3.0); this->AddBaseSimplifySpinbutton(_page_pencil, "/tools/freehand/pencil", 25.0); _page_pencil.add_group_header( _("Pressure sensitivity settings")); - this->AddPowerStrokeGapPressureFactor(_page_pencil, "/tools/freehand/pencil", 10); + this->AddPencilPowerStrokePressureStep(_page_pencil, "/tools/freehand/pencil", 10); _page_pencil.add_group_header( _("Sketch mode")); _page_pencil.add_line( true, "", _pencil_average_all_sketches, "", -- cgit v1.2.3 From eb2502c7271cdee9b7b31bd641fa729bad00c38b Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Fri, 8 Dec 2017 20:40:18 +0100 Subject: Moving tolerance --- src/ui/dialog/inkscape-preferences.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/ui/dialog/inkscape-preferences.cpp') diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index adeee35fd..74774f8f4 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -213,6 +213,15 @@ void InkscapePreferences::AddPencilPowerStrokePressureStep(DialogPage &p, Glib:: false ); } +void InkscapePreferences::AddPencilPowerStrokeMinSimplify(DialogPage &p, Glib::ustring const &prefs_path, gint def_value) +{ + PrefSpinButton* sb = Gtk::manage( new PrefSpinButton); + sb->init ( prefs_path + "/powerstrokemintolerance", 1, 100, 1, 10, def_value, true, false); + p.add_line( false, _("Power Stroke base min simplify:"), *sb, _("%"), + _("Base simplify for pencil with pressure"), + false ); +} + static void StyleFromSelectionToTool(Glib::ustring const &prefs_path, StyleSwatch *swatch) { SPDesktop *desktop = SP_ACTIVE_DESKTOP; @@ -433,6 +442,7 @@ void InkscapePreferences::initPageTools() this->AddBaseSimplifySpinbutton(_page_pencil, "/tools/freehand/pencil", 25.0); _page_pencil.add_group_header( _("Pressure sensitivity settings")); this->AddPencilPowerStrokePressureStep(_page_pencil, "/tools/freehand/pencil", 10); + this->AddPencilPowerStrokeMinSimplify(_page_pencil, "/tools/freehand/pencil", 40); _page_pencil.add_group_header( _("Sketch mode")); _page_pencil.add_line( true, "", _pencil_average_all_sketches, "", -- cgit v1.2.3 From 3d059a10fd17411f73e88ccde2cd853642ee7dc3 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Mon, 18 Dec 2017 01:11:36 +0100 Subject: Working on powerstroke fixes to pentool --- src/ui/dialog/inkscape-preferences.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/ui/dialog/inkscape-preferences.cpp') diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index d75b22ddb..eb4a6567e 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -213,15 +213,6 @@ void InkscapePreferences::AddPencilPowerStrokePressureStep(DialogPage &p, Glib:: false ); } -void InkscapePreferences::AddPencilPowerStrokeMinSimplify(DialogPage &p, Glib::ustring const &prefs_path, gint def_value) -{ - PrefSpinButton* sb = Gtk::manage( new PrefSpinButton); - sb->init ( prefs_path + "/powerstrokemintolerance", 1, 100, 1, 10, def_value, true, false); - p.add_line( false, _("Power Stroke base min simplify:"), *sb, _("%"), - _("Base simplify for pencil with pressure"), - false ); -} - static void StyleFromSelectionToTool(Glib::ustring const &prefs_path, StyleSwatch *swatch) { SPDesktop *desktop = SP_ACTIVE_DESKTOP; @@ -442,7 +433,6 @@ void InkscapePreferences::initPageTools() this->AddBaseSimplifySpinbutton(_page_pencil, "/tools/freehand/pencil", 25.0); _page_pencil.add_group_header( _("Pressure sensitivity settings")); this->AddPencilPowerStrokePressureStep(_page_pencil, "/tools/freehand/pencil", 10); - this->AddPencilPowerStrokeMinSimplify(_page_pencil, "/tools/freehand/pencil", 40); _page_pencil.add_group_header( _("Sketch mode")); _page_pencil.add_line( true, "", _pencil_average_all_sketches, "", -- cgit v1.2.3 From d25de3679d94cc03fdba8aba4de20fab723b4b27 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Tue, 26 Dec 2017 17:14:27 +0100 Subject: Fix power stroke closed path and minor tweacks for pencil powerstroke --- src/ui/dialog/inkscape-preferences.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/dialog/inkscape-preferences.cpp') diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index eb4a6567e..0ac12d15c 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -432,7 +432,7 @@ void InkscapePreferences::initPageTools() this->AddDotSizeSpinbutton(_page_pencil, "/tools/freehand/pencil", 3.0); this->AddBaseSimplifySpinbutton(_page_pencil, "/tools/freehand/pencil", 25.0); _page_pencil.add_group_header( _("Pressure sensitivity settings")); - this->AddPencilPowerStrokePressureStep(_page_pencil, "/tools/freehand/pencil", 10); + this->AddPencilPowerStrokePressureStep(_page_pencil, "/tools/freehand/pencil", 5); _page_pencil.add_group_header( _("Sketch mode")); _page_pencil.add_line( true, "", _pencil_average_all_sketches, "", -- cgit v1.2.3