GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Set default pixel density to the display's density · Issue #950 · processing/processing4

Set default pixel density to the display's density #950

New issue
Copy link
New issue
Copy link
Closed
#1038
Closed
Set default pixel density to the display's density#950
#1038
Copy link
Assignees
yehiarasheed
Labels
coreenhancementNew feature or requestNew feature or request

Description

@SableRaf
SableRaf
opened on Feb 21, 2025
Issue body actions

Most relevant area for this enhancement?

Core/Environment/Rendering

Feature to enhance

pixelDensity()

Desired enhancement

Currently, Processing defaults to pixelDensity(1), requiring users to manually set pixelDensity(2) or pixelDensity(displayDensity()) for high-DPI support. This proposal sets the default to the display's actual density, improving visual quality by default while allowing users to override it.

Potential benefits

Sharper rendering on high-DPI displays.

Possible drawbacks

No response

Additional context

No response

Would you like to work on the issue?

This is a small change which would make a good first issue. I'm happy to leave it to a new contributor.

Activity

  1. SableRaf
    added
    enhancementNew feature or requestNew feature or request
    on Feb 21, 2025
  2. SableRaf
    added this to Processing Roadmapon Feb 21, 2025
  3. SableRaf
    moved this to Backlog in Processing Roadmapon Feb 21, 2025
  4. SableRaf
    added
    core
    on Feb 21, 2025
  5. yehiarasheed commented on Mar 2, 2025

    @yehiarasheed
    yehiarasheed
    on Mar 2, 2025
    Contributor
    More actions

    I can work on this issue, please assign it to me. I will follow up with a proposed solution here as well since this is the first time for me to contribute to this repo.

  6. yehiarasheed commented on Mar 13, 2025

    @yehiarasheed
    yehiarasheed
    on Mar 13, 2025
    Contributor
    More actions

    Hello @Stefterv @SableRaf,

    Just to make sure that I'm on the right track for solving this issue, I've tried setting the pixelDensity variable in the PApplet.java class dynamically by calling the displayDensity() method as the assignment value.

    That said, whenever I try to set the pixel density to 1 using pixelDensity(1), it works just fine. Even if I call pixelDensity(int density) multiple times in the sketch, the last method call is the one that actually sets the value of the pixelDensity variable.

    I know that the pixelDensity(int density) method is supposed to be called only once (as mentioned in the JavaDocs), but I tested calling it multiple times, and it worked as expected.

    Demo

    Normal Scaling

    Normal.Scaling.Non-HiDPI.mode.mp4

    Custom scaling (Hi-DPI)

    High.Scaling.HiDPI.mode.mp4
  7. SableRaf
    assigned
    Stefterv
    on Mar 13, 2025
  8. Stefterv
    moved this from Backlog to In progress in Processing Roadmapon Mar 13, 2025
  9. Stefterv commented on Mar 24, 2025

    @Stefterv
    Stefterv
    on Mar 24, 2025
    Member
    More actions

    Hi @yehiarasheed Sorry for not replying earlier,

    This change is best to be as minimal as possible, if you find other issues on the way, please create separate PR's for those or just document them through a separate issue.

    Reacted by Raphaël de Courville
  10. yehiarasheed commented on Mar 24, 2025

    @yehiarasheed
    yehiarasheed
    on Mar 24, 2025
    Contributor
    More actions

    Hi @Stefterv, no worries! I now understand that you're aiming for a minimal enhancement—I initially thought Jim's comments reflected the entire team's vision.

    Reacted by Raphaël de Courville
  11. SableRaf
    assigned
    yehiarasheed
    and unassigned
    Stefterv
    on Mar 28, 2025
  12. Stefterv commented on Apr 15, 2025

    @Stefterv
    Stefterv
    on Apr 15, 2025
    Member
    More actions

    Thanks for jumping in on this! Since it was just a quick one-line fix and we needed it for an upcoming release, I went ahead and made the change directly. Really appreciate your help though! Would love to see you contribute to other issues and I am happy to support you with those!

    Reacted by Yehia Rasheed
  13. yehiarasheed commented on Apr 15, 2025

    @yehiarasheed
    yehiarasheed
    on Apr 15, 2025
    Contributor
    More actions

    Hey @Stefterv, I totally get it. Unfortunately I've broken my arm so I took some time off for recovery, I'll be happy to work on other issues!

    Reacted by Raphaël de Courville
  14. Stefterv commented on Apr 15, 2025

    @Stefterv
    Stefterv
    on Apr 15, 2025
    Member
    More actions

    Oh sorry to hear that! Have a good recovery and we'll see you again soon. 💙

  15. SableRaf
    closed this as completedin #1038on Apr 25, 2025
  16. github-project-automation
    moved this from In progress to Done in Processing Roadmapon Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @yehiarasheed
    yehiarasheed

Labels

coreenhancementNew feature or requestNew feature or request

Type

No type

Projects

  • Processing Roadmap
    Status
    Completed
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.