How to Position Shape based on display size

  1. First figure out where the origin of the screen is located. With the orientation set to ‘Landscape’ the origin on my tablet is upper left corner.

  2. Try using Processing calls width and height. To get near the left upper corner you will have to code for x = width - a large number close to the width and y = a very small fraction of the height because you want it near the top. From what you posted the calculated x value looks too big to me. Both x and y need to be small numbers if the origin(0,0) is at the top left corner and that’s near where you want the button located.