Review Request 121336: Fix vector sapes resolution in Krita

Camilla Boemann cbr at boemann.dk
Thu Dec 4 14:23:40 GMT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121336/#review71349
-----------------------------------------------------------

Ship it!


Ship It!

- Camilla Boemann


On Dec. 3, 2014, 10:53 a.m., Dmitry Kazakov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121336/
> -----------------------------------------------------------
> 
> (Updated Dec. 3, 2014, 10:53 a.m.)
> 
> 
> Review request for Calligra and Boudewijn Rempt.
> 
> 
> Bugs: 313600 and 341107
>     http://bugs.kde.org/show_bug.cgi?id=313600
>     http://bugs.kde.org/show_bug.cgi?id=341107
> 
> 
> Repository: calligra
> 
> 
> Description
> -------
> 
> This is a cumulative patch for the work done in krita-chili-kazakov branch in git.
> 
> The main idea of the changes is that KoUnit returned by the canvas now contains proper pt->px conversion coefficient and the main shape widgets can handle it properly. They are now connected to the resource manager's signal and update the unit on every change.
> 
> There is one "not-ideal" point. The shapes can have internal transformations, but their size and position member functions do not take it into account. So in some of the widgets I had to take this "transformation factor" into account using KoUnit's pt->px factor. This looks a bit ugly, but I'm not sure we can do anything else here.
> 
> 
> Here is the full list of changes.
> 
> commit 5efa5b4e9205632e1945d5fb467bc37836a582c4
> Author: Dmitry Kazakov <dimula73 at gmail.com>
> Date:   Tue Dec 2 14:07:35 2014 +0300
> 
>     Fix width of the Pencil Tool stroke after changing resolution
>     
>     There were two things needed:
>     
>     1) Deselect shapes when a shape-based tool is activated.
>        That is not needed when twe creating a new shape and it causes
>        the shape stroke widget edit the options of the lastly
>        selected stroke, which is not expected.
>     2) Reset unit on every selection change in KoStrokeConfigWidget.
>        Otherwise deselection is not handled properly.
> 
> commit ef5e1d2544beb30a027f874f7aedd8add951fedd
> Author: Dmitry Kazakov <dimula73 at gmail.com>
> Date:   Tue Dec 2 13:05:30 2014 +0300
> 
>     Fix units in the shadow config docker
>     
>     1) Added correct unit updates to the widget
>     2) Moved approxTransformScale() calculation to KoUnit since it
>        is too global
> 
> commit 38eea366b6477c4fcb5f0b46ced9be4fb9b93c1f
> Author: Dmitry Kazakov <dimula73 at gmail.com>
> Date:   Fri Nov 28 15:23:30 2014 +0400
> 
>     Fix a nice infinite loop in KoShadowConfigWidget
>     
>     How to reproduce:
>     1) Add a shape in Krita
>     2) Enable Shadow
>     3) Zoom canvas with mouse wheel
> 
> commit fddc5e9cc648c4d0eceb67b793faa3c0c14b8d62
> Author: Dmitry Kazakov <dimula73 at gmail.com>
> Date:   Fri Nov 28 15:14:33 2014 +0400
> 
>     Fix Default tool widgets to show values in real pixels, not points
>     
>     Now the option widgets use correct KoUnit object to convert their
>     options in correct user-visible pixels. Some note on the implementation:
>     
>     1) Affects KoStrokeConfigWidget and DefaultToolWidget
>     2) The correct conversion value is stored in KoUnit, which is reported
>        by KisCanvas2 and retransmitted by KisView2.
>     3) There is a hack in KoStrokeConfigWidget. KoShapeStroke knows nothing
>        about the absoluteTransformation() of the shape, which doesn't stop
>        the shape from doing the transformation of the outline (loaded into
>        QPainter directly). So we take it into account manually, by adding
>        a multiplier into KoUnit.
>     
>     BUG:313600
>     BUG:341107
> 
> 
> Diffs
> -----
> 
>   krita/ui/kis_view2.cpp aa894e8 
>   krita/ui/tool/kis_delegated_tool.h c63c6f9 
>   krita/ui/tool/kis_delegated_tool_policies.h PRE-CREATION 
>   krita/ui/tool/kis_delegated_tool_policies.cpp PRE-CREATION 
>   libs/flake/KoShapeShadow.h ccb3a3f 
>   libs/flake/KoShapeShadow.cpp ead0b80 
>   libs/odf/KoUnit.h ae26734 
>   libs/odf/KoUnit.cpp dc22265 
>   libs/widgets/KoShadowConfigWidget.h b3140dd 
>   libs/widgets/KoShadowConfigWidget.cpp d08f232 
>   libs/widgets/KoStrokeConfigWidget.cpp 445ea9f 
>   libs/widgets/KoUnitDoubleSpinBox.cpp ff94913 
>   plugins/defaultTools/defaulttool/DefaultToolWidget.cpp 55885d2 
>   krita/ui/CMakeLists.txt e28134a 
>   krita/ui/canvas/kis_canvas2.cpp 60ade0b 
>   krita/ui/flake/kis_shape_controller.h 39ae1eb 
>   krita/ui/flake/kis_shape_controller.cpp a0db22d 
>   krita/ui/flake/kis_shape_layer.cc c0fe4ac 
>   krita/plugins/tools/defaulttools/kis_tool_path.h 36db16a 
>   krita/plugins/tools/defaulttools/kis_tool_pencil.h 8a69428 
>   krita/plugins/tools/selectiontools/kis_tool_select_path.h 0bb252b 
>   krita/plugins/tools/tool_transform2/kis_transform_utils.cpp 9fd7e29 
> 
> Diff: https://git.reviewboard.kde.org/r/121336/diff/
> 
> 
> Testing
> -------
> 
> Tested in Krita
> 
> 
> Thanks,
> 
> Dmitry Kazakov
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20141204/e07abd92/attachment.htm>


More information about the calligra-devel mailing list