Vector Tool Requirements
Updated 660 Days AgoPublic

Here I will sum up all the requirements we gathered during the sprint

Vector System Requirements

General

  1. Krita reads SVG xml manually using SvgParser class created by Jan.
  2. Krita writes SVG xml data manually in the shapes themselves.
  3. [POSTPONED] Transformations and styling options can be inherited (as per SVG). Therefore the GUI should have an option for inherited state
  4. Krita support SVG 1.1 to some extent.
  5. [POSTPONED] (2-nd priority) Krita saves object styles as CSS style sheets inside SVG itself.
  6. Backward compatibility with older Krita vector object is not expected.

GUI Requirements

General

  1. In every vector tool the user should be able to select/switch the shapes
  2. Selection tool shows Gradient handles, when fill/stroke selection tab is active
  3. Shape editing tool doesn't show any gradient editing handles. Only real shape nodes.

Selection Tool

  1. Vector tools are renamed
    • Shape Manipulations Tool -> Selection Tool (also called "Selection Mode")
    • Path Editing Tool -> Editing Tool (also called "Editing Mode")
  2. Switching between Selection Mode and Edit Mode should work in both directions with:
    • Pressing Enter
    • Double-clicking
    • Switching Selection Tool and Vector Editing Tool manually
    • Pressing Ecs exits editing mode
  3. Vector Editing Tool (previously Path Editing Tool)
    1. Allows selecting objects
    2. Shown right next to the Selection Tool in the toolbox.
    3. Shape Properties docker should be merged into Tool Options docker
    4. [DISCARDED (we have only few shapes that support properties)] When multiple objects are selected, then shape properties should be combined.
  4. Selection modes
    1. Rubber-band drag selects depending on the dragging direction
      1. right-to-left --- cross-selection
      2. left-to-right --- bounding-selection
      3. the color of the rubber band changes depending on the direction/selection mode
    2. Shift+click toggles multiple selection
    3. Ctrl+click toggles overlapping objects
    4. Shift+drag *adds* objects to the current selection
    5. Shift+drag cannot remove the object from the current selection. Use Shift+click instead.
    6. Alt+drag allows you to start a rubber band without accidentally selecting and moving a shape
  5. Alignment and Grouping
    1. Anignment options are moved into a separate docker
    2. They might also be available in the selection tool options as a popup menu
    3. [POSTPONED till text] If the current object is not text, buttons for baseline alignment are not visible.
  6. [POSTPONED] Transform tab
    1. Transform options change the current relative matrix of the object. That is, all the values are the relative coordinate system of the parent group.
    2. The options edit the matrix directly, not just combine new values with the existing matrix (like Inkscape does). That is, there is no Apply button: all the values are modified directly.
    3. The transformations are applied in the following order:
      1. Shear
      2. Scale
      3. Rotate
      4. Offset of the selected anchor point
  7. Geometry tab
    1. The user can always see the the size and offset of the bounding box of the object in a label. If it is possible, then changing the size, resizes of the shapes (that is stroke width is not changed). If there are multiple objects with non-uniform transformations are selected, then the objects are transformed, that is stroke width is affected.
    2. The user can force transformation instead of resizing by checking "Uniform scaling" checkbox.
    3. The bounding box is also painted on canvas when the object is selected.
    4. Scale, Rotate, and Transform actions done with the mouse work as usual (read: "like Transform Tool")
  8. Line Style
    1. Markers and Dash arrays are saved as separate XML/SVG files. So the user can create his own resources.
    2. Stroke color setting has the same widgets as the Fill one: None, [POSTPONED] Inherited, Gradient, Fill, [POSTPONED] Pattern.
    3. Selecting FG color with any color selector changes object fill to Solid+selected fg color
    4. Selecting BG color with any color selector changes object fill to Solid+selected bg color
    5. [POSTPONED] Color picker: Pressing some_key+click on any place of the document should select the fill of the object

[POSTPONED] Filter Tool

  1. Allows selecting objects
  2. The filter option are removed from Selection Tool and are edited by a special tool
  3. First Priority
    1. The Tool Options docker shows all predefined filers (preferably, with some preview)
    2. The user can select one of the predefined filters
    3. (Probably) he can also edit the main property of the filter, e.g. radius and the offset of the shadow filter.
    4. The filters can be imported from Inkskape and usual resources (including bundles). The Inkskape filters are just SVG files with 'defs' section that defines the filters.
  4. Second Priority
    1. Edit the filter using some special GUI. The GUIs in Inkscape and Karbon are extremely complicated. Invent something more obvious.

Gradient Tool

  1. Integrated into the Selection tool
  2. Allow saving the shape's gradient (fill and/or stroke one) into the set of predefined gradients in Krita resources with custom name.
  3. All gradients work in relative mode: the gradient is transformed with the shape itself.

[POSTPONED] Pattern Tool

  1. Integrate into the Selection tool
  2. No support for pattern rotation. It was not chosen in the KS stretchgoals.

Undecided Questions

  1. Boolean Operations for shapes. Should they be a tool? A menu action? Context menu? Or something else?
    1. How stroke/fill/filter properties are handled during the op? E.g. if we combine two shapes with different stroke properties using OR operation, what should be the stroke/fill of the final shape? The most sane approach would be to adopt the stroke/fill of the first selected shape. Or let the user choose.
Last Author
dkazakov
Projects
None
Subscribers
None