Flat curve editor widget, HSV tool modified to use it.

Usage :
 - click & drag a control point to move it in X&Y direction
 - click & drag a vertical line to move it in horizontal or vertical direction (the very first move will be used to determine the motion direction)
 - click & drag the yellow or blue square handle to modify the tangent of the same color
This commit is contained in:
Hombre
2011-03-24 00:39:48 +01:00
parent e57a56b40f
commit eb4b2d8781
44 changed files with 4778 additions and 2136 deletions

157
tools/FlatCurveType.svg Normal file
View File

@@ -0,0 +1,157 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="24"
height="24"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.46"
version="1.0"
sodipodi:docname="FlatCurveType.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:export-filename="D:\Jean-Christophe\Developpement\WorkspaceCPP\rawtherapee-branch_3.0\rtdata\images\curveType-controlPoints.png"
inkscape:export-xdpi="67.5"
inkscape:export-ydpi="67.5">
<defs
id="defs4">
<linearGradient
id="linearGradient3205">
<stop
style="stop-color:#000000;stop-opacity:0.19512194;"
offset="0"
id="stop3207" />
<stop
style="stop-color:#ffffff;stop-opacity:0.19607843;"
offset="1"
id="stop3209" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective10" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3205"
id="linearGradient3211"
x1="12"
y1="24"
x2="12"
y2="0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0434783,0,0,1.0434783,119.47826,-40.521739)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3205"
id="linearGradient3176"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0434783,0,0,1.0434783,79.47826,-40.521739)"
x1="12"
y1="24"
x2="12"
y2="0" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3205"
id="linearGradient3180"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0434783,0,0,1.0434783,39.47826,-40.521739)"
x1="12"
y1="24"
x2="12"
y2="0" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3205"
id="linearGradient3184"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0434783,0,0,1.0434783,159.47826,-40.521739)"
x1="12"
y1="24"
x2="12"
y2="0" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#212121"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="8.032733"
inkscape:cx="-1.3159037"
inkscape:cy="14.490083"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1680"
inkscape:window-height="994"
inkscape:window-x="-4"
inkscape:window-y="-4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1">
<path
sodipodi:nodetypes="cc"
id="path3279"
d="M 0.79395018,4.7393358 L 13.496704,4.7393358"
style="opacity:0.7;fill:none;fill-rule:evenodd;stroke:#76a400;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<path
style="opacity:0.7;fill:none;fill-rule:evenodd;stroke:#76a400;stroke-width:1.50000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="M 11.878553,17.486282 L 26.412099,17.486282"
id="path3167"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#be0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M -1.029338,14.45208 C 4.449378,0.014494216 11.372085,4.2483768 12.654577,10.859506 C 13.872041,17.135416 21.405958,21.479387 25.362732,12.567088"
id="path3159"
sodipodi:nodetypes="csc" />
<path
sodipodi:nodetypes="cc"
id="path3183"
d="M -39.25,12.033931 L -16.750002,11.966069"
style="opacity:1;fill:none;fill-rule:evenodd;stroke:#be0000;stroke-width:1.49999988;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<path
sodipodi:type="arc"
style="fill:#76a400;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path3155"
sodipodi:cx="5.8999224"
sodipodi:cy="10.497826"
sodipodi:rx="1.1711456"
sodipodi:ry="1.1711456"
d="M 7.0710679,10.497826 A 1.1711456,1.1711456 0 1 1 4.7287768,10.497826 A 1.1711456,1.1711456 0 1 1 7.0710679,10.497826 z"
transform="matrix(2.7600806,0,0,2.7600806,2.861066,-11.488563)" />
<path
transform="matrix(2.7600806,0,0,2.7600806,-9.138934,-24.235509)"
d="M 7.0710679,10.497826 A 1.1711456,1.1711456 0 1 1 4.7287768,10.497826 A 1.1711456,1.1711456 0 1 1 7.0710679,10.497826 z"
sodipodi:ry="1.1711456"
sodipodi:rx="1.1711456"
sodipodi:cy="10.497826"
sodipodi:cx="5.8999224"
id="path3247"
style="fill:#76a400;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
sodipodi:type="arc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.1 KiB