#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Thu, 16 Jan 2020 14:32:33 +0100
changeset 8964 7ab1983c012d
parent 8963 9a007c162c5a
child 8965 5b5515990617
#FEATURE by cg class: DisplaySurface added: #flashRectangle:
DisplaySurface.st
--- a/DisplaySurface.st	Tue Jan 14 11:19:00 2020 +0100
+++ b/DisplaySurface.st	Thu Jan 16 14:32:33 2020 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1992 by Claus Gittinger
               All Rights Reserved
@@ -1360,6 +1362,28 @@
     "Modified: 4.6.1996 / 17:58:49 / cg"
 !
 
+flashRectangle:rect
+    "flash part of the view - fill it flashColor, then white, 
+     finally redraw.
+     Can be used to bring attention to some line/part of view"
+
+    self xoring:[
+        self fillRectangle:rect color:(self blackColor).
+    ].
+
+    Delay waitForSeconds:0.1.
+
+    self xoring:[
+        self fillRectangle:rect color:(self blackColor).
+    ].
+    Delay waitForSeconds:0.1.
+
+    "
+     Display rootView flashRectangle:(10@10 corner:100@100)
+     Display rootView flashRectangle:(100@100 corner:200@300)
+    "
+!
+
 redraw
     "nothing done here"
     ^ self