Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROCircle not constrained to equal dimensions #837

Closed
seandenigris opened this issue Aug 3, 2015 · 3 comments
Closed

ROCircle not constrained to equal dimensions #837

seandenigris opened this issue Aug 3, 2015 · 3 comments

Comments

@seandenigris
Copy link
Contributor

Originally reported on Google Code with ID 837

Currently ROCircle acts more like a hypothetical ROEllipse, since it is not constrained
to force dimensions to be equal.  The following might be a worthwhile test case...

---
| rawView element1 element2 |

element1 := (ROElement on: '1' ).
element1 + ROCircle.
element1  width: 200; height: 100.
self assert: ( element1 height = 200).

element2 := (ROElement on: '2' ).
element2  width: 200; height: 100.
element2 + ROCircle.    "Swapped order with above line"
self assert: ( element2 height = 200).  "Should be true.  Currently not."  

"optional - following not part of test - just visual feedback"
rawView := ROView new.
rawView add: element1.
rawView add: element2.
ROVerticalLineLayout on: rawView elements.
rawView open.

---

The first assert can be made to work by adding the following...
----
ROCircle>>extent: anExtentPoint
    | max | 
    max := anExtentPoint x max: anExtentPoint y.
    extent := max @ max.
    next extent: anExtentPoint

---
The second assert, I'm not sure yet about resolving the fail.

Reported by benjamin.t.coman on 2012-09-16 11:36:56

@seandenigris
Copy link
Contributor Author

This is the first time someone complains about this. I agree about the distinction you
are making about circle and ellipse. 
I've just realized that what cannot be done is to have a circle with the same height
and width in an element with a different width and height.

Reported by alexandre.bergel on 2012-09-16 16:13:33

@seandenigris
Copy link
Contributor Author

Less a complaint :) and more a nitpick observation.  You could just change it to ROEllipse
and be done; or draw a circle within the minimum extent dimension; or grow element
to equal sides of the maximum dimension as I've done above; or just ignore it.
Low priority.

Reported by benjamin.t.coman on 2012-09-16 17:21:23

@seandenigris
Copy link
Contributor Author

We now have ROEllipse. 

Reported by alexandre.bergel on 2013-11-14 16:01:14

  • Status changed: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant