fixed shape at non-100% viewport zoon to apply scale correctly#3723
fixed shape at non-100% viewport zoon to apply scale correctly#3723krVatsal wants to merge 10 commits intoGraphiteEditor:masterfrom
Conversation
cee75a5 to
94f589b
Compare
|
…-scale' of https://github.com/krVatsal/Graphite into fix-shape-at-non-100%-viewport-zoom-wrongly-applies-the-scale
|
…y-applies-the-scale
…-scale' of https://github.com/krVatsal/Graphite into fix-shape-at-non-100%-viewport-zoom-wrongly-applies-the-scale
|
After analyzing the test failures, I realized that ellipse is intentionally designed to work in viewport space (visual/screen space), not document space(which was my solution for this scale issue). This is correct behavior for canvas rotation scenarios. The zoom-related fix likely only applies to shapes like Rectangle that use document space ( If there is something that i am getting wrong or if i should follow any other method please suggest. |
|
Ellipse should work the same as Rectangle in that regard. |
|
Can you guide me on this for ellipse one like when i try to fix the scale bug in ellipse using viewport both these rotation tests fails, while this is not the case for other shapes as they don't have any such test cases. |
|
You are allowed to modify test cases if you can determine that they enclosed an expectation of incorrect or outdated behavior. |
Fixes #2582
When drawing shapes (Rectangle, Ellipse, Circle, Polygon, Star, Arc, Spiral) at a viewport zoom other than 100%, the Transform node would receive a scale value corresponding to the zoom level instead of 1.
The fix converts viewport-space dimensions to document-space before setting shape parameters and uses
TransformIn::Localinstead ofTransformIn::Viewport. This matches how the Line tool already worked correctly.