The Trunk: GraphicsTests-nice.16.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-nice.16.mcz

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

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

Name: GraphicsTests-nice.16
Author: nice
Time: 30 October 2009, 9:29:04 am
UUID: 19b70fc6-fe1d-4aa1-a494-098d4801f5e6
Ancestors: GraphicsTests-dtl.15

Some basic tests of the color wheel using #h:s:v:

(By the way, I wonder how other Smalltalk model hue, isn't it a fraction of revolution between 0 and 1 ?)

=============== Diff against GraphicsTests-dtl.15 ===============

Item was added:
+ ----- Method: ColorTest>>testHSV (in category 'testing') -----
+ testHSV
+ "Test the color wheel modulo 360"
+
+ self assert: (Color h: 0 s: 1 v: 1) = Color red.
+ self assert: (Color h: 60 s: 1 v: 1) = Color yellow.
+ self assert: (Color h: 120 s: 1 v: 1) = Color green.
+ self assert: (Color h: 180 s: 1 v: 1) = Color cyan.
+ self assert: (Color h: 240 s: 1 v: 1) = Color blue.
+ self assert: (Color h: 300 s: 1 v: 1) = Color magenta.
+ self assert: (Color h: 0+360 s: 1 v: 1) = Color red.
+ self assert: (Color h: 120+720 s: 1 v: 1) = Color green.
+ self assert: (Color h: 180-360 s: 1 v: 1) = Color cyan.
+ self assert: (Color h: 240-720 s: 1 v: 1) = Color blue.!