Skip to content

method changes for hidpi/retina renderer changes in 3.0 #170

Closed

Description

@benfry

When using a retina/hidpi version of a PGraphics (or PImage, for that matter), all pixel operations happen in 2x space. This has an effect on:

  • updatePixels(...)
  • get(...)
  • set(...)
  • copy(...)
  • blend(...)

The pixelFactor variable is 2 for retina, 1 normally. The pixelWidth and pixelHeight fields cover the actual size of the pixels[] array.

Activity

  1. added this to the 3.0 milestone on Nov 22, 2014
  2. self-assigned this
    on Sep 17, 2015
  3. REAS commented on Jul 26, 2019

    @REAS
    Member

    OK, I tried to clarify this, mostly with added description in pixelDensity(), but with new examples in pixelWidth and pixelHeight. Some additions to pixels[] as well. Let's see how this goes.

  4. Sgsethu commented on Sep 21, 2025

    @Sgsethu

    When using a retina/hidpi version of a PGraphics (or PImage, for that matter), all pixel operations happen in 2x space. This has an effect on:

    • updatePixels(...)
    • get(...)
    • set(...)
    • copy(...)
    • blend(...)

    The pixelFactor variable is 2 for retina, 1 normally. The pixelWidth and pixelHeight fields cover the actual size of the pixels[] array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions