class: ImageEditor
authorClaus Gittinger <cg@exept.de>
Fri, 31 Oct 2014 12:19:41 +0100
changeset 3157 1c2d4a99b02a
parent 3156 3107c90eabf2
child 3158 3fff6fd382c2
class: ImageEditor changed: #doInsertTextFromUser care for mask color
ImageEditor.st
--- a/ImageEditor.st	Thu Oct 23 13:14:50 2014 +0200
+++ b/ImageEditor.st	Fri Oct 31 12:19:41 2014 +0100
@@ -6176,7 +6176,7 @@
 !
 
 doInsertTextFromUser
-    |text tempForm tempImage maskImage font w h|
+    |text tempForm tempImage maskImage font w h paintColor|
 
     text := Dialog request:'Text to be inserted (placed as bitmap into clipboard for paste):'.
     text isEmptyOrNil ifTrue:[^ self ].
@@ -6194,9 +6194,16 @@
 
     tempImage := tempForm asImage.
     maskImage := tempForm asImage.
+
+    paintColor := imageEditView selectedColor.
+    paintColor  colorId == 0 ifTrue:[
+        paintColor := Color black
+    ].
     tempImage   
         photometric:#palette;
-        colorMap:(Array with:Color white with:imageEditView selectedColor);
+        colorMap:(Array 
+                    with:Color white 
+                    with:paintColor);
         mask:maskImage.
 
     ImageEditView copyImageToClipboard:tempImage.