1. 29 Nov, 2016 1 commit
    • 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...
  2. 23 Nov, 2016 1 commit
  3. 17 Nov, 2016 3 commits
  4. 16 Nov, 2016 2 commits
    • 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
    • Dmitry Kazakov's avatar
  5. 15 Nov, 2016 1 commit
  6. 14 Nov, 2016 4 commits
  7. 11 Nov, 2016 1 commit
  8. 01 Nov, 2016 1 commit
    • Dmitry Kazakov's avatar
      Implement rendering of SVG patterns · 68dbe96b
      Dmitry Kazakov authored
      There are a lot of weirdness in it, because every application
      renders patterns as it likes. Still result most of the test cases
      coincide with the one of Chrome and Firefox.
  9. 26 Oct, 2016 1 commit
  10. 25 Oct, 2016 1 commit
  11. 24 Oct, 2016 1 commit
  12. 13 Oct, 2016 1 commit
  13. 11 Oct, 2016 2 commits
  14. 10 Oct, 2016 2 commits
  15. 07 Oct, 2016 1 commit
  16. 06 Oct, 2016 1 commit
    • Dmitry Kazakov's avatar
      Implemented basic parsing of SVG coordinate systems · fbac388c
      Dmitry Kazakov authored
      1) Parse <svg> tag correctly
      2) Parse unit conversion correctly. Remember: 'px'=='user unit'!
      3) Parse 'viewBox' attribute correclty
      4) Parse 'preserveAspectRatio' attribute correctly
         (except of 'defer' option for image)
  17. 03 Oct, 2016 5 commits
  18. 01 Oct, 2016 5 commits
  19. 29 Sep, 2016 5 commits
  20. 28 Sep, 2016 1 commit