# displayWidth: deprecation?

**URL:** <https://discourse.processing.org/t/displaywidth-deprecation/9760>\
**Category:** Beginners\
**Created:** [March 29, 2019, 2:11pm UTC](https://discourse.processing.org/t/displaywidth-deprecation/9760 "2019-03-29T14:11:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eamoex](https://avatars.discourse-cdn.com/v4/letter/e/e495f1/32.png) [@Eamoex](https://discourse.processing.org/u/Eamoex)\
**Post date:** [March 29, 2019, 2:11pm UTC](https://discourse.processing.org/t/displaywidth-deprecation/9760/1 "2019-03-29T14:11:06Z")

</div>

Hello All,  
coming back to Processing after a while. Actually I haven’t dealt much with 3.0 (it was already out when I still had my hands in 2.0, but all my sketches were 2.0 and I stuck there, being too lazy for rewrites) and a few things have changed indeed.  
I’ve seen in a post on the old forum describing how physical display variables _displayWidth_ and _displayHeight_ have been deprecated. How is one supposed to get display devices’ physical dimensions in 3.0?

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [March 29, 2019, 3:04pm UTC](https://discourse.processing.org/t/displaywidth-deprecation/9760/2 "2019-03-29T15:04:31Z")

</div>

> [@How to detect display configuration?](https://discourse.processing.org/t/how-to-detect-display-configuration/9169/2):
>
> You can check out displayWidth for example: tv[Processing.GitHub.io/processing-javadocs/core/processing/core/PApplet.html#displayWidth](http://Processing.GitHub.io/processing-javadocs/core/processing/core/PApplet.html#displayWidth)

> [@Change the output location of beginRecord?](https://discourse.processing.org/t/change-the-output-location-of-beginrecord/3643/3):
>
> System variables displayWidth & displayHeight: computer[Tagged with displaywidth - Processing 2.x and 3.x Forum](http://Forum.Processing.org/two/discussions/tagged/displaywidth)

---

<div class="post-metadata">

**Author:** ![Eamoex](https://avatars.discourse-cdn.com/v4/letter/e/e495f1/32.png) [@Eamoex](https://discourse.processing.org/u/Eamoex)\
**Post date:** [March 30, 2019, 4:07pm UTC](https://discourse.processing.org/t/displaywidth-deprecation/9760/3 "2019-03-30T16:07:27Z")

</div>

OK. So they’re not deprecated. I must have misunderstood. What is then? Is it the use of them in combination with size()?

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [March 30, 2019, 4:24pm UTC](https://discourse.processing.org/t/displaywidth-deprecation/9760/4 "2019-03-30T16:24:05Z")

</div>

[Processing.org/reference/settings\_.html](http://Processing.org/reference/settings_.html)

---

<div class="post-metadata">

**Author:** ![Eamoex](https://avatars.discourse-cdn.com/v4/letter/e/e495f1/32.png) [@Eamoex](https://discourse.processing.org/u/Eamoex)\
**Post date:** [March 30, 2019, 4:48pm UTC](https://discourse.processing.org/t/displaywidth-deprecation/9760/5 "2019-03-30T16:48:08Z")

</div>

OK thanks GoToLoop, now I got it. We’re just required not to use variables in size(). Since I almost always make fullscreen sketches, I used to use `size(displayWidth, displayHeight)` a lot.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [March 31, 2019, 3:33pm UTC](https://discourse.processing.org/t/displaywidth-deprecation/9760/6 "2019-03-31T15:33:55Z")

</div>

> [@Eamoex](#):
>
> Since I almost always make fullscreen sketches, I used to use `size(displayWidth, displayHeight)`

For that use case specifically there is a new function: fullScreen.

> This function is new for Processing 3.0. It opens a sketch using the full size of the computer’s display. This function must be the first line in **setup()**. The **size()** and **fullScreen()** functions cannot both be used in the same program, just choose one. [fullScreen() / Reference / Processing.org](https://processing.org/reference/fullScreen_.html)

---

<div class="post-metadata">

**Author:** ![Eamoex](https://avatars.discourse-cdn.com/v4/letter/e/e495f1/32.png) [@Eamoex](https://discourse.processing.org/u/Eamoex)\
**Post date:** [April 1, 2019, 8:32am UTC](https://discourse.processing.org/t/displaywidth-deprecation/9760/7 "2019-04-01T08:32:50Z")

</div>

Yep. All clear now. I’ve also discovered that you can set the drawing engine using `fullScreen()`, for example like so: `fullScreen(P3D)`

What got me confused in the first place was [this post](https://forum.processing.org/two/discussion/12644/how-to-obtain-pixel-dimensions-of-screen-in-processing-3) from the old forum. It states clearly that `displayWidth` and its brother are deprecated. And GoToLoop makes a perfect point about users wondering about how new versions take useful stuff away.

EDIT: my point here is, although that post states deprecation, there actually isn’t any when talking about `displayWidth`. What’s deprecated is the use of variables as parameters in function `size()`.
