from Athens at squeaksource
demoMovingCarOn: aCanvas
"[self demoMovingCarOn: RomePluginCanvas new] timeToRun"
| c |
c := aCanvas.
0 to: 3*360 by: 3 do: [:w|
Display deferUpdates: true.
c selectFill: Color white.
c drawRectangle: (0@0 corner: 800@600).
c preserveStateDuring: [
c translateBy: 100@100.
c rotateBy: w around: 200@200.
c translateBy: 20@180.
c scaleBy: ((w * 2 / 180) cos) * 0.3 + 0.4.
self drawCarOn: c.
].
c finish.
Display deferUpdates: false.
Display forceToScreen: (0@0 corner: 800@600).
]
demoRotateRomeOn: aCanvas
"self demoRotateRomeOn: RomeCanvas new"
| c |
c := aCanvas.
c selectFill: Color white.
c drawRectangle: (0@0 corner: 800@600).
c font: (self fontFor: c family: 'Bitstream Vera Serif' style: 'Roman').
c fontSize: 1.
0 to: 360 by: 5 do: [:w|
Display deferUpdates: true.
c preserveStateDuring: [
c translateBy: 40@160.
c scaleBy: (w * 0.7 max: 0.01).
c rotateBy: w around: 1.5(a)0.75.
c translateBy: 0.05@1.
c selectPenWidth: 1/c transform scale y
color: (Color blue alpha: (1 / 360 * w)).
c selectFill: (Color r: 1 g: (1 / 360 * w) b: 0 alpha: (1 / 360 * w)).
c drawString: 'Rome'.
].
c finish.
Display deferUpdates: false.
Display forceToScreen: (0@0 corner: 800@600).
]
then squeaksource went down.