# Renderers (and Windows scaling)

**URL:** <https://discourse.processing.org/t/renderers-and-windows-scaling/47524>\
**Category:** Processing\
**Created:** [November 10, 2025, 8:10am UTC](https://discourse.processing.org/t/renderers-and-windows-scaling/47524 "2025-11-10T08:10:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sterretje](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@sterretje](https://discourse.processing.org/u/sterretje)\
**Post date:** [November 10, 2025, 8:10am UTC](https://discourse.processing.org/t/renderers-and-windows-scaling/47524/1 "2025-11-10T08:10:08Z")

</div>

There is a difference between `Processing 4.3 and 4.4.7 (and 4.4.10) in how the default renderer handles Windows scaling.

In Processing 4.3 a sketch with a `size(200, 200)` the canvas indeed 200x200 pixels; in Processing 4.4.7 it the scaling factor larger (250x250).  
I have figured out that I can use the P2D renderer to prevent this (`size(200,200, P2D)`).

**(1)** Is there a reason for this (different version of Java maybe or something else).

`fullScreen(P2D)` in 4.4.10 however shows a rectangle in the left top corner of my screen that is 80% in each direction of what was expected (1920x1080 resolution of the laptop screen).

**(2)** How do I get that 1920x1080? I can obviously specify that resolution in _size()_ but when I use a different screen I have to adjust again.

Note:  
My requirements are simple; I’m not in need fancy graphics, just some rectangles and text.

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [November 10, 2025, 4:53pm UTC](https://discourse.processing.org/t/renderers-and-windows-scaling/47524/2 "2025-11-10T16:53:02Z")

</div>

I had a Monitor on my Laptop and it helped me to say, for example

fullScreen(P3D, 0);

Which tells processing which Monitor to use I guess

---

<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:** [November 10, 2025, 10:10pm UTC](https://discourse.processing.org/t/renderers-and-windows-scaling/47524/3 "2025-11-10T22:10:02Z")

</div>

> [@sterretje](#):
>
> In Processing 4.3 a sketch with a `size(200, 200)` the canvas indeed 200x200 pixels; in Processing 4.4.7 it the scaling factor larger (250x250).

Solution on my system with Windows 10 and Windows Scaling = 125% :

_[DPI Renderer Scaling Override for JAVA2D](https://discourse.processing.org/t/dpi-renderer-scaling-override-for-java2d/47439)_

This is a workaround on my system for _fullscreen(P2D)_ :

```auto
/*
 * Fullscreen P2D Workaround
 *
 * Author: glv
 * Date: 2025-11-09
 *
*/

static 
  {
  // Forces 1:1 pixel rendering by disabling OS-level DPI scaling
  
  System.setProperty("sun.java2d.uiScale", "1.01"); // If this is 1.0 it does NOT work!
  //System.setProperty("sun.java2d.DPIscaling", "false"); // No effect.
  }

void setup() 
  {
  //size(1920, 1200, P2D);
  
  fullScreen(P2D, 2); // 0 is span, 1 is monitor 1, 2 is monitor 2
  println(SPAN);
  println(width, height);
  //surface.setLocation(50, 50); // Does NOT work with monitor 2 and will go to monitor 1!
  }

void draw() 
  {
  // Helps to see the size of the screen:  
  circle(50, 50, 50);
  circle(width-50, 50, 50);
  circle(width-50, height-50, 50);
  circle(50, height-50, 50); 
  circle(width/2, height/2, 50); 
  }

```

I came across this quite accidentally exploring this a few days ago!  
It has to be at least one pixel off to work and you will see this in the `println(width, height);` output.

`:)`

---

<div class="post-metadata">

**Author:** ![sterretje](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@sterretje](https://discourse.processing.org/u/sterretje)\
**Post date:** [November 11, 2025, 6:49am UTC](https://discourse.processing.org/t/renderers-and-windows-scaling/47524/4 "2025-11-11T06:49:12Z")

</div>

Thanks people

I decided to go for FX2D (after running the code in [Launcher for Multi-Renderer PApplets](https://discourse.processing.org/t/launcher-for-multi-renderer-papplets/46764)).

It seems to solve all problems with regards to size.

Here are some notes from my code

```java
/*
Selecting the renderer
 1.
 Default rendering screws me around with windows scaling
 2
 P2D is OK but maximizing window takes long and circle first changes to ellipse and next to circle when maximizing
 Ignores windows scaling :+1:
 Places (in left top) without title bar :(
 Seems to have jaggered edges around cirles.
 3
 FX2D does not (easily) allow to align text (vertical align in circle)
 Needs trick to suppress windows scaling; that's acceptable
 */

```

I haven’t found the best way to sort the vertical text alignment out, for now subtract a fixed amount. There was a similar issue in Processing 4.2 that got solved in 4.3; see [Processing 4.3 is out! ✨ - #3 by sterretje](https://discourse.processing.org/t/processing-4-3-is-out/42509/3).

This leaves the first question why there is a difference between Processing 4.3 and the later versions with regards to the default renderer. I know that there is a difference in the java version (checked by running [Report System and Environment Diagnostics at Runtime](https://discourse.processing.org/t/report-system-and-environment-diagnostics-at-runtime/47384)) but I do not know if that is the cause.

---

<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:** [November 11, 2025, 7:31pm UTC](https://discourse.processing.org/t/renderers-and-windows-scaling/47524/5 "2025-11-11T19:31:56Z")

</div>

Hello @sterretje,

It’s great to see my topics being visited and referenced.

> [@sterretje](#):
>
> This leaves the first question why there is a difference between Processing 4.3 and the later versions with regards to the default renderer.

You can explore issues here:  
_[GitHub - processing/processing4: Source code for Processing, the software sketchbook and Java-based programming language for students, artists, designers, educators, hobbyists, and creative coders. Includes the core library, and editor (PDE)](https://github.com/processing/processing4)_

_The source code for the various versions is also available to you._

I have been modifying the source code for Processing 4.4.10 to create a custom PDE (for my personal use) and using VS Code as the editor and building on the command-line.

It is certainly an adventure!

This discusses some of the challenges with DPI:  
_[Scaling and AA Issue with Canvas · Issue #378 · processing/processing4 · GitHub](https://github.com/processing/processing4/issues/378)_  
_[processing4/build/windows/fenster at main · processing/processing4 · GitHub](https://github.com/processing/processing4/tree/main/build/windows/fenster)_

My short and cursory exploration:

I successfully achieved my desired 1:1 scaling by manually setting `float uiScale = 1;` in one of the source files I was editing. I also noticed that code for `displayDensity()` and `pixelDensity()` seems to have been added within that same file and others between versions 4.3.4 and 4.4.0, which suggests that addressing one technical challenge may be affecting other behaviors. I still do not know the full impact and only have monitors with a _displayDensity() = 1_.

_This is just a personal exploration and not intended as an answer to your questions and I am not drawing any conclusions from the above. I am just having my fun and learning along the way!_

_I certainly understand the challenges the Processing team faces (similar experiences with coding embedded systems) and sincerely appreciate the work they are doing. It is not always so simple._

_I will share what I learn with the Processing team._

`:)`

---

<div class="post-metadata">

**Author:** ![sterretje](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@sterretje](https://discourse.processing.org/u/sterretje)\
**Post date:** [November 12, 2025, 4:39am UTC](https://discourse.processing.org/t/renderers-and-windows-scaling/47524/6 "2025-11-12T04:39:47Z")

</div>

> [@glv](#):
>
> It’s great to see my topics being visited and referenced.

I’ll have to thank you for your input on this forum 👍 As well as some other people here.

> [@glv](#):
>
> You can explore issues here:

I know. The problem is that I do not know the search terms or use the wrong ones; things like renderers, scaling and DPI basically mean nothing to me.

And it annoys me that something looks like intended in an older version of Processing and later changes. I can unfortunately not look in Processing’s kitchen but I don’t understand why things (have to) change.

I use Processing to create simple (or not so simple) user interfaces. Example of the latter is a simulation for a remote control that can communicate with Arduinos. It’s past the alpha stage but still a beta.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/2/b/2b0950980a0487757567c8732c76113a67378f0f.png)
