Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 837 by google....(a)ben.coman.com.au: ROCircle not constrained to
equal dimensions
http://code.google.com/p/moose-technology/issues/detail?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.