Hero image

Screen Coordinates

What the code does

In this demo you can move the mouse cursor around the screen and we write text on the screen letting you know what the X and Y pixel coordinates of the cursor are (rounded to the nearest pixel). This allows you to picture how screen coordinates are defined as well as how to query the position of the mouse.

Visualisation

The code

Instagram image Instagram image Instagram image Instagram image Instagram image Instagram image