1406 If the receiver is a view AND async is true, the call returns immediately |
1406 If the receiver is a view AND async is true, the call returns immediately |
1407 - otherwise, it returns when the scroll operation is finished. |
1407 - otherwise, it returns when the scroll operation is finished. |
1408 (not all devices care for this). |
1408 (not all devices care for this). |
1409 If the receiver is a pixmap, the call always returns immediately." |
1409 If the receiver is a pixmap, the call always returns immediately." |
1410 |
1410 |
1411 |deviceDrawable mustWait| |
1411 |deviceDrawable mustWait sourceDepth myDepth| |
1412 |
1412 |
1413 ((aDrawable graphicsDevice ~~ device) |
1413 ((aDrawable graphicsDevice ~~ device) |
1414 or:[aDrawable isImage]) ifTrue:[ |
1414 or:[aDrawable isImage]) ifTrue:[ |
1415 deviceDrawable := aDrawable asFormOn:device. |
1415 deviceDrawable := aDrawable asFormOn:device. |
1416 ] ifFalse:[ |
1416 ] ifFalse:[ |
1417 deviceDrawable := aDrawable |
1417 deviceDrawable := aDrawable |
1418 ]. |
1418 ]. |
1419 mustWait := async not and:[deviceDrawable isView and:[((deviceDrawable depth ~~ 1) or:[device depth == 1])]]. |
1419 sourceDepth := deviceDrawable depth. |
|
1420 myDepth := device depth. |
|
1421 mustWait := async not and:[deviceDrawable isView and:[((sourceDepth ~~ 1) or:[myDepth == 1])]]. |
1420 mustWait ifTrue:[ |
1422 mustWait ifTrue:[ |
1421 mustWait := self catchExpose. |
1423 mustWait := self catchExpose. |
1422 ]. |
1424 ]. |
1423 gc copyFrom:deviceDrawable graphicsContext x:srcX y:srcY toX:dstX y:dstY width:w height:h depth:self depth. |
1425 gc copyFrom:deviceDrawable graphicsContext x:srcX y:srcY toX:dstX y:dstY width:w height:h depth:sourceDepth. |
1424 mustWait ifTrue:[ |
1426 mustWait ifTrue:[ |
1425 self waitForExpose |
1427 self waitForExpose |
1426 ] |
1428 ] |
1427 ! |
1429 ! |
1428 |
1430 |