Presume that the sketch width and height is given as SIZE.
| Mouse is in area | when |
|---|---|
| A | mouseX + mouseY < SIZE / 2.0 |
| B | mouseX - mouseY > SIZE / 2.0 |
| C | mouseX + mouseY > 3.0 * SIZE / 2.0 |
| D | mouseX - mouseY < -SIZE / 2.0 |
If the mouse isn’t in area A, B, C, or D, then it must be in the diamond in the center of the diagram.