-
-
Notifications
You must be signed in to change notification settings - Fork 996
Description
Should go hand-in-hand with #1715.
Presently, if I use the Line tool to draw a line:
It doesn't produce just a Line node with Start and End set to the appropriate coordinates. Instead, it uses the unit line (0, 0) to (1, 0) and applies some highly scaled transform with a Transform node to actually position it in space:
The desired result of drawing with the Line tool shouldn't include a Transform node.
line_tool.rs is a good place to start looking for this code (although it could potentially be in a helper function in another file).
This also happens with the Rectangle tool:
Here, the rectangle is a unit square (1x1 units). The desired result of drawing with the Rectangle tool should apply the scale to the Rectangle node and the translation (and if the canvas is tilted, also rotation) to the Transform node, leaving it at the default scale factor of 1x1.
rectangle_tool.rs is a good place to start looking for this code.
This also happens with the Ellipse tool:
The desired behavior is the same as the Rectangle tool.
ellipse_tool.rs is a good place to start looking for this code.
This also happens with the Polygon tool, in "convex" mode:
And in "star" mode:
In this case, like with Ellipse and Rectangle, we want to represent the scale with the shape generator nodes. However, because the Star and Regular Polygon nodes don't have parameters for non-uniform aspect ratios, the Transform node will still need to represent the stretch factor. We just don't want to use the unit (1x1) shapes anymore. It would probably be preferable to represent the smaller dimension as a scale factor of 1 in the Transform node so that the larger dimension can be represented as a value larger than 1 in the Transform node in order to give it the desired stretch.
polygon_tool.rs is a good place to start looking for this code.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status









