Bug 280502 - Transformation doesn't take into account the shift of the clone layer
Summary: Transformation doesn't take into account the shift of the clone layer
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-21 06:34 UTC by Dmitry Kazakov
Modified: 2011-10-08 17:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
test image (18.06 KB, application/x-krita)
2011-08-21 06:34 UTC, Dmitry Kazakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Kazakov 2011-08-21 06:34:00 UTC
Created attachment 63019 [details]
test image

When you do the transformation of the image (using KisTransformVisitor), the shift of the clone layer is not taken into account. It is left unchanged. Though it is expected that the clone layer is processed like all the other layers.

To see the bug you can open an image in attachment and scale/rotate it. You'll see that the image will change dramatically after this operation. The easiest sign is: the point will be outside the cross.
Comment 1 Dmitry Kazakov 2011-08-21 16:35:35 UTC
Git commit f9de97b5c6879c6f5248eff644620a9e8619b72a by Dmitry Kazakov.
Committed on 21/08/2011 at 13:08.
Pushed by dkazakov into branch 'krita_strokes_framework_kazakov'.

Ported KisTransformVisitor to the processings framework

This fixes a very tricky bug as well: the clones store the shift
internally, so when we transform a source layer, we should transform
the clone's offset as well. So we need to represent our transformation
with a matrix to do this. Now there is a matrix and a test for it in
KisTransformWorker.

WARNING: there is a bug(?) in the worker. Its transformation differs 1-3
pixels from the theoretical values. Looks like there are some rounding
problem. Anyway, we can use it even in such a rought way.

The bug will be closed when the visitor will be added to KisImage
CCBUG:280502

A  +-    --    krita/image/tests/data/processings/transform_scale/transform_scale_blur1_original.png
A  +-    --    krita/image/tests/data/processings/transform_scale/transform_scale_root_original.png
A  +-    --    krita/image/tests/data/processings/transform_scale/transform_scale_blur1_paintDevice.png
M  +22   -0    krita/image/kis_transform_worker.h
M  +13   -0    krita/image/kis_transform_worker.cc
A  +-    --    krita/image/tests/data/processings/transform_scale/transform_scale_paint1_original.png
M  +7    -0    krita/image/kis_layer.h
A  +-    --    krita/image/tests/data/processings/transform_scale/transform_scale_blur1_projection.png
A  +-    --    krita/image/tests/data/processings/transform_scale/transform_scale_root_projection.png
A  +-    --    krita/image/tests/data/processings/transform_scale/transform_scale_paint1_paintDevice.png
M  +1    -0    krita/image/CMakeLists.txt
A  +64   -0    krita/image/processing/kis_transform_processing_visitor.h     [License: GPL (v2+)]
A  +-    --    krita/image/tests/data/processings/transform_scale/transform_scale_tmask1_paintDevice.png
A  +-    --    krita/image/tests/data/processings/transform_scale/transform_scale_paint1_projection.png
A  +182  -0    krita/image/processing/kis_transform_processing_visitor.cpp     [License: GPL (v2+)]
M  +9    -0    krita/image/kis_layer.cc
A  +-    --    krita/image/tests/data/processings/transform_scale/transform_scale_clone1_projection.png
M  +29   -2    krita/image/tests/kis_processings_test.cpp
A  +-    --    krita/image/tests/data/processings/transform_scale/transform_scale_clone1_original.png
M  +1    -0    krita/image/tests/kis_processings_test.h
M  +58   -0    krita/image/tests/kis_transform_worker_test.cpp
M  +1    -1    krita/image/tests/kis_transform_worker_test.h

http://commits.kde.org/calligra/f9de97b5c6879c6f5248eff644620a9e8619b72a