There is an opportunity to encode shape geometry differently, like having normalized coordinates
that are relative to the shape.bounds instead of absolute in an artboard. That would allow to
easily scale shapes or place them from one octopus to another.
Tasks
decide whether to implement it or stick to the current model, the benefits are it's not entirely clear
TODO: plan tasks as the decision is made
Notes
If we preserve current state, i.e. position of every point (actual or control) is encoded in absolute artboard
coordinate system, bounds in this case are only auxiliary since they can be computed from the
geometry itself.
If redesigned, each coordinate would be number in [0;1] and would denote a position relative to the shape's
bounding box. bounds object would be required for each shape in this case.
The advantages of this approach are compactness (same numbers are not repeated) and possibility
of automatic scaling. Only bounds need to be adjusted and layer can be dropped somewhere (that's
symbols master instantiation for example). Yea, there's also the constrains logic, so it's not
automatic win anyway.
In GitLab by @janroztocil on Nov 23, 2018, 15:36
Shape Geometry Format
Motivation
There is an opportunity to encode shape geometry differently, like having normalized coordinates that are relative to the
shape.bounds
instead of absolute in an artboard. That would allow to easily scale shapes or place them from one octopus to another.Tasks
Notes
If we preserve current state, i.e. position of every point (actual or control) is encoded in absolute artboard coordinate system, bounds in this case are only auxiliary since they can be computed from the geometry itself.
If redesigned, each coordinate would be number in
[0;1]
and would denote a position relative to the shape's bounding box.bounds
object would be required for each shape in this case.The advantages of this approach are compactness (same numbers are not repeated) and possibility of automatic scaling. Only bounds need to be adjusted and layer can be dropped somewhere (that's symbols master instantiation for example). Yea, there's also the constrains logic, so it's not automatic win anyway.