[BUG] Nitpic bug in WarpBlt test12
Karl Ramberg
karl.ramberg at chello.se
Sat Apr 22 14:37:49 UTC 2000
Hey, my first bug fix. Two displaying objects were overlapping creating
a unwanted effect.
Karl Ramberg
'From Squeak2.8alpha of 19 February 2000 [latest update: #2005] on 22
April 2000 at 4:29:57 pm'!
!WarpBlt class methodsFor: 'examples' stamp: 'kfr 4/22/2000 16:26'!
test12 "Display restoreAfter: [WarpBlt test12]"
"Just like test1, but comparing smooth to non-smooth warps"
| warp pts r1 p0 p ext warp2 |
Utilities informUser: 'Choose a rectangle with interesting stuff'
during: [r1 _ Rectangle originFromUser: 50 at 50.
Sensor waitNoButton].
Utilities informUser: 'Now click down and up
and move the mouse around the dot'
during: [p0 _ Sensor waitClickButton.
(Form dotOfSize: 8) displayAt: p0].
warp _ (self toForm: Display)
cellSize: 2; "installs a colormap"
clipRect: (0 at 0 extent: r1 extent*5);
sourceForm: Display;
combinationRule: Form over.
warp2 _ (self toForm: Display)
clipRect: ((0 at 0 extent: r1 extent*5) translateBy: 250 at 0);
sourceForm: Display;
combinationRule: Form over.
[Sensor anyButtonPressed] whileFalse:
[p _ Sensor cursorPoint.
pts _ {r1 topLeft. r1 bottomLeft. r1 bottomRight. r1 topRight}
collect: [:pt | pt rotateBy: (p-p0) theta about: r1 center].
ext _ (r1 extent*((p-p0) r / 20.0 max: 0.1)) asIntegerPoint.
warp copyQuad: pts toRect: (r1 extent*5-ext//2 extent: ext).
warp2 copyQuad: pts toRect: ((r1 extent*5-ext//2 extent: ext)
translateBy: 250 at 0).
]! !
More information about the Squeak-dev
mailing list
|