The Trunk: GraphicsTests-fbs.27.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: GraphicsTests-fbs.27.mcz

commits-2
Nicolas Cellier uploaded a new version of GraphicsTests to project The Trunk:
http://source.squeak.org/trunk/GraphicsTests-fbs.27.mcz

==================== Summary ====================

Name: GraphicsTests-fbs.27
Author: fbs
Time: 17 December 2010, 9:23:32.307 am
UUID: 9e25b0fe-f647-fa45-9c69-c5fe9ca9c0c5
Ancestors: GraphicsTests-nice.26

Ensure that the new Rectangle rounding works for Rectangles that don't contain the origin.

=============== Diff against GraphicsTests-nice.26 ===============

Item was added:
+ ----- Method: RectangleTest>>testRoundingAfterHalfPixelTranslationFirstQuadrant (in category 'tests') -----
+ testRoundingAfterHalfPixelTranslationFirstQuadrant
+ "A rectangle right on the cusp of rounding changes shape if origin and
+ corner are in differenct quadrants"
+ "self debug: #testRoundingAfterHalfPixelTranslation"
+ | a b |
+ a := 10 asPoint rect: 10 asPoint.
+ b := a translateBy: 15.
+
+ 10 timesRepeat: [a := (a translateBy: 0.5) rounded].
+ 10 timesRepeat: [b := (b translateBy: 0.5) rounded].
+
+ self assert: a extent = b extent!