class: ImageEditView
authorStefan Vogel <sv@exept.de>
Tue, 18 Feb 2014 15:45:17 +0100
changeset 4506 39867e0ef24f
parent 4505 8b2a3ebaeb25
child 4507 3235f9b064d5
class: ImageEditView changed: #dragRectangleStartingAt:emphasis: #drawPasteRectangleAt: #redrawImageX:y:width:height:unmaskedOnly: #redrawX:y:width:height: access device via message send
ImageEditView.st
--- a/ImageEditView.st	Tue Feb 18 15:44:07 2014 +0100
+++ b/ImageEditView.st	Tue Feb 18 15:45:17 2014 +0100
@@ -431,7 +431,7 @@
 
     currentPoint ~= lastPastePoint ifTrue:[              
         ClipboardMagnified isNil ifTrue:[
-            ClipboardMagnified := (Clipboard magnifiedBy: magnification) onDevice: device
+            ClipboardMagnified := (Clipboard magnifiedBy: magnification) onDevice:self graphicsDevice
         ].   
         extent := ClipboardMagnified extent.
 
@@ -487,7 +487,7 @@
     |ih iw magX magY minX maxX minY maxY lastColor lastY runW x0 maskColor mask
      sizeOfMaskPoint useNearestColor origin|
 
-    useNearestColor := device visualType == #PseudoColor.
+    useNearestColor := self graphicsDevice visualType == #PseudoColor.
 
     mask := image mask.
     ih := image height.
@@ -546,7 +546,7 @@
 
                 lastColor := color.
                 useNearestColor ifTrue:[
-                    lastColor := lastColor nearestOn:device
+                    lastColor := lastColor nearestOn:self graphicsDevice
                 ].
                 self paint:lastColor.
                 mask notNil ifTrue:[  
@@ -591,13 +591,13 @@
         Error handle:[:ex |
             Transcript showCR:'cannot convert image: ', ex description.
         ] do:[
-            devImage := image onDevice:device.
+            devImage := image onDevice:self graphicsDevice.
             devImage ~~ image ifTrue:[
                 image := devImage.
                 self changed:#image.
             ].
         ].
-        image device == device ifTrue:[
+        image device == self graphicsDevice ifTrue:[
             ^ super redrawX:x y:y width:w height:h
         ].
     ].
@@ -2068,7 +2068,7 @@
     firstPoint := currentPoint := lastCurrentPoint :=  aPoint//magnification*magnification.
     magnification >= GridMagnificationLimit ifFalse: [gridCorrection := 0] ifTrue: [gridCorrection := 1].
 
-    [device anyButtonPressed] whileTrue: [                                                  
+    [self sensor anyButtonPressed] whileTrue: [                                                  
         (self sensor hasKeyEventFor:nil) ifTrue:[
             self invalidate.
             ^ nil.
@@ -2079,7 +2079,7 @@
             Delay waitForSeconds:0.05
         ] ifFalse:[
             lastMp := mp.
-            mp := device translatePoint:mp fromView:nil toView:self.
+            mp := self graphicsDevice translatePoint:mp fromView:nil toView:self.
             "/ mp is a device coordinate here ...
             scrollX := 0.
             mp x > width ifTrue:[
@@ -2780,11 +2780,11 @@
 !ImageEditView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ImageEditView.st,v 1.258 2013-08-29 20:41:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ImageEditView.st,v 1.259 2014-02-18 14:45:17 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg2/ImageEditView.st,v 1.258 2013-08-29 20:41:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ImageEditView.st,v 1.259 2014-02-18 14:45:17 stefan Exp $'
 ! !