Revision 09488d4...

Go back to digest for 16th November 2014

Other in Office

Dmitry Kazakov committed changes in [calligra/krita-chili-kazakov] /:

Fixed dynamical updates of the Transform Mask

This patch implements numerous fixes and refactoings:

1) Implemented KisSafeTransform. It works like a usual QTransform but
it takes maths into account. That is the transform and its reverse
are *not* defined on the entire R^2 plane. Instead the valid input
area is limited by the horizon line and nothing can be transformed
above it. KisSafeTransform takes that into account and clips the
desired rect/polygon to fit the valid area.

2) KisTransformMask::need/changeRect now uses safe trasnforms.

3) KisAsyncMerger recalculates the area of the clone's source to fetch
correct data. To fix concurrency, this extra area is taken into account
in KisCloneLayer::accessRect();

4) Implemented detailed unittests for dynamicat transform masks.

5) Added ability to store reference images of the unittest in a
separate folder (outside repository).

It consists of 3 major parts:

1) checkQImageExternal() is expected to be used to fetch data from
external folders only.

2) KRITA_UNITTESTS_DATA_DIR environment variable is used to search for
additional data sources

3) KRITA_WRITE_UNITTESTS=1 together with KRITA_UNITTESTS_DATA_DIR set
to a path will write the output of the unittest as a reference to
an external folder.

6) The testing images are stored in:
svn+ssh:///home/kde/trunk/tests/kritatests

File Changes

Added 2 files
  • /image
  •   krita/kis_safe_transform.cpp
  •   krita/kis_safe_transform.h
Modified 13 files
  •   krita/image/CMakeLists.txt
  •   krita/image/kis_algebra_2d.cpp
  •   krita/image/kis_algebra_2d.h
  •   krita/image/kis_async_merger.cpp
  •   krita/image/kis_clone_layer.cpp
  •   krita/image/kis_clone_layer.h
  •   krita/image/kis_perspectivetransform_worker.cpp
  •   krita/image/kis_transform_mask.cpp
  •   krita/image/kis_transform_mask_params_interface.cpp
  •   krita/image/kis_transform_mask_params_interface.h
  •   krita/image/tests/kis_transform_mask_test.cpp
  •   krita/image/tests/kis_transform_mask_test.h
  •   krita/sdk/tests/testutil.h
15 files changed in total