Summary: | Transformation doesn't take into account the shift of the clone layer | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Dmitry Kazakov <dimula73> |
Component: | General | Assignee: | Dmitry Kazakov <dimula73> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | test image |
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 |
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.