Commit 1b88235d authored by Eliakin Costa's avatar Eliakin Costa

Merge remote-tracking branch 'origin/master' into eliakincosta/T5885-kritas-scripting-showcase

parents 9902d673 9eee7b1d
......@@ -28,7 +28,7 @@ Note: on all operating systems the entire procedure is done in a terminal window
* Windows: mingw-w64 5.4 (by mingw-builds)
- 32-bit (x86) target: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/5.4.0/threads-posix/dwarf/
- 64-bit (x64) target: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/5.4.0/threads-posix/seh/
Make sure mingw's bin folder is in your path. It might be a good
idea to create a batch file which sets the path and start cmd.
MSVC is *not* supported at the moment.
......@@ -67,17 +67,17 @@ Note: on all operating systems the entire procedure is done in a terminal window
-DCMAKE_INSTALL_PREFIX=BUILDROOT/i
* OSX:
export PATH=$BUILDROOT/i/bin
export PYTHONHOME=$BUILDROOT/i (only if you want to build your own python)
cmake ../krita/3rdparty/ \
-DCMAKE_INSTALL_PREFIX=$BUILDROOT/i \
-DEXTERNALS_DOWNLOAD_DIR=$BUILDROOT/d \
-DINSTALL_ROOT=$BUILDROOT/i
-DINSTALL_ROOT=$BUILDROOT/i
* Windows 32 bits:
TODO
* Windows 64 bits:
......@@ -94,7 +94,7 @@ Note that the cmake command needs to point to your BUILDROOT like /dev/d, not c:
With a judicious application of DEPENDS statements, it's possible to build it all in one go, but in my experience that fails always, so it's better to build the dependencies independently.
If you want to use the included version of Python (can be used on Windows to build Qt instead of installing Python separately):
cmake --build . --config RelWithDebInfo --target ext_python
On Windows:
......@@ -102,7 +102,7 @@ On Windows:
cmake --build . --config RelWithDebInfo --target ext_patch
cmake --build . --config RelWithDebInfo --target ext_png2ico
cmake --build . --config RelWithDebInfo --target ext_gettext
On all operating systems:
cmake --build . --config RelWithDebInfo --target ext_qt
......@@ -114,7 +114,7 @@ On all operating systems:
cmake --build . --config RelWithDebInfo --target ext_eigen3
cmake --build . --config RelWithDebInfo --target ext_exiv2
cmake --build . --config RelWithDebInfo --target ext_fftw3
On Windows:
set FFTW_LIB_DIR=%BUILDROOT%\i\lib
......@@ -123,7 +123,7 @@ On Windows:
dlltool.exe -k --output-lib %FFTW_LIB_DIR%\libfftw3l-3.a --input-def %FFTW_LIB_DIR%\libfftw3l-3.def
On all operating systems
cmake --build . --config RelWithDebInfo --target ext_ilmbase
cmake --build . --config RelWithDebInfo --target ext_jpeg
cmake --build . --config RelWithDebInfo --target ext_lcms2
......@@ -177,15 +177,15 @@ archives from files.kde.org/krita/build/dependencies:
Take care, these zips contain a libstdc++-6.dll that you don't want in your path when building.
== Build Krita ==
1. Make a krita build directory:
1. Make a krita build directory:
mkdir BUILDROOT/build
2. Enter the BUILDROOT/build
3. Run
3. Run
On Windows
Depending on what you want to use, run this command for MSBuild:
Depending on what you want to use, run this command for MSBuild:
cmake ..\krita -G "MinGW Makefiles" -DBoost_DEBUG=OFF -DBOOST_INCLUDEDIR=c:\dev\i\include -DBOOST_DEBUG=ON -DBOOST_ROOT=c:\dev\i -DBOOST_LIBRARYDIR=c:\dev\i\lib -DCMAKE_INSTALL_PREFIX=c:\dev\i -DCMAKE_PREFIX_PATH=c:\dev\i -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DHAVE_MEMORY_LEAK_TRACKER=OFF -Wno-dev -DDEFINE_NO_DEPRECATED=1
......@@ -202,7 +202,7 @@ On OSX
cmake ../krita -DCMAKE_INSTALL_PREFIX=$BUILDROOT/i -DDEFINE_NO_DEPRECATED=1 -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DBUNDLE_INSTALL_DIR=$BUILDROOT/i/bin -DCMAKE_BUILD_TYPE=RelWithDebInfo
4. Run
4. Run
On Linux and OSX
......@@ -236,6 +236,7 @@ On OSX
== Packaging a Windows Build ==
If you want to create a stripped down version of Krita to distribute, after building everything just copy the makepkg.bat file from the "windows" folder inside krita root source folder to BUILDROOT and run it.
If you want to create a stripped down version of Krita to distribute, after building everything just copy the package_2.cmd file from the "windows" folder inside krita root source folder to BUILDROOT and run it (most likely C:\dev\).
That will copy the necessary files into the specified folder and leave behind developer related files, so the resulting folder will be a smaller install folder.
That script will copy the necessary files into the specified folder and leave out developer related files. After the script runs there will be two new ZIP files that contain a small portable version of Krita and a separate portable debug version.
>>>>>>> origin/master
......@@ -5,7 +5,7 @@ ExternalProject_Add( ext_png
URL_MD5 3a8fb380b0fb39cb69efe47901917e38
INSTALL_DIR ${PREFIX_ext_png}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_png} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_png} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DPNG_TESTS=OFF
UPDATE_COMMAND ""
DEPENDS ext_zlib
......
......@@ -130,7 +130,7 @@ else( APPLE )
# Fix Xcode xcrun related issue.
# NOTE: This should be fixed by Qt 5.7.1 see here: http://code.qt.io/cgit/qt/qtbase.git/commit/?h=dev&id=77a71c32c9d19b87f79b208929e71282e8d8b5d9
# NOTE: but no one's holding their breath.
set(ext_qt_PATCH_COMMAND $${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/gerrit-166202.diff
set(ext_qt_PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/gerrit-166202.diff
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/macdeploy-qt.diff
COMMAND ${PATCH_COMMAND} -p1 -b -d <SOURCE_DIR>/qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/qtbase-configure.patch
COMMAND ${PATCH_COMMAND} -p1 -b -d <SOURCE_DIR>/qtbase/mkspecs/features/mac -i ${CMAKE_CURRENT_SOURCE_DIR}/mac-default.patch)
......@@ -149,7 +149,7 @@ else( APPLE )
if(NOT NUM_CORES EQUAL 0)
if (NUM_CORES GREATER 2)
# be nice...
MATH( EXPR NUM_CORES "${NUM_CORES} - 2" )
MATH( EXPR NUM_CORES "${NUM_CORES} - 2" )
endif()
set(PARALLEL_MAKE "make;-j${NUM_CORES}")
message(STATUS "${EXTPREFIX_qt}:Parallelized make: ${PARALLEL_MAKE}")
......
......@@ -61,8 +61,10 @@ if (APPLE)
add_definitions(-mmacosx-version-min=10.9 -Wno-macro-redefined -Wno-deprecated-register)
endif()
if (CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
add_definitions(-Werror=delete-incomplete)
if (LINUX)
if (CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9 AND NOT WINDOWS)
add_definitions(-Werror=delete-incomplete)
endif()
endif()
######################
......@@ -293,7 +295,7 @@ if (NOT WIN32 AND NOT APPLE)
TYPE OPTIONAL
PURPOSE "Optionally used for recent document handling")
find_package(KF5Crash ${MIN_FRAMEWORKS_VERSION})
find_package(KF5Crash ${MIN_FRAMEWORKS_VERSION})
macro_bool_to_01(KF5Crash_FOUND HAVE_KCRASH)
set_package_properties(KF5Crash PROPERTIES
DESCRIPTION "KDE's Crash Handler"
......@@ -638,9 +640,9 @@ include(MacroKritaAddBenchmark)
####################
# for config.h and <toplevel/foo.h> includes (if any?)
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/interfaces
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/interfaces
)
add_subdirectory(libs)
......
......@@ -12,6 +12,7 @@ add_subdirectory( input )
add_subdirectory( shortcuts )
add_subdirectory( paintoppresets )
add_subdirectory( palettes )
add_subdirectory( symbols )
########### install files ###############
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
width="1200"
height="900"
viewBox="0,0,1200,900"
version="1.1"
style="fill:black;stroke:black">
<title>Word Balloons</title>
<desc>Ballons for holding text.</desc>
<metadata>
<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>Word Balloons</dc:title>
<dc:date>2013-04-22</dc:date>
<dc:creator>
<cc:Agent>
<dc:title>Martin Owens, Tavmjong Bah</dc:title>
</cc:Agent>
</dc:creator>
<dc:rights>
<cc:Agent>
<dc:title>Public Domain</dc:title>
</cc:Agent>
</dc:rights>
<dc:language>English</dc:language>
<dc:subject>
<rdf:Bag>
<rdf:li>word</rdf:li>
<rdf:li>balloon</rdf:li>
<rdf:li>comic</rdf:li>
<rdf:li>cartoon</rdf:li>
<rdf:li>speach</rdf:li>
<rdf:li>exclaim</rdf:li>
</rdf:Bag>
</dc:subject>
<cc:license rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
</cc:Work>
<cc:License rdf:about="http://creativecommons.org/licenses/publicdomain/">
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<defs>
<symbol id="ThoughtBalloon">
<title>Thought Balloon</title>
<path d="m 170,60 c -18,-14 -51,-11 -62,7 -32,-19 -57,36 -22,56 -30,10 -30,50 3,57 -2,30 53,29 59,8 10,23 47,29 60,9 14,10 36,5 43,-9 11,25 41,21 50,1 35,4 40,-31 29,-50 24,-9 22,-39 3,-48 16,-26 -17,-58 -39,-29 -13,-14.3 -47,-14 -56,1 -16,-19 -53,-21 -68,-3 z" style="stroke:none"/>
<path d="m 165,55 c -18,-14 -51,-11 -62,7 -32,-19 -57,36 -22,56 -30,10 -30,50 3,57 -2,30 53,29 59,8 10,23 47,29 60,9 14,10 36,5 43,-9 11,25 41,21 50,1 35,4 40,-31 29,-50 24,-9 22,-39 3,-48 16,-26 -17,-58 -39,-29 -13,-14.3 -47,-14 -56,1 -16,-19 -53,-21 -68,-3 z" style="fill:#eeeeee;stroke-width:3.5"/>
<path d="m 163,58 c -17,-12 -48,-11 -58,6 -37,-14 -46,42 -17,53 -33,14 -20,48 2,50 -5,29 47,29 53,7 10,25 43,24 58,8 13,9 34,4 40,-8 10,22 41,19 48,1 31,7 37,-28 27,-43 23,-7 21,-38 3,-46 14,-26 -15,-52 -30,-22 -19,-15.6 -43,-23 -59,-1 -15,-20 -51,-23 -67,-5 z" style="fill:white;stroke:none"/>
<ellipse cx="117" cy="239" rx="30" ry="21" style="stroke:none"/>
<ellipse cx="113" cy="235" rx="30" ry="21" style="fill:#eeeeee;stroke-width:3.5"/>
<ellipse cx="110" cy="233" rx="23" ry="17" style="fill:white;stroke:none"/>
<ellipse cx="74" cy="275" rx="15" ry="11" style="stroke:none"/>
<ellipse cx="70" cy="271" rx="15" ry="11" style="fill:#eeeeee;stroke-width:3.5"/>
<ellipse cx="67" cy="269" rx=" 8" ry="7" style="fill:white;stroke:none"/>
</symbol>
<symbol id="DreamSpeaking">
<title>Dream Speaking</title>
<path d="m 170,60 c -18,-14 -51,-11 -62,7 -32,-19 -57,36 -22,56 -30,10 -30,50 3,57 -2,30 53,29 59,8 10,23 47,29 60,9 14,10 36,5 43,-9 11,25 41,21 50,1 35,4 40,-31 29,-50 24,-9 22,-39 3,-48 16,-26 -17,-58 -39,-29 -13,-14.3 -47,-14 -56,1 -16,-19 -53,-21 -68,-3 z" style="stroke:none"/>
<path d="m 160,180 c -33,35 58,-6 -53,96 57.1,-21 93,-56 111,-102" style="stroke:none"/>
<path d="m 165,55 c -18,-14 -51,-11 -62,7 -32,-19 -57,36 -22,56 -30,10 -30,50 3,57 -2,30 53,29 59,8 10,23 47,29 60,9 14,10 36,5 43,-9 11,25 41,21 50,1 35,4 40,-31 29,-50 24,-9 22,-39 3,-48 16,-26 -17,-58 -39,-29 -13,-14.3 -47,-14 -56,1 -16,-19 -53,-21 -68,-3 z" style="fill:#eeeeee;stroke-width:3.5"/>
<path d="m 155,176 c -33,35 58,-6 -53,96 57.1,-21 93,-56 111,-102" style="fill:#eeeeee;stroke-width:3.5"/>
<path d="m 163,58 c -17,-12 -48,-11 -58,6 -37,-14 -46,42 -17,53 -33,14 -20,48 2,50 -5,29 47,29 53,7 10,25 43,24 58,8 13,9 34,4 40,-8 10,22 41,19 48,1 31,7 37,-28 27,-43 23,-7 21,-38 3,-46 14,-26 -15,-52 -30,-22 -19,-15.6 -43,-23 -59,-1 -15,-20 -51,-23 -67,-5 z" style="fill:white;stroke:none"/>
<path d="m 150,168 c -31,33 67,1 -38,97 56,-37 78,-67 93,-102" style="fill:white;stroke:none"/>
</symbol>
<symbol id="RoundedBalloon" style="stroke-linejoin:miter;stroke-miterlimit:10">
<title>Rounded Balloon</title>
<rect x="80" y="65" width="250" height="120" rx="32" style="stroke:none" />
<path d="m 124,179 -30,53 78,-53" style="stroke:none" />
<rect x="75" y="60" width="250" height="120" rx="30" style="fill:#eeeeee;stroke-width:3.5"/>
<path d="m 120,175 -30,53 78,-53" style="fill:#eeeeee;stroke-width:3.5" />
<rect x="80" y="65" width="235" height="105" rx="25" style="fill:white;stroke:none" />
<path d="m 132,160 -30,53 78,-53" style="fill:white;stroke:none" />
</symbol>
<symbol id="SquaredBalloon" style="stroke-linejoin:miter;stroke-miterlimit:10">
<title>Squared Balloon</title>
<rect x="80" y="65" width="250" height="140" rx="17" style="stroke:none" />
<path d="m 126,199 25,43 30,-43" style="stroke:none" />
<rect x="75" y="60" width="250" height="140" rx="15" style="fill:#eeeeee;stroke-width:3.5"/>
<path d="m 120,195 25,43 30,-43" style="fill:#eeeeee;stroke-width:3.5" />
<rect x="80" y="65" width="235" height="125" rx="10" style="fill:white;stroke:none" />
<path d="m 118,180 25,43 30,-43" style="fill:white;stroke:none" />
</symbol>
<symbol id="OverThePhone" style="stroke-linejoin:miter;stroke-miterlimit:10">
<title>Over the Phone</title>
<rect x="80" y="65" width="250" height="120" style="stroke:none" />
<path d="m 124,179 -15,41 -21,-16 -35,76 40,-49 32,17 53,-70" style="stroke:none" />
<rect x="75" y="60" width="250" height="120" style="fill:#eeeeee;stroke-width:3.5"/>
<path d="m 120,175 -15,41 -21,-16 -35,76 40,-49 32,17 53,-70" style="fill:#eeeeee;stroke-width:3.5" />
<rect x="80" y="65" width="235" height="105" style="fill:white;stroke:none" />
<path d="m 125,166 -18,53 -22,-15 -26,56 29,-40 28,12 55,-68" style="fill:white;stroke:none" />
</symbol>
<symbol id="HipBalloon" style="stroke-linejoin:miter;stroke-miterlimit:10">
<title>Hip Balloon</title>
<path d="m 97,65 216,0 c 9,0 17,7.6 17,17 0,0 -14,35 -14,53 0,18 14,53 14,53 0,9 -8,17 -17,17 l -216,0 c -9.4,0 -17,-8 -17,-17 0,0 14,-35 14,-53 0,-18 -14,-53 -14,-53 0,-9.4 7.6,-17 17,-17 z" style="stroke:none"/>
<path d="m 126,199 -5,43 60,-43" style="stroke:none"/>
<path d="m 90,60 216,0 c 9,0 17,7.6 17,17 0,0 -14,35 -14,53 0,18 14,53 14,53 0,9 -8,17 -17,17 l -216,0 c -9.4,0 -17,-8 -17,-17 0,0 14,-35 14,-53 0,-18 -14,-53 -14,-53 0,-9.4 7.6,-17 17,-17 z" style="fill:#eeeeee;stroke-width:3.5"/>
<path d="m 120,195 -5,43 60,-43" style="fill:#eeeeee;stroke-width:3.5"/>
<path d="m 90,65 215,0 c 6,0 10,4.5 10,10 0,0 -14,36 -14,53 0,18 14,52 14,52 0,6 -4,10 -10,10 l -215,0 c -5.5,0 -10,-4 -10,-10 0,0 14,-34 14,-52 0,-17 -14,-53 -14,-53 0,-5.5 4.5,-10 10,-10 z" style="fill:white;stroke:none"/>
<path d="m 124,180 -5,43 60,-43" style="fill:white;stroke:none"/>
</symbol>
<symbol id="CircleBalloon" style="stroke-linejoin:miter;stroke-miterlimit:10">
<title>Circle Balloon</title>
<ellipse cx="205" cy="125" rx="125" ry="70" style="stroke:none" />
<path d="m 110,166 c 11,21 -10,30 -22,43 32,-3 59,-7 70,-26" style="stroke:none" />
<ellipse cx="200" cy="120" rx="125" ry="70" style="fill:#eeeeee;stroke-width:3.5"/>
<path d="m 106,162 c 11,21 -10,30 -22,43 32,-3 59,-7 70,-26" style="fill:#eeeeee;stroke-width:3.5" />
<ellipse cx="197" cy="117" rx="117" ry="63" style="fill:white;stroke:none" />
<path d="m 103,149 c 14,25 9,34 -6,47 30,-3 50,-10 58,-31" style="fill:white;stroke:none" />
</symbol>
<symbol id="ExclaimBalloon" style="stroke-linejoin:miter;stroke-miterlimit:10">
<title>Exclaim Balloon</title>
<path d="m 117,183 -88,110 146,-98 10,31 53,-46 39,49 0,-46 69,28 -29,-57 66,-33 -68,-23.9 29,-58 -58,29 -15,-46 -48,46 -18,-42 -35,42 -20,-42 -33,40 -36.2,-42 0,50 -55,-2 42,42 -42,29 48,9 -24,46 z" style="stroke:none"/>
<path d="m 110,177 -88,110 146,-98 10,31 53,-46 39,49 0,-46 69,28 -29,-57 66,-33 -68,-23.9 29,-58 -58,29 -15,-46 -48,46 -18,-42 -35,42 -20,-42 -33,40 -36.2,-42 0,50 -55,-2 42,42 -42,29 48,9 -24,46 z" style="fill:#eeeeee;stroke-width:3.5"/>
<path d="m 122,166 -82,102 129,-89 9,28 52,-45 30,39 0,-38 58,23 -24,-45 57,-28 -56,-20 23,-47 -47,23 -14,-42 -47,44 -17,-40 -33,40 -21,-44 -31,38 -32.9,-38 0,43 -46,-2 38,38 -36,25 43,8 -21,41 z" style="fill:white;stroke:none"/>
</symbol>
</defs>
<use x="0" y="0" xlink:href="#RoundedBalloon" style="fill:blue;stroke:blue"/>
<use x="0" y="300" xlink:href="#SquaredBalloon" style="fill:blue;stroke:blue"/>
<use x="0" y="600" xlink:href="#CircleBalloon" style="fill:blue;stroke:blue"/>
<use x="400" y="0" xlink:href="#OverThePhone" style="fill:blue;stroke:blue"/>
<use x="400" y="300" xlink:href="#HipBalloon" style="fill:blue;stroke:blue"/>
<use x="400" y="600" xlink:href="#ExclaimBalloon" style="fill:blue;stroke:blue"/>
<use x="800" y="0" xlink:href="#DreamSpeaking" style="fill:blue;stroke:blue"/>
<use x="800" y="300" xlink:href="#ThoughtBalloon" style="fill:blue;stroke:blue"/>
</svg>
install( FILES
BalloonSymbols.svg
pepper_carrot_speech_bubbles.svg
DESTINATION ${DATA_INSTALL_DIR}/krita/symbols)
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2262,6 +2262,54 @@
<isCheckable>true</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="toggle_layer_lock">
<icon>layer-locked</icon>
<text>&amp;Lock/unlock layer</text>
<whatsThis></whatsThis>
<toolTip>Lock/unlock layer</toolTip>
<iconText>Lock/unlock layer</iconText>
<activationFlags>1000</activationFlags>
<activationConditions>0</activationConditions>
<shortcut></shortcut>
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="toggle_layer_visibility">
<icon>visible</icon>
<text>Toggle layer &amp;visibility</text>
<whatsThis></whatsThis>
<toolTip>Toggle layer visibility</toolTip>
<iconText>Toggle layer visibility</iconText>
<activationFlags>1000</activationFlags>
<activationConditions>0</activationConditions>
<shortcut></shortcut>
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="toggle_layer_alpha_lock">
<icon>transparency-locked</icon>
<text>Lock/unlock layer &amp;alpha</text>
<whatsThis></whatsThis>
<toolTip>Lock/unlock layer's alpha</toolTip>
<iconText>Lock/unlock layer's alpha</iconText>
<activationFlags>1000</activationFlags>
<activationConditions>0</activationConditions>
<shortcut></shortcut>
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="toggle_layer_inherit_alpha">
<icon>transparency-enabled</icon>
<text>Toggle layer alpha &amp;inheritance</text>
<whatsThis></whatsThis>
<toolTip>Toggle layer alpha inheritance</toolTip>
<iconText>Toggle layer alpha inheritance</iconText>
<activationFlags>1000</activationFlags>
<activationConditions>0</activationConditions>
<shortcut></shortcut>
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="add_new_paint_layer">
<icon>paintLayer</icon>
<text>&amp;Paint Layer</text>
......
......@@ -98,20 +98,20 @@ xsi:schemaLocation="http://www.kde.org/standards/kxmlgui/1.0 http://www.kde.org
<Action name="showStatusBar" />
<Separator/>
<Action name="view_grid"/>
<Separator/>
<Menu name="SnapTo">
<text>&amp;Snap To</text>
<Action name="view_snap_to_guides"/>
<Action name="view_snap_to_grid"/>
<Action name="view_snap_orthogonal" />
<Action name="view_snap_node" />
<Action name="view_snap_extension" />
<Action name="view_snap_intersection" />
<Action name="view_snap_bounding_box" />
<Action name="view_snap_image_bounds" />
<Action name="view_snap_image_center" />
<Action name="view_snap_to_grid"/>
<Action name="view_snap_orthogonal" />
<Action name="view_snap_node" />
<Action name="view_snap_extension" />
<Action name="view_snap_intersection" />
<Action name="view_snap_bounding_box" />
<Action name="view_snap_image_bounds" />
<Action name="view_snap_image_center" />
</Menu>
<Separator/>
......@@ -210,29 +210,29 @@ xsi:schemaLocation="http://www.kde.org/standards/kxmlgui/1.0 http://www.kde.org
</Menu>
<Menu name="LayerTransform">
<text>&amp;Transform</text>
<Action name="mirrorNodeX"/>
<Action name="mirrorNodeY"/>
<Action name="layersize"/>
<Menu name="Rotate">
<text>&amp;Rotate</text>
<Action name="rotatelayer"/>
<Separator/>
<Action name="rotateLayerCW90"/>
<Action name="rotateLayerCCW90"/>
<Action name="rotateLayer180"/>
</Menu>
<Action name="mirrorNodeX"/>
<Action name="mirrorNodeY"/>
<Action name="layersize"/>
<Menu name="Rotate">
<text>&amp;Rotate</text>
<Action name="rotatelayer"/>
<Separator/>
<Action name="rotateLayerCW90"/>
<Action name="rotateLayerCCW90"/>
<Action name="rotateLayer180"/>
</Menu>
<Action name="shearlayer"/>
<Action name="offsetlayer"/>
</Menu>
<Action name="offsetlayer"/>
</Menu>
<Menu name="LayerSplitAlpha">
<text>S&amp;plit</text>
<Menu name="LayerSplitAlpha">
<text>S&amp;plit Alpha</text>
<Action name="split_alpha_into_mask"/>
<Action name="split_alpha_write"/>
<Action name="split_alpha_save_merged"/>
</Menu>
<Action name="layersplit"/>
<Menu name="LayerSplitAlpha">
<text>S&amp;plit Alpha</text>
<Action name="split_alpha_into_mask"/>
<Action name="split_alpha_write"/>
<Action name="split_alpha_save_merged"/>
</Menu>
<Action name="layersplit"/>
<Action name="clones_array"/>
</Menu>
......@@ -342,6 +342,7 @@ xsi:schemaLocation="http://www.kde.org/standards/kxmlgui/1.0 http://www.kde.org
<Action name="help_show_tip"/>
<Separator/>
<Action name="help_report_bug"/>
<Action name="buginfo"/>
<Separator/>
<Action name="help_about_app"/>
<Action name="help_about_kde"/>
......
......@@ -21,6 +21,7 @@ include(ECMAddTests)
ecm_add_tests(
kis_auto_brush_test.cpp
kis_auto_brush_factory_test.cpp
kis_gbr_brush_test.cpp
kis_boundary_test.cpp
kis_imagepipe_brush_test.cpp
......
#include "kis_auto_brush_factory_test.h"
#include <QTest>
#include <testutil.h>
#include "kis_auto_brush.h"
#include "kis_auto_brush_factory.h"
#include "kis_mask_generator.h"
#include <KoColor.h>
#include <brushengine/kis_paint_information.h>
void KisAutoBrushFactoryTest::testXMLClone()
{
// Set up an autobrush.
KisBrushSP brush = new KisAutoBrush(new KisCircleMaskGenerator(20, 0.6, 0.8, 0.4, 3, true), 1.0,
0.0);
brush->setSpacing(0.15);
brush->setAutoSpacing(true, 0.1);
// Try to clone the brush by converting to XML and back.
QDomDocument d;
QDomElement e = d.createElement("Brush");
brush->toXML(d, e);
KisBrushSP clone = KisAutoBrushFactory().getOrCreateBrush(e, false);
// Test that the clone has the same settings as the original brush.
QCOMPARE(brush->width(), clone->width());
QCOMPARE(brush->height(), clone->height());
QCOMPARE(brush->angle(), clone->angle());
QCOMPARE(brush->spacing(), clone->spacing());
QCOMPARE(brush->autoSpacingActive(), clone->autoSpacingActive());
QCOMPARE(brush->autoSpacingCoeff(), clone->autoSpacingCoeff());
// Test that the clone draws the same as the original brush.
const KoColorSpace *cs = KoColorSpaceRegistry::instance()->rgb8();
KisPaintInformation info(QPointF(100.0, 100.0), 0.5);
KisDabShape shape(0.9, 0.7, 1.0);
KoColor color(Qt::yellow, cs);
KisFixedPaintDeviceSP fdev1 = new KisFixedPaintDevice(cs);
brush->mask(fdev1, color, shape, info);
QImage res1 = fdev1->convertToQImage(0);
KisFixedPaintDeviceSP fdev2 = new KisFixedPaintDevice(cs);
clone->mask(fdev2, color, shape, info);
QImage res2 = fdev2->convertToQImage(0);
QCOMPARE(res1, res2);
}
QTEST_MAIN(KisAutoBrushFactoryTest)
#ifndef KIS_AUTO_BRUSH_FACTORY_TEST_H
#define KIS_AUTO_BRUSH_FACTORY_TEST_H
#include <QtTest>
class KisAutoBrushFactoryTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
void testXMLClone();
};
#endif // KIS_AUTO_BRUSH_FACTORY_TEST_H
......@@ -202,6 +202,8 @@ set(kritaflake_SRCS
svg/SvgShapeFactory.cpp
svg/parsers/SvgTransformParser.cpp
resources/KoSvgSymbolCollectionResource.cpp
FlakeDebug.cpp
tests/MockShapes.cpp
)
......@@ -229,3 +231,4 @@ set_target_properties(kritaflake PROPERTIES
)
install(TARGETS kritaflake ${INSTALL_TARGETS_DEFAULT_ARGS})
......@@ -46,16 +46,16 @@
#include "KoToolProxy.h"
#include "KoCanvasControllerWidget.h"
#include "KoViewConverter.h"
#include "KoSvgPaste.h"