1. 16 Jun, 2017 1 commit
    • Dmitry Kazakov's avatar
      Implement KoShape::updateAbsolute() for complex transformation updates · 6f51599f
      Dmitry Kazakov authored
      Historically, transformation code uses extremely weird method of shape
      updates that rely on the event loop. This patch implements a framework
      for moving away from this strategy.
      
      The problem:
      
      When one transforms a shape he needs to update both areas: bounding
      rect of the shape *before* the transform and a bounding rect of the shape
      *after* the transform. Before the patch, the transformation code used the
      system like that:
      
      shape->update();
      shape->setTransformation(newTransform);
      shape->update();
      
      That works only with assumption that the first update() call will *not*
      be executed before setTransform() call. That should be true atm, but it
      is not guaranteed to be so in the future. Therefore, now the update happens
      like that:
      
      const QRectF oldDirtyRect = shape->boundingRect();
      shape->setTransformation(newTransform);
      shape->updateAbsolute(oldDirtyRect | shape->boundingRect());
      6f51599f
  2. 23 Mar, 2017 1 commit
  3. 17 Mar, 2017 1 commit
  4. 16 Mar, 2017 1 commit
  5. 15 Mar, 2017 1 commit
  6. 14 Mar, 2017 1 commit
    • Dmitry Kazakov's avatar
      Implement copy-pasting of shapes! · 1189dccb
      Dmitry Kazakov authored
      This patch implements the following:
      
      1) The shapes can be copy/pasted inside Krita
      2) The shapes can be copy/pasted Krita->Inkscape
         (reverse does not yet work)
      3) There are two shortcuts (reverse to Inkscape :( )
         Ctrl+V paste at original position
         Ctrl+Alt+V paste at cursor position
      
      CC:kimageshop@kde.org
      1189dccb
  7. 09 Mar, 2017 1 commit
    • Dmitry Kazakov's avatar
      Fixed a lot of double-rendering problems in Flake · 36a4a477
      Dmitry Kazakov authored
      The access to the shapes RTree was not consistent. Some shapes were
      **never** officially added to the tree and resulted in being added
      using the spontaneous update calls. It resulted them in being added
      to the tree multiple times, which called the double rendering with all
      the consequences.
      
      This patch also adds two sanity checks to KoRTree to catch such
      problems automatically in the future.
      36a4a477
  8. 17 Feb, 2017 1 commit
    • Dmitry Kazakov's avatar
      Implement centralized painting of handles · 7a35b3b2
      Dmitry Kazakov authored
      Now every (vector) tool in Krita uses KisHandlePainterHelper to
      paint the handles. The helper supports styling, that is you
      can set any predefined object of type KisHandleStyle to get
      needed effect.
      7a35b3b2
  9. 07 Jan, 2017 1 commit
  10. 05 Jan, 2017 1 commit
  11. 29 Dec, 2016 1 commit
  12. 23 Dec, 2016 2 commits
  13. 14 Dec, 2016 1 commit
    • Dmitry Kazakov's avatar
      Fix grouping/ungrouping of shapes · b95ea924
      Dmitry Kazakov authored
      There was a weird recursion problem in setParent()/addShape()
      functions. Now KoShape can use only specialized interface of
      the container that should not be used by anyone else.
      b95ea924
  14. 01 Dec, 2016 1 commit
  15. 29 Nov, 2016 2 commits
    • Dmitry Kazakov's avatar
      Remove KoClipData class · 16a5f36d
      Dmitry Kazakov authored
      Having 4 d-pointer-like object embedded one into each
      other is too much for me.
      
      At least now the shapes are correctly copied before
      being assigned to the clipping path in SVG loading
      code.
      16a5f36d
    • Dmitry Kazakov's avatar
      Implement KoShape::cloneShape() · 7699443c
      Dmitry Kazakov authored
      This is a mandatory function to be able to load shapes from SVG,
      because the same shape may be instantiated from different places.
      We still need to discuss whether we need to really "share" the
      shape template, but for now I just deep-copy them (which is the
      easiest because of shape normalization problem we have).
      
      There are the following drawbacks/hacks in this patch:
      
      1) Not all the shapes have KoShape::cloneShape() implemented! Basically,
         it is defined only for group shape and all the descendants of a path
         shape (which are the only shapes used in SVG). Other shapes use the
         default implementation which simply returns null.
      
         Ideally, there should be no default implementation and all the shapes
         should define it. But, given that we are going to deprecate quite a lot
         of stuff, I'll keep them just unimplemented for now.
      
      2) The following shape properties are not yet copied during cloning:
      
         * toolDelegates
         * dependees
         * shadow
         * border
         * filterEffectStack
      
         All the properties, except of tool delegates will probably be
         deprecated soon. And for the tool delegates we need to invent
         something ingenious to handle the pointers to recover pointers
         to the *cloned* shapes.
      
      3) I cannot guarantee TextShape's work anymore. I just blindly
         refactored it to use QScopedPointer to QTextDocument instead of
         the previous raw pointers trickery and never tested it. Hope it
         still works...
      7699443c
  16. 16 Nov, 2016 1 commit
    • Dmitry Kazakov's avatar
      Implemented clipping mask feature of SVG · deb9431b
      Dmitry Kazakov authored
      Still not implemented:
      1) Blending using linear RGB
      2) Doesn't work if a shape has a filter stack
      3) Shapes are leaking... but it should be fixed on the later
         stages of implementing SVG support. Right now shape ownership
         rules are not quite clear to me.
      4) Clip mask will not be found if placed into <def> category. *But*
         at the moment the <def> feature is implemented incorrectly. The
         inheritance of the 'def' elements should come from 'def', but not
         from the place of instantiation. So this part should be refactored
         anyway.
      deb9431b
  17. 18 Sep, 2016 1 commit
    • Nishant Rodrigues's avatar
      KoToolBase, KoShape, KoPatternBackground: Remove unused Q_Ds · 038d1e4f
      Nishant Rodrigues authored
      libs/flake/KoShape.cpp:1496:28: error: unused variable 'd' [-Werror,-Wunused-variable]
      libs/flake/KoToolBase.cpp:60:37: error: unused variable 'd' [-Werror,-Wunused-variable]
      libs/flake/KoPatternBackground.cpp:144:40: error: unused variable 'd' [-Werror,-Wunused-variable]
      038d1e4f
  18. 26 Nov, 2015 1 commit
  19. 19 Nov, 2015 1 commit
  20. 14 Sep, 2015 1 commit
  21. 02 Feb, 2015 1 commit
  22. 02 Nov, 2014 1 commit
  23. 12 Jul, 2014 1 commit
  24. 05 Dec, 2013 1 commit
  25. 03 Oct, 2013 1 commit
  26. 02 Aug, 2013 1 commit
    • Inge Wallin's avatar
      Merge the branch flake-shapeborders-ingwa · aabdbedd
      Inge Wallin authored
      This branch contains:
       - Borders for shapes
       - Painting of borders in KoBorder instead of other places
       - Handling of padding inside borders
      
      Code by me (ingwa) and Camilla Boemann
      
      REVIEW: 111044
      
      FEATURE: Shape borders
      FEATURE: Padding inside borders
      
      Squashed commit of the following:
      
      commit ffab6ec0f8c3d41b881eaaffc6abba7245a703bf
      Merge: 33e3bc8 5ff12bb
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Aug 1 19:26:12 2013 +0200
      
          Merge branch 'master' into flake-shapeborders-ingwa
      
          Conflicts:
          	libs/flake/KoShape.h
      
      commit 33e3bc8f902175c728b06ddbc804a0558aadac29
      Merge: 5429aa2 6648461
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Tue Jul 30 17:27:47 2013 +0200
      
          Merge remote-tracking branch 'origin/flake-shapeborders-ingwa' into flake-shapeborders-ingwa
      
          Conflicts:
          	libs/flake/KoShape.h
      
      commit 6648461572ca845fe0372780ddc8545363dc5521
      Author: C. Boemann <cbo@boemann.dk>
      Date:   Tue Jul 30 16:16:27 2013 +0200
      
          Only paint when there really is a border - or we would end up painting a cosmetic line
      
          also loading a file with all individually specified borders would still report it hadn't any borders
      
      commit 300a98b9b45c77df1ae1fd55ba367e484b074f3d
      Merge: a32fd98 3b4d668
      Author: C. Boemann <cbo@boemann.dk>
      Date:   Mon Jul 29 11:19:00 2013 +0200
      
          Merge branch 'master' into flake-shapeborders-ingwa
      
      commit 5429aa2f4f40e750459dd08c1bac3d9d8919cb6d
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sun Jul 28 09:32:11 2013 +0200
      
          Add a missing method to KoBorder.
      
      commit 78dc4d134e3581bc6abecc8061898e9e1ee99a46
      Merge: a32fd98 3350bba
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jul 27 15:28:19 2013 +0200
      
          Merge branch 'master' into flake-shapeborders-ingwa
      
          Conflicts:
          	libs/flake/KoShape.h
      
      commit a32fd9886c719a9d019c7d13925a862801ad675d
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Jul 18 23:38:54 2013 +0200
      
          Fix the build.
      
          Seems that boemann is not building the tests.  Booo!
      
          The test now builds but I don't know if the suggested rects make sense.
      
      commit 7335fcf876a19c4e636a2b44a333099b532ecef1
      Merge: 92c5bce 35ca4ac
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Jul 18 23:04:02 2013 +0200
      
          Merge branch 'master' into flake-shapeborders-ingwa
      
      commit 92c5bcef0961405765d8faae787cf68580be60d4
      Author: C. Boemann <cbo@boemann.dk>
      Date:   Thu Jun 20 22:17:00 2013 +0200
      
          Take padding and border into account when doing anchor placement
      
          Also We need to give the page for page-anchored shapes, otherwise sub objects will not be placed
      
          Also don't scale the border twice
      
      commit 8b674a8e2b5e500040695fff93d76ea43ae4e520
      Merge: cb26e25 05b3301
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 22 13:17:40 2013 +0700
      
          Merge branch 'flake-shapeborders-ingwa' of ssh://git.kde.org/calligra into flake-shapeborders-ingwa
      
          Conflicts:
          	libs/flake/KoShape.cpp
      
      commit cb26e2567be0a84649d1457d9d3fc45c84fa7b8a
      Merge: 21e69bf 04a624e
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 22 13:09:55 2013 +0700
      
          Merge branch 'master' into flake-shapeborders-ingwa
      
      commit 21e69bf563a7d58535f6c339270b5ce3cdbfd180
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 22 12:43:32 2013 +0700
      
          Fix border width bug for page borders.
      
          KoShape::paintBorder() now assumes that all view tranformations are
          already applied to the painter.
      
      commit a5a566c3ce168d71c46afa48aae73f14229500f2
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 22 12:04:27 2013 +0700
      
          Fix faulty indentation.
      
      commit 05b330131120e419fd24e9529e15d4b74f8f619d
      Author: C. Boemann <cbo@boemann.dk>
      Date:   Thu Jun 20 22:10:55 2013 +0200
      
          fix scaling being applied twice for the text
      
      commit 83bcd122d2610a48cf27b0bf4f257dd67c43b71d
      Merge: e921d88 5a4fdc6
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Jun 20 23:58:21 2013 +0700
      
          Merge branch 'master' into flake-shapeborders-ingwa
      
      commit e921d887275347cbb94f76b876e413be5c1611e0
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Jun 20 11:45:16 2013 +0700
      
          A better way to set the dash style of the QPainter.
      
      commit ec0bf5760a1cb4939874d8473e84a1ff93347668
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Jun 20 04:26:39 2013 +0700
      
          Treat border="none" the same as no mention of border at all.
      
      commit 7fd9926672f32431f63b5b016a2995e43f086db7
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Mon Jun 17 21:15:13 2013 +0200
      
          Remove unuzed parameters.
      
      commit 4a24367c17b35e26556706de59cc86a688fbbec7
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Mon Jun 17 21:07:10 2013 +0200
      
          Improve the old loading code for borders.
      
          The old code didn't check for individual edges (-top, -bottom, -left,
          -right) when there was a common border definition.
      
      commit f5c0652d8f877905bd5252f3b2f92a87d6259950
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Mon Jun 17 20:30:15 2013 +0200
      
          Use painter scaling instead of explicit zoom parameters.
      
      commit 637d674acb3c9ae6940a0f70e3fd9dab70ecbb7c
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 15 20:06:10 2013 +0200
      
          Fix a bug visible only with thick inner borders.
      
          Also remove some remaining kdebugs.
      
      commit e0d9c69478262151199f6e6f516a02d0134f3383
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 15 18:03:16 2013 +0200
      
          Fix another small pasto bug
      
      commit 2d09674fcbf613ecfaeae430fe9132caae090c1d
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 15 17:25:50 2013 +0200
      
          Fix a small bug
      
      commit b105ffcfdcffcbe7a906dbb7104bd1782d1cc470
      Merge: cf97de5 4021e36
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 15 17:07:24 2013 +0200
      
          Merge branch 'master' into flake-shapeborders-ingwa
      
      commit cf97de5aeca89e6da10e296d164eb2c60fe7854e
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 15 17:04:38 2013 +0200
      
          Simplify the painting of borders significantly.
      
      commit 71be183148c87ebc46b825bf1256aa130ef44816
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 15 10:28:37 2013 +0200
      
          Make double borders work in the corners.
      
          Unfortunately I had to refactor the drawing a bit to make this work.
          But I know how to simplify it back so I'll do that next.
      
      commit b306709efe4a2aefe8a6d0ccb519f6f448e17948
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Fri Jun 14 10:04:42 2013 +0200
      
          Make KoBorder able to paint on the designated rect or inside it.
      
      commit c2de625bc4696ca5b1372070349c454180164b4f
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Jun 13 20:56:31 2013 +0200
      
          Remove an unneded parameter.
      
      commit 1293e44e60e97ebba01f2d7d6fcc7f97e4b4880f
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Jun 13 07:30:32 2013 +0200
      
          Remove old border painting code in KWCanvasBase.
      
      commit 8c56fd221cc706028e00667599b7ac6ac8430eee
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Jun 13 06:37:17 2013 +0200
      
          Fix all scaling problems.
      
          The borders are now drawn in all the correct places.
          Still some things to do to get the corners right.
      
      commit 2fcb972323852aa993779675f7fea6b4991b2904
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Wed Jun 12 14:12:38 2013 +0200
      
          Put the border inside the available area instead of having the center line at the boundary of the area.
      
      commit a0213a361b28dbe1a74e4a9abb5f081c64bd1fc0
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Wed Jun 12 05:23:08 2013 +0200
      
          Implement painting of borders in KoShape and call this from the pictureshape and the textshape.
      
          Still some kdebugs that we need to remove later.
      
      commit d455047e34a9351a558656c7e6fd3b5501d9ad9b
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Tue Jun 11 18:17:17 2013 +0200
      
          Implement painting in KoBorder and call it from KWCanvasBase.
      
      commit c6e73db52ead4aab98469b9bc969a9b0c2e0caae
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sun Jun 9 23:23:08 2013 +0200
      
          Initialize the border field of the private class.
      
      commit 04d431b0bc08c81bb857a938a61ee7b68876fb40
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sun Jun 9 18:58:47 2013 +0200
      
          Implement saving of borders in KoShape
      
          This was easier than I expected...
      
      commit cd0268f499aca9ede9f38be82dc04917cfeeab02
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sun Jun 9 18:44:40 2013 +0200
      
          Implement loading of borders in KoShape
      
      commit 9ff1e5e91f439a738894abf573bcdc7e8d9bf91e
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sun Jun 9 17:51:18 2013 +0200
      
          Add ODF loading from KoStyleStack too.
      aabdbedd
  27. 30 Jul, 2013 1 commit
    • Boudewijn Rempt's avatar
      Wrap KoShapeBackground in QSharedPointer · 1bd83f16
      Boudewijn Rempt authored
      This patch wraps KoShapeBackground in a QPointer instead of doing manual
      refcounting. Bug 321714 shows, imo, that the manual refcounting is
      fragile and sometimes breaks. I don't remember why we weren't supposed
      to use QPointer (other than that it gets a little ugly with subclassing),
      but it seems a good fit here.
      
      There are other classes that do manual refcounting, and I think those
      should be converted, too -- but in another patch.
      1bd83f16
  28. 28 Jul, 2013 1 commit
  29. 24 Jul, 2013 1 commit
    • Boudewijn Rempt's avatar
      Wrap KoShapeBackground in QPointer · ef6f3c06
      Boudewijn Rempt authored
      This patch wraps KoShapeBackground in a QPointer instead of doing manual
      refcounting. Bug 321714 shows, imo, that the manual refcounting is
      fragile and sometimes breaks. I don't remember why we weren't supposed
      to use QPointer (other than that it gets a little ugly with subclassing),
      but it seems a good fit here.
      
      There are other classes that do manual refcounting, and I think those
      should be converted, too -- but in another patch.
      
      BUG: 321714
      ef6f3c06
  30. 23 Jul, 2013 1 commit
    • Boudewijn Rempt's avatar
      Wrap KoShapeBackground in QPointer · b301dbc5
      Boudewijn Rempt authored
      This patch wraps KoShapeBackground in a QPointer instead of doing manual
      refcounting. Bug 321714 shows, imo, that the manual refcounting is
      fragile and sometimes breaks. I don't remember why we weren't supposed
      to use QPointer (other than that it gets a little ugly with subclassing),
      but it seems a good fit here.
      
      There are other classes that do manual refcounting, and I think those
      should be converted, too -- but in another patch.
      
      BUG: 321714
      b301dbc5
  31. 21 Jul, 2013 1 commit
    • Boudewijn Rempt's avatar
      Wrap KoShapeBackground in QPointer · 6d455bc1
      Boudewijn Rempt authored
      This patch wraps KoShapeBackground in a QPointer instead of doing manual
      refcounting. Bug 321714 shows, imo, that the manual refcounting is
      fragile and sometimes breaks. I don't remember why we weren't supposed
      to use QPointer (other than that it gets a little ugly with subclassing),
      but it seems a good fit here.
      
      There are other classes that do manual refcounting, and I think those
      should be converted, too -- but in another patch.
      
      BUG: 321714
      6d455bc1
  32. 15 Feb, 2013 1 commit
  33. 01 Feb, 2013 2 commits
  34. 01 Dec, 2012 1 commit
  35. 01 Sep, 2012 1 commit
    • Thorsten Zachmann's avatar
      Implement hatch background as defined in odf. · b58b1719
      Thorsten Zachmann authored
      With this patch the different styles, freely defined angles and distance between
      the lines of the hatch is supported.
      
      This patch also changes the KoColorBackground to also use the d pointer of the
      parent which reduces the memory needed for a KoColorBackground.
      
      REVIEW: 106115
      BUG: 260534
      BUG: 298708
      b58b1719
  36. 10 Jul, 2012 1 commit
  37. 09 Jul, 2012 1 commit