[Oberon] Oberon.RemoveMarks

peter at easthope.ca peter at easthope.ca
Sat Mar 1 19:49:24 CET 2014

In ETHO, quoting from Oberon.Mod,
(** Fade the mouse and pointer cursors if located inside the screen area X, Y, W, H. 
This is required before drawing inside the area X, Y, W, H. *)
    PROCEDURE RemoveMarks* (X, Y, W, H: INTEGER);
      IF (Mouse.X > X - 16) & (Mouse.X < X + W + 16) ...

According to Display, the Arrow pattern is defined in a 
frame of pixels (0..15)x(0..15).  Row 0 is at the bottom. 
Column 0 is at the left.  The tip of the arrow, which is 
the "hot point", is the pixel at column 0, row 15.
The tail of the arrow is 15 pixels to the right of the tip.  

Consider the arrow being in the vicinity of X, the left 
boundary of screen area X, Y, W, H.  I understand (Mouse.X > X - 16), 
up to the secondary question of inclusion of the X boundary. 

Then consider the arrow in the vicinity of X + W, the right 
boundary of the area.  If Mouse.X = X + W then the arrow tip 
and pixels on the left edge of the arrow head are on the left 
boundary of the area.  All other arrow pixels are outside the
area, to the right.  If my reasoning is correct, the condition 
should be (Mouse.X < X + W) or (Mouse.X <= X + W) rather than 
(Mouse.X < X + W + 16).

To my understanding the only harm is a small fraction of 
invocations of FadeCursor(Mouse) being unnecessary.  

For the boundary cases, Mouse.X = X and Mouse.X = X + W, 
I need to study details further.

Regards,               ... Peter E.

123456789 123456789 123456789 123456789 123456789 123456789 123456789 12
Tel +1 360 639 0202  http://carnot.yi.org/  New address Bcc: peter at easthope. ca

More information about the Oberon mailing list