Skip to content

Fix incorrect pixel offset in updatePixels()#7177

Merged
Qianqianye merged 1 commit into
processing:mainfrom
Forchapeatl:patch-5
Aug 15, 2024
Merged

Fix incorrect pixel offset in updatePixels()#7177
Qianqianye merged 1 commit into
processing:mainfrom
Forchapeatl:patch-5

Conversation

@Forchapeatl
Copy link
Copy Markdown
Contributor

Resolves #7139

Changes:

Screenshots of the change:

Before:
image

After :

image

PR Checklist

example usage

function setup() {
  createCanvas(400, 400);
}

function draw() {
  background(220);

  set(0, 0, [255, 0, 0, 255]); // red pixel at (0, 0)
  set(2, 2, [0, 0, 255, 255]); // blue pixel at (2, 2)
  updatePixels(2, 2, 1, 1);    // FIX : pixel at  (2, 2) is blue as expected
}

@Qianqianye Qianqianye merged commit 4e82bbe into processing:main Aug 15, 2024
@Qianqianye
Copy link
Copy Markdown
Contributor

Thanks @Forchapeatl!
@all-contributors please add @Forchapeatl for code

@allcontributors
Copy link
Copy Markdown
Contributor

@Qianqianye

I've put up a pull request to add @Forchapeatl! 🎉

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

set() does not use correct color

2 participants