SpecTransformAnchors

From Inkscape Wiki
Jump to navigation Jump to search

Launchpad Entry: https://blueprints.launchpad.net/inkscape/+spec/transformation-anchors

Summary

The anchors let you decide the transformation center to use when entering a numerical value for a transformation (let it be from the toolbar or in the Object->Transform... dialog).

Release Note

Rationale

I know that you can move the object's center manually for rotations, but not so for other transformations such as scaling. Well, in theory, for a transformation it depends of what handler are you pulling. However, is not possible to just enter a numeric value for a transformation and select the center of such transformation (transformation done from the toolbar or Transform... dialog are always done from the center of the object).

Also, this is an easy way to select the center without having to do so manually.

Design

The design is pretty similar to the one found in Photoshop or Illustrator for the transformation (rotation, scaling and skew) of the objects.

There are two UI which have to be altered: the select tool's toolbar and the Transform... dialog:

Inkscape-TransformAnchors.png

TransformAnchors-move.png

You can see the differences using different anchors.

The anchors in the toolbar are linked to the anchors in the dialog so both show the same.

The user can select whether the entered numerical values should consider the center of rotation manually set on the canvas or the anchor buttons. This is done by activating the icon at the right of the anchor buttons. If pressed, all of the anchor's buttons get released and viceversa, so the logic is like this:

  • Either the object's center button or one of the anchor's buttons are pressed.
    • If one of the anchors is pressed, the object's center is deactivated.
    • If the object's center button is pressed, any of the anchors is deactivated.
  • When working with the anchor's buttons, one and only one can be pressed at a time.

I've yet to think how the buttons should react to an on-canvas edit of the rotation center. There are two possible scenarios:

  • Linked: So if I put the rotation center on, for example, the left bottom corner of the object's bounding box the anchor's buttons should reflect this.
  • Not linked: No matter where the rotation center is placed on the canvas, the numerical transformations would happen according to the anchors of the toolbar or the dialog while transformations on canvas would happen according to where the rotation center is placed.

Both methods have their pros and cons.

TODO

* Detail how this would work with skew.
* Detail how the anchor buttons should react when moving the rotation center on canvas.
* This could be also a way to select which corner is the point used for the coordinates of the object. DONE

Discussion

  • IDEA: Add relative move button to toolbar. Discuss below. Thanks.