Skip to content

pixelDensity() not working in Windows applications #487

Closed
@processing-bot

Description

@processing-bot

Created by: dgray001

seems very similar to processing/processing#5414

Description

Scales to window scaling (default 125%).
When I run displayDensity() it returns 1
If I run pixelDensity(1) or pixelDensity(displayDensity()) I get the error:
Display -1 does not exist, returning 1 for displayDensity(-1)

Expected Behavior

Sketch to scale with Windows scale

Current Behavior

Sketch scales to 125% to what it should be

Steps to Reproduce

  1. Set Windows scale to anything not 100%
  2. Use processing 4

Your Environment

  • Processing version: 4.0b8 (also tried 4.0b6 with same behavior)
  • Operating System and OS version: Windows 11
  • Other information: Brand new workstation with clean install of windows/processing
  • EDIT: I'm using javafx not sure if that makes a difference

Possible Causes / Solutions

This only happens in processing4; when I run on processing3 there is no issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions