Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect pixel offset in updatePixels() #7177

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

Forchapeatl
Copy link
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
2 checks passed
@Qianqianye
Copy link
Contributor

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

Copy link
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