# 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:** 17

<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:** [August 7, 2020, 7:29pm UTC](https://discourse.processing.org/t/how-to-get-screen-coordinates-for-fit-to-screen-function/22514/17 "2020-08-07T19:29:13Z")

</div>

Hello,

There is a _topic_ that I responded to:

> [@screenPositionFunction not projecting correctly](https://discourse.processing.org/t/screenpositionfunction-not-projecting-correctly/23019):
>
> This is my test of the screenPosition function that is not working correctly for me. I have digitized the 6 faces for a basic block and tried drawing them with world coordinates and then screen coordinates. The screen drawn block is not projecting correctly. Can you tell me what is wrong? Magenta is world - White is screen. Click to spin. Thanx. [https://editor.p5js.org/cln123gp/sketches/dNKVZLsOb](https://editor.p5js.org/cln123gp/sketches/dNKVZLsOb)

`:)`

---

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