Mantis - Squeak
|Viewing Issue Advanced Details|
|ID:||Category:||Severity:||Reproducibility:||Date Submitted:||Last Update:|
|5498||Morphic||minor||always||11-23-06 06:33||10-09-07 01:45|
|ETA:||none||Fixed in Version:|
|Summary:||0005498: Polygons don't render/orient submorphs correctly when tilted or grown.|
For this one make a compariison.
Put an ellipse inside a rectangle.
And another one inside a polygon.
Using the blue handle rotate each.
The rectangle and its ellipse rotate in tandem.
The ellipse inside the polygon does not rotate and its position relative to the ellipses referencePoint changes (because it maintains a positon relative to the polygons topLeft.)
Using the grow handle grow each.
Here neither submorph grows.
The rectangles ellipse remains in its originaly location. Because the rectangles top left stays stationary as it is grown.
The polygons ellipse moves as the polygon is grown. Because the polygons top left moves as it is grown.
If you rotate and then grow a rectangle it doesn't actually grow but scales.
When it scales the submorph seems to scale in tandem. (Actually it is the rendered image that is scaling.
|Steps To Reproduce:|
Morphic AFAIK has three ways of dealing with tilt grow and scale.
1) Morphs rendered with Transformation Morph. (rectangle and ellipses)
2) Polygon based morphs (which modify their shape as the are transformed)
3) And morphs rendered with MatrixTransformationMorph (True type fonts mostly)
Halos work well with one and two but are not cleverly integrated with three.
Halos ask a lot of questions they shouldnt about whether morphs are flexed or not. And a lot of IMHO ugly and buggy code has been written to try to get type one rendering to work.
I've adopted polygons as the place to start to cure this madness. First by making them pass as ovals. And now its time to work on how they rotate.
My user stories are these:
All morphs should behave in a similar fashion when manipulated by halo handles. You don't want to build separate models in your head for rectangles and polygons. Also polygons submorphs don't move right. If you tilt a poly you have to always relocate the submorphs even if you like the fact they dont rotate.
Changing what rectanges do when rotated would be messy and hard. Also they seem to get it mostly right. Rotating submorphs in tandem seems "right" and doesn't make-me-think. While what polygons do does.
So Polygons should rotate and their submorphs should rotate in tandem.
Since polygons change their shape when rotating their submorph will have the responsibility of rotating themselves to an appropriate heading.
The rotation of the polygon will have to relocate the referencePoints of its submorphs and move them s.t. their referencePoints windup in those relocated postions.
This suggests that the same thing happen when a polygon is grown.
Its points and submorph ref points should be relocated. And the submorphs should have their ref points aligned with the new location.
If the polygon is scaled instead of grown then the submorphs have the responsibility of scaling themselves as well.
The other problem with polygons is in 0000803 the referencePosition of a polygon can get out of whack if the polygon's shape changes and there is bad feedback between the halo handles and the referencePoint.
That needs to be fixed too and can be considered part of this reports project.