Replace the Add Shape Docker with svg-based object libraries
Closed, ResolvedPublic

Description

The add shape docker only has hardcoded objects. The library functionality was removed ten years or so ago. The flow stencil docker cannot be reused because a) it's also ODG based and b) creating a new collection is a huge pain, with icons and desktop files and stuff.

We need a new way to create and manage collections of svg objects.

Requirements:

  • The shapes can be dragged from the collection to the canvas
  • The shapes are immediately editable after dropping
  • Shapes need to be assembled in named collections
  • Shapes are contained as symbols in an svg file
  • Collections can be named, can have metadata (author, description, copyright, license)

Later

  • Add items to a symbols collection from within krita
  • Remove symbols from a collection
  • Re-order symbols in a collection

Non-Requirements

  • The shapes aren't added as a 'use' symbol in the svg layer
rempt created this task.Jun 7 2017, 12:43 PM

Implementation:

  • Based on KoResource, similar to KoColorSet. One symbol library is one resource item.
  • Symbols are lazily rendered

Query:

  • Can we render the symbols with flakes vector rendering, or should we use qsvg for that?

To be more details about the <Use> stuff. Right now we wish to give users editable objects from the symbols docker. The Use object explicitly is for reusing exactly the same object. dmitry has made a task for this in T4683 . I am afraid that our users will get confused if you give them a use object blatantly, so lets just give them a copy of what is in symbol first and foremost, and make <use ref="symbol"> the special... usecase.

The benefit of using symbols for this is that we can share our symbol libraries with inkscape then :)

rempt closed this task as Resolved.Feb 28 2018, 10:50 AM