Commit 4de33f29 authored by Eugene Ingerman's avatar Eugene Ingerman

Should build the collection tree

Differential Revision: https://phabricator.kde.org/D12
parent e11b18eb
......@@ -88,3 +88,4 @@ endif()
target_link_libraries(KisMaskGeneratorBenchmark kritaimage Qt5::Test)
target_link_libraries(KisThumbnailBenchmark kritaimage Qt5::Test)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 16 16"
enable-background="new 0 0 100 100"
xml:space="preserve"
id="svg3336"
inkscape:version="0.91 r13725"
sodipodi:docname="dark_krita_tool_smart_patch.svg"
width="16"
height="16"><title
id="title3715">Bandage by Lee Mette from the Noun Project</title><metadata
id="metadata3372"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>Bandage by Lee Mette from the Noun Project</dc:title><cc:license
rdf:resource="http://creativecommons.org/licenses/by/3.0/" /></cc:Work><cc:License
rdf:about="http://creativecommons.org/licenses/by/3.0/"><cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" /><cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" /><cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" /><cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" /><cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /></cc:License></rdf:RDF></metadata><defs
id="defs3370" /><sodipodi:namedview
pagecolor="#474747"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1007"
id="namedview3368"
showgrid="false"
inkscape:showpageshadow="false"
inkscape:zoom="24"
inkscape:cx="14.948494"
inkscape:cy="3.2017544"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g3338" /><g
transform="matrix(0,-0.0185914,-0.0185914,0,221.7681,17.306346)"
id="g3338"><path
d="m 751.2,11875 c -20.4,15.7 -50.3,19.1 -73.5,8.6 -12.6,-5.7 -8.8,-2.2 -98.6,-91.9 l -82.3,-82.3 -82.3,82.3 c -89.8,89.8 -86,86.2 -98.6,91.9 -17,7.7 -39.4,8 -57,0.7 -14.2,-5.8 -9.4,-1.5 -80.5,-72.6 l -64,-64 -3.4,-6.1 c -8.6,-15.3 -11.7,-32 -9.2,-49 1.2,-7.8 3.3,-14.2 7.5,-22.6 l 3.3,-6.7 84.4,-84.7 84.4,-84.6 -82.6,-82.6 c -70.7,-70.7 -83,-83.3 -85.8,-87.6 -15.2,-23.4 -15.9,-52.5 -1.9,-77.5 l 3.4,-6.1 61.2,-61.6 c 43.3,-43.5 62.7,-62.7 66.5,-65.6 19.8,-14.9 44.4,-19 67.5,-11.4 2.5,0.8 7.5,2.9 11.2,4.8 l 6.7,3.3 84.7,84.3 84.7,84.5 84.7,-84.5 84.7,-84.3 6.7,-3.3 c 3.7,-1.9 8.7,-4 11.2,-4.8 23.1,-7.6 47.6,-3.5 67.5,11.4 3.8,2.8 23.3,22.1 66.5,65.6 l 61.2,61.6 3.4,6.1 c 14,25 13.3,54.1 -1.9,77.5 -2.8,4.3 -15.1,16.9 -85.8,87.6 l -82.6,82.6 84.4,84.7 84.3,84.7 3.3,6.7 c 4.2,8.4 6.3,14.8 7.5,22.6 2.5,16.9 -0.6,33.6 -9.2,49 l -3.4,6.1 -61.9,62 c -34.3,34 -64,63.4 -66.4,65.2 z m 100.2,-152.8 c 6.9,-11.7 6.3,-27.2 -1.5,-38.5 -1.9,-2.8 -22.1,-23.4 -62.9,-64.2 l -60.1,-60.1 -82.3,82.3 -82.3,82.3 59.8,59.8 c 36.2,36.2 61.4,60.9 63.9,62.7 11.4,8.2 27.3,9 39.6,1.8 2.6,-1.4 18,-16.5 63.3,-61.8 52.4,-52.2 60.3,-60.4 62.5,-64.3 z m -152.5,-190.8 -12.1,-12.1 -82.3,82.3 -82.3,82.3 12.1,12.1 12.1,12.1 82.3,-82.3 82.3,-82.3 -12.1,-12.1 z m -349.9,110.3 -82.3,-82.3 -60.1,60.1 c -40.8,40.8 -61,61.4 -62.9,64.2 -5.7,8.3 -7.8,20.2 -5.3,29.9 2.5,9.3 0.9,7.6 66,72.7 38,38 60.8,60.3 62.9,61.6 11.7,7.3 28.9,7 39.8,-0.9 1.9,-1.3 30.6,-29.5 63.9,-62.7 l 60.4,-60.3 -82.4,-82.3 z m 281.5,-281.4 -82.3,-82.3 -132.8,132.8 -132.8,132.8 82.3,82.3 82.3,82.3 132.8,-132.8 132.8,-132.8 -82.3,-82.3 z m 222.4,-61.1 c 4.6,-10.9 4.4,-22.8 -0.6,-32.2 -2.7,-5 -4,-6.4 -63.1,-65.4 -58.4,-58.4 -60.5,-60.4 -65.3,-62.9 -11.8,-6.3 -26.4,-5.4 -37.4,2.2 -2.8,1.9 -23,21.7 -63,61.7 l -58.9,58.9 82.3,82.3 82.4,82.4 60.8,-61.1 60.7,-61.1 2.1,-4.8 z m -394.5,-8.3 -13,-13 -42.1,41.9 c -23.3,23 -60.3,60.1 -82.3,82.3 l -40.2,40.4 13,13 13,13 82.3,-82.3 82.3,-82.3 -13,-13 z m -88.4,-88.4 c -40,-40 -60.3,-59.8 -63,-61.7 -11,-7.6 -25.6,-8.4 -37.4,-2.2 -4.7,2.5 -6.8,4.5 -65.3,62.9 -59.1,59.1 -60.4,60.4 -63.1,65.4 -5,9.4 -5.2,21.4 -0.6,32.2 l 2,4.7 60.8,61.1 60.7,61.1 82.4,-82.4 82.3,-82.3 -58.8,-58.8 z"
id="path3340"
inkscape:connector-curvature="0"
style="fill:#373737;fill-opacity:1" /><path
d="m 462.3,11647.5 c -13.8,4.7 -28.1,-5.8 -28,-20.4 -0.1,-5.5 1.3,-9 4.9,-13.3 4.4,-5.3 8.9,-7.6 15.5,-8 12.7,-0.7 22.9,9.4 22.2,22.2 -0.5,9.1 -6.1,16.6 -14.6,19.5 z"
id="path3342"
inkscape:connector-curvature="0"
style="fill:#373737;fill-opacity:1" /><path
d="m 521.7,11588.2 c -10.5,4.8 -22.8,0.5 -28.4,-10.2 -2.4,-4.4 -2.7,-13 -0.5,-17.6 3.8,-8.5 11.8,-13.5 20.8,-13 6.1,0.3 10,2.1 14.7,6.8 9.9,10 6.5,27.9 -6.6,34 z"
id="path3344"
inkscape:connector-curvature="0"
style="fill:#373737;fill-opacity:1" /><path
d="m 583,11527.6 c -10.9,5.8 -24.4,1.7 -29.7,-9 -6,-11.9 -0.3,-25.7 12.4,-30 6,-2.1 11.4,-1.5 17.5,1.8 7.3,4 11.6,12.6 10.4,20.9 -0.8,6.7 -5.3,13.5 -10.6,16.3 z"
id="path3346"
inkscape:connector-curvature="0"
style="fill:#373737;fill-opacity:1" /><path
d="m 640.2,11469.7 c -10.9,5 -24.9,-0.6 -29.2,-11.7 -2,-5.4 -1.5,-13.2 1.4,-18.4 7,-12.8 24.8,-14.8 34.3,-3.8 1.9,2.1 3.8,5.3 4.4,7 1.5,4.1 1.5,10.7 0.1,14.7 -1.4,4.3 -7,10.3 -11,12.2 z"
id="path3348"
inkscape:connector-curvature="0"
style="fill:#373737;fill-opacity:1" /><path
d="m 442.6,11572.9 c -9.7,4.3 -21.3,1.2 -26.9,-7.3 -5.2,-7.9 -5.1,-16.6 0.2,-24.7 2.1,-3.1 3.3,-4.2 6.7,-6.1 14.2,-7.8 31.1,1.6 31.9,17.5 0.1,2.5 -0.3,6.1 -0.9,8 -1.5,4.7 -6.8,10.7 -11,12.6 z"
id="path3350"
inkscape:connector-curvature="0"
style="fill:#373737;fill-opacity:1" /><path
d="m 499.9,11513.9 c -8.1,4 -16.5,3.1 -23.3,-2.3 -6.6,-5.2 -9.5,-15 -6.9,-23.4 0.9,-2.9 2.1,-4.7 5.5,-8.1 5.3,-5.3 9.5,-6.9 16.6,-6.3 15.7,1.2 24.5,17.9 16.9,31.9 -2.6,4.8 -3.6,5.7 -8.8,8.2 z"
id="path3352"
inkscape:connector-curvature="0"
style="fill:#373737;fill-opacity:1" /><path
d="m 560.8,11453.7 c -7.3,4.2 -15.8,3.9 -22.8,-0.6 -14.4,-9.3 -11.9,-31.9 4.2,-37.7 2.4,-0.9 6.7,-1.5 9.5,-1.4 20.6,1.4 27.1,29.5 9.1,39.7 z"
id="path3354"
inkscape:connector-curvature="0"
style="fill:#373737;fill-opacity:1" /><path
d="m 373.5,11553 c -10.8,5.7 -24.5,1.7 -29.6,-8.9 -3.7,-7.5 -3.3,-15.2 1.2,-22 7.4,-11.1 23.6,-12.5 33,-2.8 9.7,10.1 7.3,27.3 -4.6,33.7 z"
id="path3356"
inkscape:connector-curvature="0"
style="fill:#373737;fill-opacity:1" /><path
d="m 431.1,11494 c -4.2,2.6 -7.4,3.4 -12.8,3 -15.1,-0.9 -24.5,-16.9 -17.9,-30.6 6.3,-13 23.8,-16.3 33.8,-6.3 4.7,4.7 6.5,8.6 6.8,14.7 0.4,7.8 -3.5,15.4 -9.9,19.2 z"
id="path3358"
inkscape:connector-curvature="0"
style="fill:#373737;fill-opacity:1" /><path
d="m 491.3,11434.1 c -6.9,4.1 -14.7,4.4 -21.5,1 -9.3,-4.7 -13.7,-15.6 -10.6,-26 0.8,-2.8 2.1,-4.7 5.5,-8.1 4,-4 5,-4.6 9.1,-5.5 13,-3.1 24.3,4.2 26.8,17.2 1.5,7.4 -3,17.6 -9.3,21.4 z"
id="path3360"
inkscape:connector-curvature="0"
style="fill:#373737;fill-opacity:1" /><path
d="m 549.7,11375.4 c -4,2.4 -7,3.2 -12.1,3.1 -9.1,-0.1 -16.5,-5.5 -19.5,-14.3 -4.8,-14 5.3,-28.3 20.1,-28.2 5.7,-0.1 9.9,1.6 14.4,5.5 10.4,9.3 9,26.7 -2.9,33.9 z"
id="path3362"
inkscape:connector-curvature="0"
style="fill:#373737;fill-opacity:1" /></g></svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 16 16"
enable-background="new 0 0 100 100"
xml:space="preserve"
id="svg3336"
inkscape:version="0.91 r13725"
sodipodi:docname="light_krita_tool_smart_patch.svg"
width="16"
height="16"><title
id="title3715">Bandage by Lee Mette from the Noun Project</title><metadata
id="metadata3372"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>Bandage by Lee Mette from the Noun Project</dc:title><cc:license
rdf:resource="http://creativecommons.org/licenses/by/3.0/" /></cc:Work><cc:License
rdf:about="http://creativecommons.org/licenses/by/3.0/"><cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" /><cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" /><cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" /><cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" /><cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /></cc:License></rdf:RDF></metadata><defs
id="defs3370" /><sodipodi:namedview
pagecolor="#474747"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1007"
id="namedview3368"
showgrid="false"
inkscape:showpageshadow="false"
inkscape:zoom="24"
inkscape:cx="14.948494"
inkscape:cy="3.2017544"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g3338" /><g
transform="matrix(0,-0.0185914,-0.0185914,0,221.7681,17.306346)"
id="g3338"><path
d="m 751.2,11875 c -20.4,15.7 -50.3,19.1 -73.5,8.6 -12.6,-5.7 -8.8,-2.2 -98.6,-91.9 l -82.3,-82.3 -82.3,82.3 c -89.8,89.8 -86,86.2 -98.6,91.9 -17,7.7 -39.4,8 -57,0.7 -14.2,-5.8 -9.4,-1.5 -80.5,-72.6 l -64,-64 -3.4,-6.1 c -8.6,-15.3 -11.7,-32 -9.2,-49 1.2,-7.8 3.3,-14.2 7.5,-22.6 l 3.3,-6.7 84.4,-84.7 84.4,-84.6 -82.6,-82.6 c -70.7,-70.7 -83,-83.3 -85.8,-87.6 -15.2,-23.4 -15.9,-52.5 -1.9,-77.5 l 3.4,-6.1 61.2,-61.6 c 43.3,-43.5 62.7,-62.7 66.5,-65.6 19.8,-14.9 44.4,-19 67.5,-11.4 2.5,0.8 7.5,2.9 11.2,4.8 l 6.7,3.3 84.7,84.3 84.7,84.5 84.7,-84.5 84.7,-84.3 6.7,-3.3 c 3.7,-1.9 8.7,-4 11.2,-4.8 23.1,-7.6 47.6,-3.5 67.5,11.4 3.8,2.8 23.3,22.1 66.5,65.6 l 61.2,61.6 3.4,6.1 c 14,25 13.3,54.1 -1.9,77.5 -2.8,4.3 -15.1,16.9 -85.8,87.6 l -82.6,82.6 84.4,84.7 84.3,84.7 3.3,6.7 c 4.2,8.4 6.3,14.8 7.5,22.6 2.5,16.9 -0.6,33.6 -9.2,49 l -3.4,6.1 -61.9,62 c -34.3,34 -64,63.4 -66.4,65.2 z m 100.2,-152.8 c 6.9,-11.7 6.3,-27.2 -1.5,-38.5 -1.9,-2.8 -22.1,-23.4 -62.9,-64.2 l -60.1,-60.1 -82.3,82.3 -82.3,82.3 59.8,59.8 c 36.2,36.2 61.4,60.9 63.9,62.7 11.4,8.2 27.3,9 39.6,1.8 2.6,-1.4 18,-16.5 63.3,-61.8 52.4,-52.2 60.3,-60.4 62.5,-64.3 z m -152.5,-190.8 -12.1,-12.1 -82.3,82.3 -82.3,82.3 12.1,12.1 12.1,12.1 82.3,-82.3 82.3,-82.3 -12.1,-12.1 z m -349.9,110.3 -82.3,-82.3 -60.1,60.1 c -40.8,40.8 -61,61.4 -62.9,64.2 -5.7,8.3 -7.8,20.2 -5.3,29.9 2.5,9.3 0.9,7.6 66,72.7 38,38 60.8,60.3 62.9,61.6 11.7,7.3 28.9,7 39.8,-0.9 1.9,-1.3 30.6,-29.5 63.9,-62.7 l 60.4,-60.3 -82.4,-82.3 z m 281.5,-281.4 -82.3,-82.3 -132.8,132.8 -132.8,132.8 82.3,82.3 82.3,82.3 132.8,-132.8 132.8,-132.8 -82.3,-82.3 z m 222.4,-61.1 c 4.6,-10.9 4.4,-22.8 -0.6,-32.2 -2.7,-5 -4,-6.4 -63.1,-65.4 -58.4,-58.4 -60.5,-60.4 -65.3,-62.9 -11.8,-6.3 -26.4,-5.4 -37.4,2.2 -2.8,1.9 -23,21.7 -63,61.7 l -58.9,58.9 82.3,82.3 82.4,82.4 60.8,-61.1 60.7,-61.1 2.1,-4.8 z m -394.5,-8.3 -13,-13 -42.1,41.9 c -23.3,23 -60.3,60.1 -82.3,82.3 l -40.2,40.4 13,13 13,13 82.3,-82.3 82.3,-82.3 -13,-13 z m -88.4,-88.4 c -40,-40 -60.3,-59.8 -63,-61.7 -11,-7.6 -25.6,-8.4 -37.4,-2.2 -4.7,2.5 -6.8,4.5 -65.3,62.9 -59.1,59.1 -60.4,60.4 -63.1,65.4 -5,9.4 -5.2,21.4 -0.6,32.2 l 2,4.7 60.8,61.1 60.7,61.1 82.4,-82.4 82.3,-82.3 -58.8,-58.8 z"
id="path3340"
inkscape:connector-curvature="0"
style="fill:#cacaca;fill-opacity:1;stroke:#646464;stroke-opacity:1" /><path
d="m 462.3,11647.5 c -13.8,4.7 -28.1,-5.8 -28,-20.4 -0.1,-5.5 1.3,-9 4.9,-13.3 4.4,-5.3 8.9,-7.6 15.5,-8 12.7,-0.7 22.9,9.4 22.2,22.2 -0.5,9.1 -6.1,16.6 -14.6,19.5 z"
id="path3342"
inkscape:connector-curvature="0"
style="fill:#cacaca;fill-opacity:1" /><path
d="m 521.7,11588.2 c -10.5,4.8 -22.8,0.5 -28.4,-10.2 -2.4,-4.4 -2.7,-13 -0.5,-17.6 3.8,-8.5 11.8,-13.5 20.8,-13 6.1,0.3 10,2.1 14.7,6.8 9.9,10 6.5,27.9 -6.6,34 z"
id="path3344"
inkscape:connector-curvature="0"
style="fill:#cacaca;fill-opacity:1" /><path
d="m 583,11527.6 c -10.9,5.8 -24.4,1.7 -29.7,-9 -6,-11.9 -0.3,-25.7 12.4,-30 6,-2.1 11.4,-1.5 17.5,1.8 7.3,4 11.6,12.6 10.4,20.9 -0.8,6.7 -5.3,13.5 -10.6,16.3 z"
id="path3346"
inkscape:connector-curvature="0"
style="fill:#cacaca;fill-opacity:1" /><path
d="m 640.2,11469.7 c -10.9,5 -24.9,-0.6 -29.2,-11.7 -2,-5.4 -1.5,-13.2 1.4,-18.4 7,-12.8 24.8,-14.8 34.3,-3.8 1.9,2.1 3.8,5.3 4.4,7 1.5,4.1 1.5,10.7 0.1,14.7 -1.4,4.3 -7,10.3 -11,12.2 z"
id="path3348"
inkscape:connector-curvature="0"
style="fill:#cacaca;fill-opacity:1" /><path
d="m 442.6,11572.9 c -9.7,4.3 -21.3,1.2 -26.9,-7.3 -5.2,-7.9 -5.1,-16.6 0.2,-24.7 2.1,-3.1 3.3,-4.2 6.7,-6.1 14.2,-7.8 31.1,1.6 31.9,17.5 0.1,2.5 -0.3,6.1 -0.9,8 -1.5,4.7 -6.8,10.7 -11,12.6 z"
id="path3350"
inkscape:connector-curvature="0"
style="fill:#cacaca;fill-opacity:1" /><path
d="m 499.9,11513.9 c -8.1,4 -16.5,3.1 -23.3,-2.3 -6.6,-5.2 -9.5,-15 -6.9,-23.4 0.9,-2.9 2.1,-4.7 5.5,-8.1 5.3,-5.3 9.5,-6.9 16.6,-6.3 15.7,1.2 24.5,17.9 16.9,31.9 -2.6,4.8 -3.6,5.7 -8.8,8.2 z"
id="path3352"
inkscape:connector-curvature="0"
style="fill:#cacaca;fill-opacity:1" /><path
d="m 560.8,11453.7 c -7.3,4.2 -15.8,3.9 -22.8,-0.6 -14.4,-9.3 -11.9,-31.9 4.2,-37.7 2.4,-0.9 6.7,-1.5 9.5,-1.4 20.6,1.4 27.1,29.5 9.1,39.7 z"
id="path3354"
inkscape:connector-curvature="0"
style="fill:#cacaca;fill-opacity:1" /><path
d="m 373.5,11553 c -10.8,5.7 -24.5,1.7 -29.6,-8.9 -3.7,-7.5 -3.3,-15.2 1.2,-22 7.4,-11.1 23.6,-12.5 33,-2.8 9.7,10.1 7.3,27.3 -4.6,33.7 z"
id="path3356"
inkscape:connector-curvature="0"
style="fill:#cacaca;fill-opacity:1" /><path
d="m 431.1,11494 c -4.2,2.6 -7.4,3.4 -12.8,3 -15.1,-0.9 -24.5,-16.9 -17.9,-30.6 6.3,-13 23.8,-16.3 33.8,-6.3 4.7,4.7 6.5,8.6 6.8,14.7 0.4,7.8 -3.5,15.4 -9.9,19.2 z"
id="path3358"
inkscape:connector-curvature="0"
style="fill:#cacaca;fill-opacity:1" /><path
d="m 491.3,11434.1 c -6.9,4.1 -14.7,4.4 -21.5,1 -9.3,-4.7 -13.7,-15.6 -10.6,-26 0.8,-2.8 2.1,-4.7 5.5,-8.1 4,-4 5,-4.6 9.1,-5.5 13,-3.1 24.3,4.2 26.8,17.2 1.5,7.4 -3,17.6 -9.3,21.4 z"
id="path3360"
inkscape:connector-curvature="0"
style="fill:#cacaca;fill-opacity:1" /><path
d="m 549.7,11375.4 c -4,2.4 -7,3.2 -12.1,3.1 -9.1,-0.1 -16.5,-5.5 -19.5,-14.3 -4.8,-14 5.3,-28.3 20.1,-28.2 5.7,-0.1 9.9,1.6 14.4,5.5 10.4,9.3 9,26.7 -2.9,33.9 z"
id="path3362"
inkscape:connector-curvature="0"
style="fill:#cacaca;fill-opacity:1" /></g></svg>
\ No newline at end of file
......@@ -75,6 +75,7 @@
<file>light_shape_handling.svg</file>
<file>dark_krita_tool_lazybrush.svg</file>
<file>light_krita_tool_lazybrush.svg</file>
<file>dark_krita_tool_smart_patch.svg</file>
<file>light_krita_tool_smart_patch.svg</file>
</qresource>
</RCC>
......@@ -244,6 +244,7 @@ set(kritaimage_LIB_SRCS
kis_liquify_transform_worker.cpp
kis_green_coordinates_math.cpp
kis_transparency_mask.cc
kis_inpaint_mask.cpp
kis_undo_adapter.cpp
kis_macro_based_undo_store.cpp
kis_surrogate_undo_adapter.cpp
......
/*
* Copyright (c) 2017 Eugene Ingerman
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "kis_inpaint_mask.h"
#include "kis_debug.h"
#include <KoIcon.h>
#include <kis_icon.h>
#include <KoColor.h>
#include <KoColorSpace.h>
#include <KoCompositeOpRegistry.h>
#include "kis_paint_device.h"
#include "kis_painter.h"
#include "kis_node_visitor.h"
#include "kis_processing_visitor.h"
#include "KoColorSpaceRegistry.h"
KisInpaintMask::KisInpaintMask()
: KisTransparencyMask()
{
}
KisInpaintMask::KisInpaintMask(const KisInpaintMask& rhs)
: KisTransparencyMask(rhs)
{
}
KisInpaintMask::~KisInpaintMask()
{
}
QRect KisInpaintMask::decorateRect(KisPaintDeviceSP &src,
KisPaintDeviceSP &dst,
const QRect & rc,
PositionToFilthy maskPos) const
{
Q_UNUSED(maskPos);
KIS_ASSERT(dst != src);
if (src != dst) {
KisPainter::copyAreaOptimized(rc.topLeft(), src, dst, rc);
src->fill(rc, KoColor(Qt::magenta, src->colorSpace()));
}
return rc;
}
/*
* Copyright (c) 2017 Eugene Ingerman
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _KIS_INPAINT_MASK_
#define _KIS_INPAINT_MASK_
#include "kis_types.h"
#include "kis_transparency_mask.h"
class QRect;
/**
* A inpaint mask is a single channel mask that works with inpaint operation to denote area affected by inpaint operation.
*
*/
class KRITAIMAGE_EXPORT KisInpaintMask : public KisTransparencyMask
{
Q_OBJECT
public:
KisInpaintMask();
KisInpaintMask(const KisInpaintMask& rhs);
virtual ~KisInpaintMask();
KisNodeSP clone() const
{
return KisNodeSP(new KisInpaintMask(*this));
}
QRect decorateRect(KisPaintDeviceSP &src, KisPaintDeviceSP &dst,
const QRect & rc,
PositionToFilthy maskPos) const;
};
#endif //_KIS_INPAINT_MASK_
......@@ -43,7 +43,7 @@ public:
QMap<QString, KisExportCheckBase*> capabilities;
Private()
: updater(0)
: updater(0), mime("")
, batchmode(false)
{}
......
......@@ -138,8 +138,7 @@ KisImportExportFilter *KisImportExportManager::filterForMimeType(const QString &
{
int weight = -1;
KisImportExportFilter *filter = 0;
KoJsonTrader trader;
QList<QPluginLoader *>list = trader.query("Krita/FileFilter", "");
QList<QPluginLoader *>list = KoJsonTrader::instance()->query("Krita/FileFilter", "");
Q_FOREACH(QPluginLoader *loader, list) {
QJsonObject json = loader->metaData().value("MetaData").toObject();
QString directionKey = direction == Export ? "X-KDE-Export" : "X-KDE-Import";
......
......@@ -36,6 +36,7 @@
#include <lazybrush/kis_colorize_mask.h>
#include <kis_transform_mask.h>
#include <kis_transparency_mask.h>
#include <kis_inpaint_mask.h>
#include <kis_selection_mask.h>
#include <kis_effect_mask.h>
#include "dialogs/kis_dlg_adjustment_layer.h"
......@@ -189,6 +190,7 @@ void KisMaskManager::createTransparencyMask(KisNodeSP activeNode, KisPaintDevice
createMaskCommon(mask, activeNode, copyFrom, kundo2_i18n("Add Transparency Mask"), "KisTransparencyMask", i18n("Transparency Mask"), false, avoidActiveNode);
}
void KisMaskManager::createFilterMask(KisNodeSP activeNode, KisPaintDeviceSP copyFrom, bool quiet, bool avoidActiveNode)
{
KisFilterMaskSP mask = new KisFilterMask();
......@@ -229,6 +231,7 @@ void KisMaskManager::createFilterMask(KisNodeSP activeNode, KisPaintDeviceSP cop
}
}
void KisMaskManager::createColorizeMask(KisNodeSP activeNode)
{
KisColorizeMaskSP mask = new KisColorizeMask();
......@@ -238,6 +241,7 @@ void KisMaskManager::createColorizeMask(KisNodeSP activeNode)
delete mask->setColorSpace(mask->parent()->colorSpace());
}
void KisMaskManager::createTransformMask(KisNodeSP activeNode)
{
KisTransformMaskSP mask = new KisTransformMask();
......
......@@ -514,7 +514,6 @@ void KisNodeManager::createNode(const QString & nodeType, bool quiet, KisPaintDe
} else if (nodeType == "KisFileLayer") {
m_d->layerManager.addFileLayer(activeNode);
}
}
void KisNodeManager::createFromVisible()
......
......@@ -328,7 +328,6 @@ void KisVisualColorSelector::slotRebuildSelectors()
m_d->widgetlist.append(block2);
}
Q_ASSERT(m_d->widgetlist.size() == 2);
this->setLayout(layout);
}
......
......@@ -3,8 +3,12 @@ include_directories( ${CMAKE_SOURCE_DIR}/sdk/tests )
include(KritaAddBrokenUnitTest)
macro_add_unittest_definitions()
include(ECMAddTests)
krita_add_broken_unit_test(kis_brushop_test.cpp ../../../../../sdk/tests/stroke_testing_utils.cpp
TEST_NAME krita-plugins-KisBrushOpTest
LINK_LIBRARIES kritaimage kritaui kritalibpaintop Qt5::Test)
/*
* Copyright (c) 2016 Eugene Ingerman
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __KIS_CLONEOP_TEST_H
#define __KIS_CLONEOP_TEST_H
#include <QtTest>
class KisCloneOpTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
void testClone();
private:
void testProjection();
};
#endif /* __KIS_CLONEOP_TEST_H */
......@@ -9,3 +9,4 @@ add_subdirectory( tool_dyna )
add_subdirectory( tool_text )
add_subdirectory( karbonplugins )
add_subdirectory( tool_lazybrush )
add_subdirectory( tool_smart_patch )
set(kritatoolSmartPatch_SOURCES
tool_smartpatch.cpp
kis_tool_smart_patch.cpp
kis_tool_smart_patch_options_widget.cpp
kis_inpaint.cpp
)
ki18n_wrap_ui(kritatoolSmartPatch_SOURCES kis_tool_smart_patch_options_widget.ui)
add_library(kritatoolSmartPatch MODULE ${kritatoolSmartPatch_SOURCES})
generate_export_header(kritatoolSmartPatch BASE_NAME kritatoolSmartPatch)
target_link_libraries(kritatoolSmartPatch kritaui)
install(TARGETS kritatoolSmartPatch DESTINATION ${KRITA_PLUGIN_INSTALL_DIR})
This diff is collapsed.
/*
* Copyright (c) 2017 Eugene Ingerman
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "kis_tool_smart_patch.h"
#include "QApplication"
#include <klocalizedstring.h>
#include <KoCanvasBase.h>
#include <KisViewManager.h>
#include "kis_canvas2.h"
#include "kis_cursor.h"
#include "kis_config.h"
#include "kundo2magicstring.h"
#include "KoProperties.h"
#include "KoColorSpaceRegistry.h"
#include "KoShapeController.h"
#include "KoDocumentResourceManager.h"
#include "kis_node_manager.h"
#include "kis_cursor.h"
#include "kis_tool_smart_patch_options_widget.h"
#include "libs/image/kis_paint_device_debug_utils.h"
#include "kis_resources_snapshot.h"
#include "kis_layer.h"
#include "kis_transaction.h"
#include "kis_paint_layer.h"
#include "kis_inpaint_mask.h"
QRect patchImage(KisPaintDeviceSP imageDev, KisPaintDeviceSP maskDev, int radius, int accuracy);
struct KisToolSmartPatch::Private {
KisMaskSP mask = nullptr;
KisNodeSP maskNode = nullptr;
KisNodeSP paintNode = nullptr;
KisPaintDeviceSP imageDev = nullptr;
KisPaintDeviceSP maskDev = nullptr;
KisResourcesSnapshotSP resources = nullptr;
KoColor currentFgColor;
KisToolSmartPatchOptionsWidget *optionsWidget = nullptr;
};
KisToolSmartPatch::KisToolSmartPatch(KoCanvasBase * canvas)
: KisToolFreehand(canvas,
KisCursor::load("tool_freehand_cursor.png", 5, 5),
kundo2_i18n("Smart Patch Stroke")),
m_d(new Private)
{
setObjectName("tool_SmartPatch");
}
KisToolSmartPatch::~KisToolSmartPatch()
{
m_d->optionsWidget = nullptr;
}
void KisToolSmartPatch::activate(ToolActivation activation, const QSet<KoShape*> &shapes)
{
KisToolFreehand::activate(activation, shapes);
}
void KisToolSmartPatch::deactivate()
{
KisToolFreehand::deactivate();
}
void KisToolSmartPatch::resetCursorStyle()
{
KisToolFreehand::resetCursorStyle();
}
bool KisToolSmartPatch::canCreateInpaintMask() const
{
KisNodeSP node = currentNode();
return node && node->inherits("KisPaintLayer");
}
QRect KisToolSmartPatch::inpaintImage(KisPaintDeviceSP maskDev, KisPaintDeviceSP imageDev)
{
int accuracy = 50; //default accuracy - middle value
int patchRadius = 4; //default radius, which works well for most cases tested
if (!m_d.isNull() && m_d->optionsWidget) {
accuracy = m_d->optionsWidget->getAccuracy();
patchRadius = m_d->optionsWidget->getPatchRadius();
}
return patchImage(imageDev, maskDev, patchRadius, accuracy);
}
void KisToolSmartPatch::activatePrimaryAction()
{
KisToolFreehand::activatePrimaryAction();
}
void KisToolSmartPatch::deactivatePrimaryAction()
{
KisToolFreehand::deactivatePrimaryAction();
}
void KisToolSmartPatch::createInpaintMask(void)
{
m_d->mask = new KisInpaintMask();
KisLayerSP parentLayer = qobject_cast<KisLayer*>(m_d->paintNode.data());
m_d->mask->initSelection(parentLayer);
image()->addNode(m_d->mask, m_d->paintNode);
}
void KisToolSmartPatch::deleteInpaintMask(void)
{
KisCanvas2 * kiscanvas = static_cast<KisCanvas2*>(canvas());
KisViewManager* viewManager = kiscanvas->viewManager();
if (! m_d->paintNode.isNull())
viewManager->nodeManager()->slotNonUiActivatedNode(m_d->paintNode);
image()->removeNode(m_d->mask);
m_d->mask = nullptr;
}
void KisToolSmartPatch::beginPrimaryAction(KoPointerEvent *event)
{
m_d->paintNode = currentNode();
KisCanvas2 * kiscanvas = static_cast<KisCanvas2*>(canvas());
KisViewManager* viewManager = kiscanvas->viewManager();
//we can only apply inpaint operation to paint layer
if (!m_d->paintNode.isNull() && m_d->paintNode->inherits("KisPaintLayer")) {
if (!m_d->mask.isNull()) {
viewManager->nodeManager()->slotNonUiActivatedNode(m_d->mask);
} else {
createInpaintMask();
viewManager->nodeManager()->slotNonUiActivatedNode(m_d->mask);
//Collapse freehand drawing of the mask followed by inpaint operation into a single undo node
canvas()->shapeController()->resourceManager()->undoStack()->beginMacro(kundo2_i18n("Smart Patch"));
//User will be drawing on an alpha mask. Show color matching inpaint mask color.
m_d->currentFgColor = canvas()->resourceManager()->foregroundColor();
canvas()->resourceManager()->setForegroundColor(KoColor(Qt::magenta, image()->colorSpace()));
}
KisToolFreehand::beginPrimaryAction(event);
} else {
viewManager->
showFloatingMessage(
i18n("Select a paint layer to use this tool"),
QIcon(), 2000, KisFloatingMessage::Medium, Qt::AlignCenter);
}
}
void KisToolSmartPatch::continuePrimaryAction(KoPointerEvent *event)
{
if (!m_d->mask.isNull())
KisToolFreehand::continuePrimaryAction(event);
}
void KisToolSmartPatch::endPrimaryAction(KoPointerEvent *event)
{
if (mode() != KisTool::PAINT_MODE)
return;
if (m_d->mask.isNull())
return;
KisToolFreehand::endPrimaryAction(event);
//Next line is important. We need to wait for the paint operation to finish otherwise
//mask will be incomplete.
image()->waitForDone();
//User drew a mask on the temporary inpaint mask layer. Get this mask to pass to the inpaint algorithm
m_d->maskDev = new KisPaintDevice(KoColorSpaceRegistry::instance()->alpha8());
if (!m_d->mask.isNull()) {
m_d->maskDev->makeCloneFrom(m_d->mask->paintDevice(), m_d->mask->paintDevice()->extent());
//Once we get the mask we delete the temporary layer on which user painted it
deleteInpaintMask();
image()->waitForDone();
m_d->imageDev = currentNode()->paintDevice();
KisTransaction inpaintTransaction(kundo2_i18n("Inpaint Operation"), m_d->imageDev);
QApplication::setOverrideCursor(KisCursor::waitCursor());
//actual inpaint operation. filling in areas masked by user
QRect changedRect = inpaintImage(m_d->maskDev, m_d->imageDev);
currentNode()->setDirty(changedRect);
inpaintTransaction.commit(image()->undoAdapter());
//Matching endmacro for inpaint operation
canvas()->shapeController()->resourceManager()->undoStack()->endMacro();
QApplication::restoreOverrideCursor();