ImageEditor.st
changeset 2546 b69247f503b8
parent 2539 3fa0fde65f75
child 2556 736533777318
equal deleted inserted replaced
2545:cd5d45739973 2546:b69247f503b8
  3587 
  3587 
  3588     anEvent view == self imagePreView ifTrue:[
  3588     anEvent view == self imagePreView ifTrue:[
  3589         ((anEvent isButtonPressEvent and:[ anEvent button == 1 ])
  3589         ((anEvent isButtonPressEvent and:[ anEvent button == 1 ])
  3590         or:[ anEvent isButtonMotionEvent and:[ anEvent hasButton1 ]])  ifTrue:[
  3590         or:[ anEvent isButtonMotionEvent and:[ anEvent hasButton1 ]])  ifTrue:[
  3591             p := anEvent x @ anEvent y.
  3591             p := anEvent x @ anEvent y.
  3592             p := anEvent view transformation applyInverseTo:p.
  3592             anEvent view transformation notNil ifTrue:[
       
  3593                 p := anEvent view transformation applyInverseTo:p.
       
  3594             ].
  3593             self imageEditView scrollToMakeVisible:p.    
  3595             self imageEditView scrollToMakeVisible:p.    
  3594             ^ true.
  3596             ^ true.
  3595         ].
  3597         ].
  3596     ].
  3598     ].
  3597     ^ false.
  3599     ^ false.
  3814 
  3816 
  3815 updateImagePreView
  3817 updateImagePreView
  3816     self tileModeHolder value ifTrue:[
  3818     self tileModeHolder value ifTrue:[
  3817         self imagePreView tileMode:true tileOffset:(self image extent).
  3819         self imagePreView tileMode:true tileOffset:(self image extent).
  3818     ].
  3820     ].
  3819     self imagePreView image:self image.
  3821     self imagePreView setImage:(self image) scroll:false invalidate:true.
  3820 ! !
  3822 ! !
  3821 
  3823 
  3822 !ImageEditor methodsFor:'queries'!
  3824 !ImageEditor methodsFor:'queries'!
  3823 
  3825 
  3824 hasMask
  3826 hasMask
  5220                 ].
  5222                 ].
  5221                 imageEditView
  5223                 imageEditView
  5222                     makeSubImageX:l y:t 
  5224                     makeSubImageX:l y:t 
  5223                     width:(img width - l - r)
  5225                     width:(img width - l - r)
  5224                     height:(img height - t - b).
  5226                     height:(img height - t - b).
       
  5227 
       
  5228                 self updateImagePreView.
  5225                 self updateInfoLabel
  5229                 self updateInfoLabel
  5226             ].
  5230             ].
  5227         ].
  5231         ].
  5228 
  5232 
  5229     bindings := IdentityDictionary new.
  5233     bindings := IdentityDictionary new.