# How to get screen coordinates for "Fit To Screen" function

**URL:** https://discourse.processing.org/t/how-to-get-screen-coordinates-for-fit-to-screen-function/22514
**Category:** Coding Questions
**Created:** [July 9, 2020, 4:48pm UTC](https://discourse.processing.org/t/how-to-get-screen-coordinates-for-fit-to-screen-function/22514 "2020-07-09T16:48:24Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [July 10, 2020, 11:03am UTC](https://discourse.processing.org/t/how-to-get-screen-coordinates-for-fit-to-screen-function/22514/5 "2020-07-10T11:03:54Z")

</div>

Hello,

> [@CND](#):
>
> Apparently what I am looking for is:  
> screenX() || screenY() || screenZ()

This may help:

> [@screenX screenY equivalent in p5.js](https://discourse.processing.org/t/screenx-screeny-equivalent-in-p5-js/10581/5):
>
> I’ve seen that there are many others with the same problem. So I’ve decided to build a small library that adds this functionality to p5js. You’ll find the library here: And an example of how it’s used here: [https://editor.p5js.org/bohnacker/sketches/nUk3bVW7b](https://editor.p5js.org/bohnacker/sketches/nUk3bVW7b)

`:)`

---

_[View the full topic](https://discourse.processing.org/t/how-to-get-screen-coordinates-for-fit-to-screen-function/22514)._
