- /*\r
- Canvas cnvs;\r
- Rectangle[] rects;\r
- double tfreq = 1;\r
-\r
- public void initialize()\r
- {\r
- cnvs = new Canvas(500, 500, image, this);\r
- rects = new Rectangle[100];\r
- for (int i = 0; i < rects.Length; i++) { rects[i] = new Rectangle(10,10); }\r
- cnvs.clear(Color.gray);\r
- }\r
- public void trial()\r
- {\r
- cnvs.clear(new Color(Mouse.left.pressed() ? 1.0 : 0.5));\r
- foreach (Rectangle rect in rects) { rect.centering().shift(background,0).draw(); }\r
- cnvs.flip();\r
- }\r
- */\r