summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/filletchamferpointarray.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-11-03 20:54:01 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-11-03 20:54:01 +0000
commit3dfff76972208b0328ac7937bb9e9fe037560a26 (patch)
tree8f17e0be3cdd75feb89b17b893d0df89a3723a9f /src/live_effects/parameter/filletchamferpointarray.cpp
parentupdate svg-length-test.h from 90 to 96 dpi (diff)
downloadinkscape-3dfff76972208b0328ac7937bb9e9fe037560a26.tar.gz
inkscape-3dfff76972208b0328ac7937bb9e9fe037560a26.zip
Update fillet/chamfer to allow subdivisions in chamfer mode.
Still happends bug affecting only selected nodes in document:units diferent than "px". I think the problem is node->position() send me a bad data if document units not px. (bzr r13665)
Diffstat (limited to 'src/live_effects/parameter/filletchamferpointarray.cpp')
-rw-r--r--src/live_effects/parameter/filletchamferpointarray.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/live_effects/parameter/filletchamferpointarray.cpp b/src/live_effects/parameter/filletchamferpointarray.cpp
index 165dcd930..f43f6108d 100644
--- a/src/live_effects/parameter/filletchamferpointarray.cpp
+++ b/src/live_effects/parameter/filletchamferpointarray.cpp
@@ -359,6 +359,11 @@ void FilletChamferPointArrayParam::set_helper_size(int hs)
helper_size = hs;
}
+void FilletChamferPointArrayParam::set_chamferSteps(int chamferSteps)
+{
+ chamfer_steps = chamferSteps;
+}
+
void FilletChamferPointArrayParam::set_use_distance(bool use_knot_distance )
{
use_distance = use_knot_distance;
@@ -767,14 +772,17 @@ void FilletChamferPointArrayParamKnotHolderEntity::knot_click(guint state)
}else{
using namespace Geom;
double type = _pparam->_vector.at(_index)[Y] + 1;
- if (type > 4) {
+ if (type > 3) {
type = 1;
}
+ if (type == 3){
+ type = _pparam->chamfer_steps;
+ }
_pparam->_vector.at(_index) = Point(_pparam->_vector.at(_index)[X], type);
_pparam->param_set_and_write_new_value(_pparam->_vector);
sp_lpe_item_update_patheffect(SP_LPE_ITEM(item), false, false);
const gchar *tip;
- if (type == 3) {
+ if (type >= 3) {
tip = _("<b>Chamfer</b>: <b>Ctrl+Click</b> toogle type, "
"<b>Shift+Click</b> open dialog, "
"<b>Ctrl+Alt+Click</b> reset");
@@ -786,10 +794,6 @@ void FilletChamferPointArrayParamKnotHolderEntity::knot_click(guint state)
tip = _("<b>Fillet</b>: <b>Ctrl+Click</b> toogle type, "
"<b>Shift+Click</b> open dialog, "
"<b>Ctrl+Alt+Click</b> reset");
- } else {
- tip = _("<b>Double Chamfer</b>: <b>Ctrl+Click</b> toogle type, "
- "<b>Shift+Click</b> open dialog, "
- "<b>Ctrl+Alt+Click</b> reset");
}
this->knot->tip = g_strdup(tip);
this->knot->show();
@@ -835,7 +839,7 @@ void FilletChamferPointArrayParam::addKnotHolderEntities(KnotHolder *knotholder,
continue;
}
const gchar *tip;
- if (_vector[i][Y] == 3) {
+ if (_vector[i][Y] >= 3) {
tip = _("<b>Chamfer</b>: <b>Ctrl+Click</b> toogle type, "
"<b>Shift+Click</b> open dialog, "
"<b>Ctrl+Alt+Click</b> reset");
@@ -847,10 +851,6 @@ void FilletChamferPointArrayParam::addKnotHolderEntities(KnotHolder *knotholder,
tip = _("<b>Fillet</b>: <b>Ctrl+Click</b> toogle type, "
"<b>Shift+Click</b> open dialog, "
"<b>Ctrl+Alt+Click</b> reset");
- } else {
- tip = _("<b>Double Chamfer</b>: <b>Ctrl+Click</b> toogle type, "
- "<b>Shift+Click</b> open dialog, "
- "<b>Ctrl+Alt+Click</b> reset");
}
FilletChamferPointArrayParamKnotHolderEntity *e =
new FilletChamferPointArrayParamKnotHolderEntity(this, i);