Merge lp:~inkscape.dev/inkscape/simplify-lpe-pencil-toolbar into lp:~inkscape.dev/inkscape/trunk
- simplify-lpe-pencil-toolbar
- Merge into trunk
Proposed by
Jabiertxof
Status: | Merged |
---|---|
Approved by: | Jabiertxof |
Approved revision: | 13993 |
Merged at revision: | 14259 |
Proposed branch: | lp:~inkscape.dev/inkscape/simplify-lpe-pencil-toolbar |
Merge into: | lp:~inkscape.dev/inkscape/trunk |
Diff against target: |
217 lines (+90/-4) 7 files modified
share/icons/icons.svg (+4/-0) share/icons/symbolic_icons.svg (+4/-0) share/icons/tango_icons.svg (+4/-0) src/ui/tools/freehand-base.cpp (+24/-0) src/ui/tools/pencil-tool.cpp (+10/-4) src/widgets/pencil-toolbar.cpp (+43/-0) src/widgets/toolbox.cpp (+1/-0) |
To merge this branch: | bzr merge lp:~inkscape.dev/inkscape/simplify-lpe-pencil-toolbar |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Inkscape Developers | Pending | ||
Review via email: mp+252223@code.launchpad.net |
Commit message
Description of the change
This branch add interactive smooth to paths whith the pencil tool
To post a comment you must log in.
Revision history for this message
Jabiertxof (jabiertxof) wrote : | # |
- 13977. By Jabiertxof <email address hidden>
-
fixing icons and update to trunk
- 13978. By Jabiertxof <email address hidden>
-
fix to fit the new parameters of simplify lpe
- 13979. By Jabiertxof <email address hidden>
-
update to trunk
- 13980. By Jabiertxof <email address hidden>
-
Fix new added simplify parameter
- 13981. By Jabiertxof <email address hidden>
-
update to trunk
- 13982. By Jabiertxof <email address hidden>
-
Update to new simplify
- 13983. By Jabiertxof <email address hidden>
-
update to trunk
- 13984. By Jabiertxof <email address hidden>
-
update to trunk
- 13985. By Jabiertxof <email address hidden>
-
astyle simplify LPE
- 13986. By Jabiertxof <email address hidden>
-
Coding style fixes
- 13987. By Jabiertxof <email address hidden>
-
fix a bug in refactor
- 13988. By Jabiertxof <email address hidden>
-
update to trunk
- 13989. By Jabiertxof <email address hidden>
-
change from list to vector
- 13990. By Jabiertxof <email address hidden>
-
updated icons
- 13991. By Jabiertxof <email address hidden>
-
fix icons
Revision history for this message
njh (njh-njhurst) : | # |
Revision history for this message
Jabiertxof (jabiertxof) wrote : | # |
Hi Nathan. Fixed, this check is from the previous code in std::list.
Revision history for this message
Jabiertxof (jabiertxof) wrote : | # |
Ah, I just update this part of code from list to vector and dont view it. Thanks, now is fixed.
Thanks very much for the review!
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'share/icons/icons.svg' | |||
2 | --- share/icons/icons.svg 2015-07-05 10:49:45 +0000 | |||
3 | +++ share/icons/icons.svg 2015-07-25 19:13:01 +0000 | |||
4 | @@ -3954,4 +3954,8 @@ | |||
5 | 3954 | <path style="fill:none;stroke:#c8c8c8;stroke-width:1px;stroke-linecap:square" d="m 12.5,14.5 0,-9" id="path5602-7" /> | 3954 | <path style="fill:none;stroke:#c8c8c8;stroke-width:1px;stroke-linecap:square" d="m 12.5,14.5 0,-9" id="path5602-7" /> |
6 | 3955 | <path style="fill:#ffffff;fill-rule:evenodd;stroke:url(#linearGradient5799-9);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round" d="m 9.5,0.5 4,4 -4,0 0,-4 z" id="path4681-4" /> | 3955 | <path style="fill:#ffffff;fill-rule:evenodd;stroke:url(#linearGradient5799-9);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round" d="m 9.5,0.5 4,4 -4,0 0,-4 z" id="path4681-4" /> |
7 | 3956 | </g> | 3956 | </g> |
8 | 3957 | <g inkscape:label="#interactive_simplify" id="interactive_simplify-8" transform="translate(2.8103663,-3.4622352)"> | ||
9 | 3958 | <rect style="color:#000000;display:inline;fill:none;stroke:none;stroke-width:1;marker:none" id="rect17937-7" width="15.721" height="15.721" x="284.96881" y="535.60986"/> | ||
10 | 3959 | <path style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#1a1a1a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.29999995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;paint-order:normal;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" d="m 290.17927,536.29791 c -0.73508,-0.0198 -1.39622,0.2336 -1.84159,0.74177 -0.44531,0.50792 -0.64525,1.18194 -0.72765,1.87328 -0.16506,1.38275 0.0895,2.98886 0.35184,4.5721 0.26249,1.58323 0.54397,3.14418 0.5465,4.16017 0.002,0.50783 -0.0816,0.85395 -0.14524,0.96912 -0.0636,0.11498 -0.0413,0.13606 -0.31741,0.12818 -0.62469,-0.018 -0.83827,-0.25596 -1.06003,-0.78451 -0.2217,-0.52866 -0.31969,-1.38583 -0.29946,-2.27495 0.0406,-1.77813 0.11807,-2.13825 0.11807,-2.13825 l -1.38194,-0.0121 c 0,0 -0.0337,0.44001 -0.0806,2.49766 -0.0235,1.02877 -0.0407,1.70852 0.34882,2.63692 0.38958,0.92839 1.22621,1.68264 2.3192,1.71432 0.63526,0.0182 1.2607,-0.33475 1.56909,-0.89219 0.30839,-0.55754 0.36843,-1.18568 0.36682,-1.84935 -0.004,-1.32684 -0.31391,-2.90454 -0.57194,-4.461 -0.25796,-1.55655 -0.45229,-3.08947 -0.33837,-4.04395 0.057,-0.47747 0.17846,-0.77307 0.3189,-0.93322 0.14036,-0.16024 0.32929,-0.27384 0.79054,-0.2615 0.45488,0.0122 0.69097,0.12483 0.82198,0.23928 0.13101,0.11437 0.20751,0.2532 0.26202,0.53156 0.109,0.55665 -0.0124,1.58674 -0.21261,2.6612 -0.20016,1.07473 -0.46142,2.18434 -0.43719,3.21672 0.0121,0.5163 0.098,1.05271 0.41323,1.5075 0.31537,0.45497 0.8398,0.71265 1.39541,0.74522 0.46064,0.0271 0.88102,-0.0505 1.23672,-0.27349 0.35569,-0.22306 0.61213,-0.59016 0.7531,-0.95885 0.28203,-0.73745 0.23775,-1.48168 0.21261,-2.157 -0.025,-0.67532 -0.0407,-1.30092 0.021,-1.57246 0.0307,-0.13582 0.0562,-0.15501 0.0568,-0.15554 6.1e-4,-5.1e-4 0.0216,-0.0342 0.20063,-0.029 0.21794,0.005 0.23819,0.0425 0.27101,0.0736 0.0328,0.031 0.0923,0.12248 0.19463,0.32304 0.10226,0.20058 0.24827,0.50789 0.53749,0.77427 0.28932,0.26646 0.7035,0.43865 1.17233,0.46148 1.60943,-0.27583 2.28398,-1.00425 3.4062,-0.0836 l 0,-1.66134 c -1.4875,-0.73615 -2.29389,-0.16099 -3.3448,0.10586 -0.24009,-0.0116 -0.2878,-0.0595 -0.33089,-0.0991 -0.0432,-0.0397 -0.1003,-0.12938 -0.19913,-0.32304 -0.0988,-0.19383 -0.23563,-0.49298 -0.51805,-0.76059 -0.28248,-0.26761 -0.69591,-0.43622 -1.15285,-0.44952 -0.41365,-0.0119 -0.82202,0.10779 -1.13042,0.388 -0.30846,0.28046 -0.47152,0.6683 -0.55246,1.0255 -0.16199,0.71419 -0.0912,1.41292 -0.0674,2.05446 0.0239,0.6418 -0.008,1.20669 -0.0929,1.42888 -0.0426,0.11125 -0.0664,0.13781 -0.12726,0.17604 -0.061,0.0384 -0.19635,0.0897 -0.47163,0.0736 -0.27557,-0.0162 -0.30637,-0.0703 -0.34286,-0.12306 -0.0366,-0.0526 -0.0975,-0.21662 -0.10481,-0.53499 -0.015,-0.63672 0.20013,-1.72004 0.40726,-2.83212 0.20712,-1.11192 0.4237,-2.26505 0.2096,-3.35858 -0.10709,-0.54685 -0.35815,-1.09774 -0.79203,-1.47675 -0.43396,-0.37901 -1.00009,-0.56172 -1.66043,-0.57941 z" id="path14318-5" inkscape:connector-curvature="0" sodipodi:nodetypes="cccccccccccccccccccccsccccccccccccsccccccccccccccccccccc"/> | ||
11 | 3960 | </g> | ||
12 | 3957 | </svg> | 3961 | </svg> |
13 | 3958 | 3962 | ||
14 | === modified file 'share/icons/symbolic_icons.svg' | |||
15 | --- share/icons/symbolic_icons.svg 2015-04-20 23:11:13 +0000 | |||
16 | +++ share/icons/symbolic_icons.svg 2015-07-25 19:13:01 +0000 | |||
17 | @@ -3464,6 +3464,10 @@ | |||
18 | 3464 | <path inkscape:connector-curvature="0" style="fill:url(#linearGradient19282)" d="m 13.969,3 0,1 3,0 a 1,1 0 0 1 1,1 l 0,1 -2,0 2.5,3 2.5,-3 -2,0 0,-1 a 2,2 0 0 0 -2,-2 l -3,0 z" id="path40863-1" /> | 3464 | <path inkscape:connector-curvature="0" style="fill:url(#linearGradient19282)" d="m 13.969,3 0,1 3,0 a 1,1 0 0 1 1,1 l 0,1 -2,0 2.5,3 2.5,-3 -2,0 0,-1 a 2,2 0 0 0 -2,-2 l -3,0 z" id="path40863-1" /> |
19 | 3465 | <path id="path40889-9" d="m 12.969,16 0,-1 -3,0 a 1,1 0 0 1 -1,-1 l 0,-1 2,0 -2.5,-3 -2.5,3 2,0 0,1 a 2,2 0 0 0 2,2 l 3,0 z" style="fill:url(#linearGradient19282)" inkscape:connector-curvature="0" /> | 3465 | <path id="path40889-9" d="m 12.969,16 0,-1 -3,0 a 1,1 0 0 1 -1,-1 l 0,-1 2,0 -2.5,-3 -2.5,3 2,0 0,1 a 2,2 0 0 0 2,2 l 3,0 z" style="fill:url(#linearGradient19282)" inkscape:connector-curvature="0" /> |
20 | 3466 | </g> | 3466 | </g> |
21 | 3467 | <g inkscape:label="#interactive_simplify" id="interactive_simplify-8" transform="translate(2.8103663,-3.4622352)"> | ||
22 | 3468 | <rect style="color:#000000;display:inline;fill:none;stroke:none;stroke-width:1;marker:none" id="rect17937-7" width="15.721" height="15.721" x="284.96881" y="535.60986"/> | ||
23 | 3469 | <path style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#666666;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.29999995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;paint-order:normal;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" d="m 290.17927,536.29791 c -0.73508,-0.0198 -1.39622,0.2336 -1.84159,0.74177 -0.44531,0.50792 -0.64525,1.18194 -0.72765,1.87328 -0.16506,1.38275 0.0895,2.98886 0.35184,4.5721 0.26249,1.58323 0.54397,3.14418 0.5465,4.16017 0.002,0.50783 -0.0816,0.85395 -0.14524,0.96912 -0.0636,0.11498 -0.0413,0.13606 -0.31741,0.12818 -0.62469,-0.018 -0.83827,-0.25596 -1.06003,-0.78451 -0.2217,-0.52866 -0.31969,-1.38583 -0.29946,-2.27495 0.0406,-1.77813 0.11807,-2.13825 0.11807,-2.13825 l -1.38194,-0.0121 c 0,0 -0.0337,0.44001 -0.0806,2.49766 -0.0235,1.02877 -0.0407,1.70852 0.34882,2.63692 0.38958,0.92839 1.22621,1.68264 2.3192,1.71432 0.63526,0.0182 1.2607,-0.33475 1.56909,-0.89219 0.30839,-0.55754 0.36843,-1.18568 0.36682,-1.84935 -0.004,-1.32684 -0.31391,-2.90454 -0.57194,-4.461 -0.25796,-1.55655 -0.45229,-3.08947 -0.33837,-4.04395 0.057,-0.47747 0.17846,-0.77307 0.3189,-0.93322 0.14036,-0.16024 0.32929,-0.27384 0.79054,-0.2615 0.45488,0.0122 0.69097,0.12483 0.82198,0.23928 0.13101,0.11437 0.20751,0.2532 0.26202,0.53156 0.109,0.55665 -0.0124,1.58674 -0.21261,2.6612 -0.20016,1.07473 -0.46142,2.18434 -0.43719,3.21672 0.0121,0.5163 0.098,1.05271 0.41323,1.5075 0.31537,0.45497 0.8398,0.71265 1.39541,0.74522 0.46064,0.0271 0.88102,-0.0505 1.23672,-0.27349 0.35569,-0.22306 0.61213,-0.59016 0.7531,-0.95885 0.28203,-0.73745 0.23775,-1.48168 0.21261,-2.157 -0.025,-0.67532 -0.0407,-1.30092 0.021,-1.57246 0.0307,-0.13582 0.0562,-0.15501 0.0568,-0.15554 6.1e-4,-5.1e-4 0.0216,-0.0342 0.20063,-0.029 0.21794,0.005 0.23819,0.0425 0.27101,0.0736 0.0328,0.031 0.0923,0.12248 0.19463,0.32304 0.10226,0.20058 0.24827,0.50789 0.53749,0.77427 0.28932,0.26646 0.7035,0.43865 1.17233,0.46148 1.60943,-0.27583 2.28398,-1.00425 3.4062,-0.0836 l 0,-1.66134 c -1.4875,-0.73615 -2.29389,-0.16099 -3.3448,0.10586 -0.24009,-0.0116 -0.2878,-0.0595 -0.33089,-0.0991 -0.0432,-0.0397 -0.1003,-0.12938 -0.19913,-0.32304 -0.0988,-0.19383 -0.23563,-0.49298 -0.51805,-0.76059 -0.28248,-0.26761 -0.69591,-0.43622 -1.15285,-0.44952 -0.41365,-0.0119 -0.82202,0.10779 -1.13042,0.388 -0.30846,0.28046 -0.47152,0.6683 -0.55246,1.0255 -0.16199,0.71419 -0.0912,1.41292 -0.0674,2.05446 0.0239,0.6418 -0.008,1.20669 -0.0929,1.42888 -0.0426,0.11125 -0.0664,0.13781 -0.12726,0.17604 -0.061,0.0384 -0.19635,0.0897 -0.47163,0.0736 -0.27557,-0.0162 -0.30637,-0.0703 -0.34286,-0.12306 -0.0366,-0.0526 -0.0975,-0.21662 -0.10481,-0.53499 -0.015,-0.63672 0.20013,-1.72004 0.40726,-2.83212 0.20712,-1.11192 0.4237,-2.26505 0.2096,-3.35858 -0.10709,-0.54685 -0.35815,-1.09774 -0.79203,-1.47675 -0.43396,-0.37901 -1.00009,-0.56172 -1.66043,-0.57941 z" id="path14318-5-3" inkscape:connector-curvature="0" sodipodi:nodetypes="cccccccccccccccccccccsccccccccccccsccccccccccccccccccccc"/> | ||
24 | 3470 | </g> | ||
25 | 3467 | <g id="stock_icons"> | 3471 | <g id="stock_icons"> |
26 | 3468 | <g transform="translate(-270,23)" id="object-rotate-90-CW"> | 3472 | <g transform="translate(-270,23)" id="object-rotate-90-CW"> |
27 | 3469 | <g transform="translate(223.9998,725.3622)" id="g15895" inkscape:label="stock-rotate-270"> | 3473 | <g transform="translate(223.9998,725.3622)" id="g15895" inkscape:label="stock-rotate-270"> |
28 | 3470 | 3474 | ||
29 | === modified file 'share/icons/tango_icons.svg' | |||
30 | --- share/icons/tango_icons.svg 2015-03-08 16:44:59 +0000 | |||
31 | +++ share/icons/tango_icons.svg 2015-07-25 19:13:01 +0000 | |||
32 | @@ -5277,6 +5277,10 @@ | |||
33 | 5277 | <ellipse style="color:#000000;text-decoration:none;text-decoration-line:none;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" id="ellipse47662" cx="18.48884" cy="207.5353" rx="6.611154" ry="6.515604" transform="matrix(0.8723531,0,0,0.8723531,2.360043,26.49119)" /> | 5277 | <ellipse style="color:#000000;text-decoration:none;text-decoration-line:none;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" id="ellipse47662" cx="18.48884" cy="207.5353" rx="6.611154" ry="6.515604" transform="matrix(0.8723531,0,0,0.8723531,2.360043,26.49119)" /> |
34 | 5278 | <rect y="199.5352" x="10.48884" height="15.99999" width="15.99999" id="rect47664" style="color:#000000;display:inline;fill:none;stroke:none;stroke-width:0.531496;marker:none" /> | 5278 | <rect y="199.5352" x="10.48884" height="15.99999" width="15.99999" id="rect47664" style="color:#000000;display:inline;fill:none;stroke:none;stroke-width:0.531496;marker:none" /> |
35 | 5279 | </g> | 5279 | </g> |
36 | 5280 | <g inkscape:label="#interactive_simplify" id="interactive_simplify-8" transform="translate(2.8103663,-3.4622352)"> | ||
37 | 5281 | <rect style="color:#000000;display:inline;fill:none;stroke:none;stroke-width:1;marker:none" id="rect17937-7" width="15.721" height="15.721" x="284.96881" y="535.60986"/> | ||
38 | 5282 | <path style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#555753;fill-opacity:0.98823529;fill-rule:nonzero;stroke:none;stroke-width:1.29999995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;paint-order:normal;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" d="m 290.17927,536.29791 c -0.73508,-0.0198 -1.39622,0.2336 -1.84159,0.74177 -0.44531,0.50792 -0.64525,1.18194 -0.72765,1.87328 -0.16506,1.38275 0.0895,2.98886 0.35184,4.5721 0.26249,1.58323 0.54397,3.14418 0.5465,4.16017 0.002,0.50783 -0.0816,0.85395 -0.14524,0.96912 -0.0636,0.11498 -0.0413,0.13606 -0.31741,0.12818 -0.62469,-0.018 -0.83827,-0.25596 -1.06003,-0.78451 -0.2217,-0.52866 -0.31969,-1.38583 -0.29946,-2.27495 0.0406,-1.77813 0.11807,-2.13825 0.11807,-2.13825 l -1.38194,-0.0121 c 0,0 -0.0337,0.44001 -0.0806,2.49766 -0.0235,1.02877 -0.0407,1.70852 0.34882,2.63692 0.38958,0.92839 1.22621,1.68264 2.3192,1.71432 0.63526,0.0182 1.2607,-0.33475 1.56909,-0.89219 0.30839,-0.55754 0.36843,-1.18568 0.36682,-1.84935 -0.004,-1.32684 -0.31391,-2.90454 -0.57194,-4.461 -0.25796,-1.55655 -0.45229,-3.08947 -0.33837,-4.04395 0.057,-0.47747 0.17846,-0.77307 0.3189,-0.93322 0.14036,-0.16024 0.32929,-0.27384 0.79054,-0.2615 0.45488,0.0122 0.69097,0.12483 0.82198,0.23928 0.13101,0.11437 0.20751,0.2532 0.26202,0.53156 0.109,0.55665 -0.0124,1.58674 -0.21261,2.6612 -0.20016,1.07473 -0.46142,2.18434 -0.43719,3.21672 0.0121,0.5163 0.098,1.05271 0.41323,1.5075 0.31537,0.45497 0.8398,0.71265 1.39541,0.74522 0.46064,0.0271 0.88102,-0.0505 1.23672,-0.27349 0.35569,-0.22306 0.61213,-0.59016 0.7531,-0.95885 0.28203,-0.73745 0.23775,-1.48168 0.21261,-2.157 -0.025,-0.67532 -0.0407,-1.30092 0.021,-1.57246 0.0307,-0.13582 0.0562,-0.15501 0.0568,-0.15554 6.1e-4,-5.1e-4 0.0216,-0.0342 0.20063,-0.029 0.21794,0.005 0.23819,0.0425 0.27101,0.0736 0.0328,0.031 0.0923,0.12248 0.19463,0.32304 0.10226,0.20058 0.24827,0.50789 0.53749,0.77427 0.28932,0.26646 0.7035,0.43865 1.17233,0.46148 1.60943,-0.27583 2.28398,-1.00425 3.4062,-0.0836 l 0,-1.66134 c -1.4875,-0.73615 -2.29389,-0.16099 -3.3448,0.10586 -0.24009,-0.0116 -0.2878,-0.0595 -0.33089,-0.0991 -0.0432,-0.0397 -0.1003,-0.12938 -0.19913,-0.32304 -0.0988,-0.19383 -0.23563,-0.49298 -0.51805,-0.76059 -0.28248,-0.26761 -0.69591,-0.43622 -1.15285,-0.44952 -0.41365,-0.0119 -0.82202,0.10779 -1.13042,0.388 -0.30846,0.28046 -0.47152,0.6683 -0.55246,1.0255 -0.16199,0.71419 -0.0912,1.41292 -0.0674,2.05446 0.0239,0.6418 -0.008,1.20669 -0.0929,1.42888 -0.0426,0.11125 -0.0664,0.13781 -0.12726,0.17604 -0.061,0.0384 -0.19635,0.0897 -0.47163,0.0736 -0.27557,-0.0162 -0.30637,-0.0703 -0.34286,-0.12306 -0.0366,-0.0526 -0.0975,-0.21662 -0.10481,-0.53499 -0.015,-0.63672 0.20013,-1.72004 0.40726,-2.83212 0.20712,-1.11192 0.4237,-2.26505 0.2096,-3.35858 -0.10709,-0.54685 -0.35815,-1.09774 -0.79203,-1.47675 -0.43396,-0.37901 -1.00009,-0.56172 -1.66043,-0.57941 z" id="path14318-5-3" inkscape:connector-curvature="0" sodipodi:nodetypes="cccccccccccccccccccccsccccccccccccsccccccccccccccccccccc"/> | ||
39 | 5283 | </g> | ||
40 | 5280 | <g style="display:inline" transform="translate(13.51115,137.9503)" id="off"> | 5284 | <g style="display:inline" transform="translate(13.51115,137.9503)" id="off"> |
41 | 5281 | <ellipse style="color:#000000;text-decoration:none;text-decoration-line:none;display:inline;overflow:visible;visibility:visible;fill:#a40000;fill-opacity:1;fill-rule:evenodd;stroke:#8d8d8d;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" id="ellipse47668" cx="18.48884" cy="190.0497" rx="6.611154" ry="6.515604" /> | 5285 | <ellipse style="color:#000000;text-decoration:none;text-decoration-line:none;display:inline;overflow:visible;visibility:visible;fill:#a40000;fill-opacity:1;fill-rule:evenodd;stroke:#8d8d8d;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" id="ellipse47668" cx="18.48884" cy="190.0497" rx="6.611154" ry="6.515604" /> |
42 | 5282 | <path style="color:#000000;text-decoration:none;text-decoration-line:none;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" d="M 15.90515,187.466 21.07254,192.6334" id="path47670" inkscape:connector-curvature="0" sodipodi:nodetypes="cc" inkscape:transform-center-x="-5.253213" inkscape:transform-center-y="3.571599" /> | 5286 | <path style="color:#000000;text-decoration:none;text-decoration-line:none;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" d="M 15.90515,187.466 21.07254,192.6334" id="path47670" inkscape:connector-curvature="0" sodipodi:nodetypes="cc" inkscape:transform-center-x="-5.253213" inkscape:transform-center-y="3.571599" /> |
43 | 5283 | 5287 | ||
44 | === modified file 'src/ui/tools/freehand-base.cpp' | |||
45 | --- src/ui/tools/freehand-base.cpp 2015-07-22 20:25:18 +0000 | |||
46 | +++ src/ui/tools/freehand-base.cpp 2015-07-25 19:13:01 +0000 | |||
47 | @@ -21,6 +21,7 @@ | |||
48 | 21 | #endif | 21 | #endif |
49 | 22 | 22 | ||
50 | 23 | #include "live_effects/lpe-patternalongpath.h" | 23 | #include "live_effects/lpe-patternalongpath.h" |
51 | 24 | #include "live_effects/lpe-simplify.h" | ||
52 | 24 | #include "display/canvas-bpath.h" | 25 | #include "display/canvas-bpath.h" |
53 | 25 | #include "xml/repr.h" | 26 | #include "xml/repr.h" |
54 | 26 | #include "svg/svg.h" | 27 | #include "svg/svg.h" |
55 | @@ -266,6 +267,21 @@ | |||
56 | 266 | lpe->getRepr()->setAttribute("offset_points", s.str().c_str()); | 267 | lpe->getRepr()->setAttribute("offset_points", s.str().c_str()); |
57 | 267 | } | 268 | } |
58 | 268 | 269 | ||
59 | 270 | static void spdc_apply_simplify(std::string threshold, FreehandBase *dc, SPItem *item) | ||
60 | 271 | { | ||
61 | 272 | using namespace Inkscape::LivePathEffect; | ||
62 | 273 | |||
63 | 274 | Effect::createAndApply(SIMPLIFY, dc->desktop->doc(), item); | ||
64 | 275 | Effect* lpe = SP_LPE_ITEM(item)->getCurrentLPE(); | ||
65 | 276 | // write powerstroke parameters: | ||
66 | 277 | lpe->getRepr()->setAttribute("steps", "1"); | ||
67 | 278 | lpe->getRepr()->setAttribute("threshold", threshold); | ||
68 | 279 | lpe->getRepr()->setAttribute("smooth_angles", "360"); | ||
69 | 280 | lpe->getRepr()->setAttribute("helper_size", "0"); | ||
70 | 281 | lpe->getRepr()->setAttribute("simplifyindividualpaths", "false"); | ||
71 | 282 | lpe->getRepr()->setAttribute("simplifyJustCoalesce", "false"); | ||
72 | 283 | } | ||
73 | 284 | |||
74 | 269 | static void spdc_check_for_and_apply_waiting_LPE(FreehandBase *dc, SPItem *item, SPCurve *curve) | 285 | static void spdc_check_for_and_apply_waiting_LPE(FreehandBase *dc, SPItem *item, SPCurve *curve) |
75 | 270 | { | 286 | { |
76 | 271 | using namespace Inkscape::LivePathEffect; | 287 | using namespace Inkscape::LivePathEffect; |
77 | @@ -287,6 +303,14 @@ | |||
78 | 287 | 303 | ||
79 | 288 | 304 | ||
80 | 289 | shapeType shape = (shapeType)prefs->getInt(tool_name(dc) + "/shape", 0); | 305 | shapeType shape = (shapeType)prefs->getInt(tool_name(dc) + "/shape", 0); |
81 | 306 | bool simplify = prefs->getInt(tool_name(dc) + "/simplify", 0); | ||
82 | 307 | if(simplify){ | ||
83 | 308 | double tol = prefs->getDoubleLimited("/tools/freehand/pencil/tolerance", 10.0, 1.0, 100.0); | ||
84 | 309 | tol = tol/(100.0*(101.0-tol)); | ||
85 | 310 | std::ostringstream ss; | ||
86 | 311 | ss << tol; | ||
87 | 312 | spdc_apply_simplify(ss.str(), dc, item); | ||
88 | 313 | } | ||
89 | 290 | bool shape_applied = false; | 314 | bool shape_applied = false; |
90 | 291 | SPCSSAttr *css_item = sp_css_attr_from_object(item, SP_STYLE_FLAG_ALWAYS); | 315 | SPCSSAttr *css_item = sp_css_attr_from_object(item, SP_STYLE_FLAG_ALWAYS); |
91 | 292 | const char *cstroke = sp_repr_css_property(css_item, "stroke", "none"); | 316 | const char *cstroke = sp_repr_css_property(css_item, "stroke", "none"); |
92 | 293 | 317 | ||
93 | === modified file 'src/ui/tools/pencil-tool.cpp' | |||
94 | --- src/ui/tools/pencil-tool.cpp 2015-05-29 19:37:41 +0000 | |||
95 | +++ src/ui/tools/pencil-tool.cpp 2015-07-25 19:13:01 +0000 | |||
96 | @@ -635,8 +635,11 @@ | |||
97 | 635 | 635 | ||
98 | 636 | Inkscape::Preferences *prefs = Inkscape::Preferences::get(); | 636 | Inkscape::Preferences *prefs = Inkscape::Preferences::get(); |
99 | 637 | double const tol = prefs->getDoubleLimited("/tools/freehand/pencil/tolerance", 10.0, 1.0, 100.0) * 0.4; | 637 | double const tol = prefs->getDoubleLimited("/tools/freehand/pencil/tolerance", 10.0, 1.0, 100.0) * 0.4; |
102 | 638 | double const tolerance_sq = 0.02 * square(this->desktop->w2d().descrim() * tol) * exp(0.2 * tol - 2); | 638 | double tolerance_sq = 0.02 * square(this->desktop->w2d().descrim() * tol) * exp(0.2 * tol - 2); |
103 | 639 | 639 | bool simplify = prefs->getInt("/tools/freehand/pencil/simplify", 0); | |
104 | 640 | if(simplify){ | ||
105 | 641 | tolerance_sq = 0; | ||
106 | 642 | } | ||
107 | 640 | g_assert(is_zero(this->req_tangent) || is_unit_vector(this->req_tangent)); | 643 | g_assert(is_zero(this->req_tangent) || is_unit_vector(this->req_tangent)); |
108 | 641 | 644 | ||
109 | 642 | this->green_curve->reset(); | 645 | this->green_curve->reset(); |
110 | @@ -703,8 +706,11 @@ | |||
111 | 703 | 706 | ||
112 | 704 | Inkscape::Preferences *prefs = Inkscape::Preferences::get(); | 707 | Inkscape::Preferences *prefs = Inkscape::Preferences::get(); |
113 | 705 | double const tol = prefs->getDoubleLimited("/tools/freehand/pencil/tolerance", 10.0, 1.0, 100.0) * 0.4; | 708 | double const tol = prefs->getDoubleLimited("/tools/freehand/pencil/tolerance", 10.0, 1.0, 100.0) * 0.4; |
116 | 706 | double const tolerance_sq = 0.02 * square(this->desktop->w2d().descrim() * tol) * exp(0.2 * tol - 2); | 709 | double tolerance_sq = 0.02 * square(this->desktop->w2d().descrim() * tol) * exp(0.2 * tol - 2); |
117 | 707 | 710 | bool simplify = prefs->getInt("/tools/freehand/pencil/simplify", 0); | |
118 | 711 | if(simplify){ | ||
119 | 712 | tolerance_sq = 0; | ||
120 | 713 | } | ||
121 | 708 | bool average_all_sketches = prefs->getBool("/tools/freehand/pencil/average_all_sketches", true); | 714 | bool average_all_sketches = prefs->getBool("/tools/freehand/pencil/average_all_sketches", true); |
122 | 709 | 715 | ||
123 | 710 | g_assert(is_zero(this->req_tangent) || is_unit_vector(this->req_tangent)); | 716 | g_assert(is_zero(this->req_tangent) || is_unit_vector(this->req_tangent)); |
124 | 711 | 717 | ||
125 | === modified file 'src/widgets/pencil-toolbar.cpp' | |||
126 | --- src/widgets/pencil-toolbar.cpp 2014-10-06 00:18:46 +0000 | |||
127 | +++ src/widgets/pencil-toolbar.cpp 2015-07-25 19:13:01 +0000 | |||
128 | @@ -28,6 +28,7 @@ | |||
129 | 28 | # include "config.h" | 28 | # include "config.h" |
130 | 29 | #endif | 29 | #endif |
131 | 30 | 30 | ||
132 | 31 | #include <gtkmm.h> | ||
133 | 31 | #include <glibmm/i18n.h> | 32 | #include <glibmm/i18n.h> |
134 | 32 | 33 | ||
135 | 33 | #include "pencil-toolbar.h" | 34 | #include "pencil-toolbar.h" |
136 | @@ -43,6 +44,12 @@ | |||
137 | 43 | #include "ui/tools/pen-tool.h" | 44 | #include "ui/tools/pen-tool.h" |
138 | 44 | #include "ui/uxmanager.h" | 45 | #include "ui/uxmanager.h" |
139 | 45 | #include "widgets/spinbutton-events.h" | 46 | #include "widgets/spinbutton-events.h" |
140 | 47 | #include <selection.h> | ||
141 | 48 | #include "live_effects/lpe-simplify.h" | ||
142 | 49 | #include "live_effects/effect-enum.h" | ||
143 | 50 | #include "live_effects/lpeobject.h" | ||
144 | 51 | #include "sp-lpe-item.h" | ||
145 | 52 | #include "util/glib-list-iterators.h" | ||
146 | 46 | 53 | ||
147 | 47 | using Inkscape::UI::UXManager; | 54 | using Inkscape::UI::UXManager; |
148 | 48 | using Inkscape::DocumentUndo; | 55 | using Inkscape::DocumentUndo; |
149 | @@ -151,6 +158,12 @@ | |||
150 | 151 | prefs->setInt(freehand_tool_name(dataKludge) + "/shape", shape); | 158 | prefs->setInt(freehand_tool_name(dataKludge) + "/shape", shape); |
151 | 152 | } | 159 | } |
152 | 153 | 160 | ||
153 | 161 | static void freehand_simplify_lpe(InkToggleAction* itact, GObject *dataKludge) { | ||
154 | 162 | gint simplify = gtk_toggle_action_get_active( GTK_TOGGLE_ACTION(itact) ); | ||
155 | 163 | Inkscape::Preferences *prefs = Inkscape::Preferences::get(); | ||
156 | 164 | prefs->setInt(freehand_tool_name(dataKludge) + "/simplify", simplify); | ||
157 | 165 | } | ||
158 | 166 | |||
159 | 154 | /** | 167 | /** |
160 | 155 | * Generate the list of freehand advanced shape option entries. | 168 | * Generate the list of freehand advanced shape option entries. |
161 | 156 | */ | 169 | */ |
162 | @@ -232,6 +245,24 @@ | |||
163 | 232 | prefs->setDouble("/tools/freehand/pencil/tolerance", | 245 | prefs->setDouble("/tools/freehand/pencil/tolerance", |
164 | 233 | gtk_adjustment_get_value(adj)); | 246 | gtk_adjustment_get_value(adj)); |
165 | 234 | g_object_set_data( tbl, "freeze", GINT_TO_POINTER(FALSE) ); | 247 | g_object_set_data( tbl, "freeze", GINT_TO_POINTER(FALSE) ); |
166 | 248 | SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data(tbl, "desktop")); | ||
167 | 249 | std::vector<SPItem *> selected = desktop->getSelection()->itemList(); | ||
168 | 250 | for (std::vector<SPItem *>::iterator it(selected.begin()); it != selected.end(); ++it){ | ||
169 | 251 | SPLPEItem* lpeitem = dynamic_cast<SPLPEItem*>(*it); | ||
170 | 252 | if (lpeitem && lpeitem->hasPathEffect()){ | ||
171 | 253 | Inkscape::LivePathEffect::Effect* thisEffect = lpeitem->getPathEffectOfType(Inkscape::LivePathEffect::SIMPLIFY); | ||
172 | 254 | if(thisEffect){ | ||
173 | 255 | Inkscape::LivePathEffect::LPESimplify *lpe = dynamic_cast<Inkscape::LivePathEffect::LPESimplify*>(thisEffect->getLPEObj()->get_lpe()); | ||
174 | 256 | if (lpe) { | ||
175 | 257 | double tol = prefs->getDoubleLimited("/tools/freehand/pencil/tolerance", 10.0, 1.0, 100.0); | ||
176 | 258 | tol = tol/(100.0*(101.0-tol)); | ||
177 | 259 | std::ostringstream ss; | ||
178 | 260 | ss << tol; | ||
179 | 261 | lpe->getRepr()->setAttribute("threshold", ss.str()); | ||
180 | 262 | } | ||
181 | 263 | } | ||
182 | 264 | } | ||
183 | 265 | } | ||
184 | 235 | } | 266 | } |
185 | 236 | 267 | ||
186 | 237 | /* | 268 | /* |
187 | @@ -303,6 +334,18 @@ | |||
188 | 303 | g_signal_connect_after( G_OBJECT(inky), "activate", G_CALLBACK(sp_pencil_tb_defaults), holder ); | 334 | g_signal_connect_after( G_OBJECT(inky), "activate", G_CALLBACK(sp_pencil_tb_defaults), holder ); |
189 | 304 | gtk_action_group_add_action( mainActions, GTK_ACTION(inky) ); | 335 | gtk_action_group_add_action( mainActions, GTK_ACTION(inky) ); |
190 | 305 | } | 336 | } |
191 | 337 | /* LPE simplify based tolerance */ | ||
192 | 338 | { | ||
193 | 339 | Inkscape::Preferences *prefs = Inkscape::Preferences::get(); | ||
194 | 340 | InkToggleAction* itact = ink_toggle_action_new( "PencilLpeSimplify", | ||
195 | 341 | _("LPE based interactive simplify"), | ||
196 | 342 | _("LPE based interactive simplify"), | ||
197 | 343 | INKSCAPE_ICON("interactive_simplify"), | ||
198 | 344 | Inkscape::ICON_SIZE_SMALL_TOOLBAR ); | ||
199 | 345 | gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(itact), prefs->getInt("/tools/freehand/pencil/simplify", 0) ); | ||
200 | 346 | g_signal_connect_after( G_OBJECT(itact), "toggled", G_CALLBACK(freehand_simplify_lpe), holder) ; | ||
201 | 347 | gtk_action_group_add_action( mainActions, GTK_ACTION(itact) ); | ||
202 | 348 | } | ||
203 | 306 | 349 | ||
204 | 307 | g_signal_connect( holder, "destroy", G_CALLBACK(purge_repr_listener), holder ); | 350 | g_signal_connect( holder, "destroy", G_CALLBACK(purge_repr_listener), holder ); |
205 | 308 | 351 | ||
206 | 309 | 352 | ||
207 | === modified file 'src/widgets/toolbox.cpp' | |||
208 | --- src/widgets/toolbox.cpp 2015-04-27 23:38:31 +0000 | |||
209 | +++ src/widgets/toolbox.cpp 2015-07-25 19:13:01 +0000 | |||
210 | @@ -398,6 +398,7 @@ | |||
211 | 398 | " <toolitem action='FreehandModeActionPencil' />" | 398 | " <toolitem action='FreehandModeActionPencil' />" |
212 | 399 | " <separator />" | 399 | " <separator />" |
213 | 400 | " <toolitem action='PencilToleranceAction' />" | 400 | " <toolitem action='PencilToleranceAction' />" |
214 | 401 | " <toolitem action='PencilLpeSimplify' />" | ||
215 | 401 | " <separator />" | 402 | " <separator />" |
216 | 402 | " <toolitem action='PencilResetAction' />" | 403 | " <toolitem action='PencilResetAction' />" |
217 | 403 | " <separator />" | 404 | " <separator />" |
here are a video working: https:/ /www.youtube. com/watch? v=xDef4hU4tNc