summaryrefslogtreecommitdiffstats
path: root/src/ui/tools
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2019-07-14 20:59:21 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2019-07-14 20:59:21 +0000
commitd608e914802b1dca8100d88c3fddbd19b9fd40da (patch)
tree718df0546f686251f20aa41087d786e19033bba9 /src/ui/tools
parentretain tool color (diff)
downloadinkscape-d608e914802b1dca8100d88c3fddbd19b9fd40da.tar.gz
inkscape-d608e914802b1dca8100d88c3fddbd19b9fd40da.zip
fix compiling issues and some improvements
Diffstat (limited to 'src/ui/tools')
-rw-r--r--src/ui/tools/pencil-tool.cpp14
-rw-r--r--src/ui/tools/pencil-tool.h2
2 files changed, 6 insertions, 10 deletions
diff --git a/src/ui/tools/pencil-tool.cpp b/src/ui/tools/pencil-tool.cpp
index a0dc3201c..f7f6641a1 100644
--- a/src/ui/tools/pencil-tool.cpp
+++ b/src/ui/tools/pencil-tool.cpp
@@ -494,7 +494,7 @@ bool PencilTool::_handleButtonRelease(GdkEventButton const &revent) {
this->ps.clear();
this->_wps.clear();
this->_points_pos.clear();
- this->_points_pressure.clear();
+ this->_pressure_data.clear();
this->_last_point = Geom::Point();
this->_previous_pressure = 0.0;
if (this->green_anchor) {
@@ -725,7 +725,7 @@ void PencilTool::addPowerStrokePencil(bool force)
double pressure_computed = (pressure_shrunk * dezoomify_factor) / 5.0;
this->_last_point = this->ps.back();
this->_last_point *= transform_coordinate.inverse();
- this->_points_pressure.push_back(Geom::Point(0, pressure_computed));
+ this->_pressure_data.push_back(pressure_computed);
this->_points_pos.push_back(this->_last_point);
if (this->_curve && this->ps.size() > 1) {
// Example og work with std::future
@@ -825,13 +825,9 @@ void PencilTool::addPowerStrokePencil(bool force)
Glib::ustring pref_path = "/live_effects/simplify/smooth_angles";
bool valid = prefs->getEntry(pref_path).isValid();
if (!valid) {
- lpe->getRepr()->setAttribute("smooth_angles", "360");
+ lpe->getRepr()->setAttribute("smooth_angles", "0");
}
lpe->getRepr()->setAttribute("threshold", threshold.str());
- lpe->getRepr()->setAttribute("steps", "1");
- lpe->getRepr()->setAttribute("helper_size", "0");
- lpe->getRepr()->setAttribute("simplify_individual_paths", "false");
- lpe->getRepr()->setAttribute("simplify_just_coalesce", "false");
}
sp_lpe_item_update_patheffect(lpeitem, false, true);
curvepressure = powerpreview->getCurve();
@@ -935,7 +931,7 @@ void PencilTool::powerStrokeInterpolate(Geom::Path path)
for (auto pospoint : this->_points_pos) {
Geom::Point pp = pospoint;
pp[Geom::X] = (path.size() / (double)this->_points_pos.size()) * i;
- pp[Geom::Y] = this->_points_pressure[i][Geom::Y];
+ pp[Geom::Y] = this->_pressure_data[i];
if (this->_points_pos.size() - 1 == i ||
(!Geom::are_near(prev[Geom::X], pp[Geom::X], 0.2) && !Geom::are_near(prev[Geom::Y], pp[Geom::Y], step))) {
tmp_points.push_back(pp);
@@ -1107,7 +1103,7 @@ void PencilTool::_sketchInterpolate() {
this->ps.clear();
this->points.clear();
- this->_points_pressure.clear();
+ this->_pressure_data.clear();
this->_wps.clear();
}
diff --git a/src/ui/tools/pencil-tool.h b/src/ui/tools/pencil-tool.h
index 211d21a1a..8efd99ceb 100644
--- a/src/ui/tools/pencil-tool.h
+++ b/src/ui/tools/pencil-tool.h
@@ -79,7 +79,7 @@ private:
void _endpointSnap(Geom::Point &p, guint const state);
std::vector<double> _wps;
std::vector<Geom::Point> _points_pos;
- std::vector<Geom::Point> _points_pressure;
+ std::vector<double> _pressure_data;
Geom::Point _last_point;
double _previous_pressure;
SPCurve * _curve;