--- a/ImageEditView.st Thu Dec 07 15:04:31 2017 +0100
+++ b/ImageEditView.st Thu Dec 07 15:58:31 2017 +0100
@@ -1983,7 +1983,7 @@
(newColorMap isNil
and:[modeSymbol isNil
and:[copiedImage mask isNil] ]) ifTrue:[
- "/ use images copy functionality
+ "/ use image's copy functionality
"/ however, this copies the mask as well,
"/ which is not useful here
image copyFrom: copiedImage x:0 y:0 toX: imagePoint x y: imagePoint y width: copiedImage width height: copiedImage height.
@@ -2001,19 +2001,21 @@
newMasked := (copiedImage maskAtX:x y:y) == 0.
"/ with modeUnder,
- "/ only replace, if its either unmasked,
- "/ or the current drawing color.
- (modeSymbol isNil
- or:[wasMasked
- or:[modeSymbol == #withMask]])
- ifTrue:[
+ "/ only replace, if its masked,
+ ((modeSymbol isNil or:[modeSymbol == #withMask])
+ or:[wasMasked]
+ ) ifTrue:[
newMasked ifFalse:[
image colorAtX:dstX y:dstY put:(copiedImage colorAtX:x y:y).
wasMasked ifTrue:[
- image maskAtX:dstX y:dstY put:1
+ "/ wasMasked before; no longer masked now
+ (modeSymbol == #withMask or:[modeSymbol == #under]) ifTrue:[
+ image maskAtX:dstX y:dstY put:1
+ ].
].
] ifTrue:[
wasMasked ifFalse:[
+ "/ masked now; was not masked before
modeSymbol == #withMask ifTrue:[
image maskAtX:dstX y:dstY put:0
]
@@ -2031,7 +2033,7 @@
]
]
- "Modified: / 08-10-2017 / 08:53:48 / cg"
+ "Modified: / 07-12-2017 / 15:56:42 / cg"
!
shiftImageHorizontal:shiftH vertical:shiftV