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

Apply blendMode inside _drawPoints #6069

Merged
merged 4 commits into from
Mar 13, 2023
Merged

Apply blendMode inside _drawPoints #6069

merged 4 commits into from
Mar 13, 2023

Conversation

inaridarkfox4231
Copy link
Contributor

@inaridarkfox4231 inaridarkfox4231 commented Mar 13, 2023

The blend function was not applied inside _drawPoints, so let's apply it.

Resolves #6068

Changes:

Do _applyColorBlend() with strokeColor in _drawPoints().

Screenshots of the change:

sample code:

function setup(){
  createCanvas(400,400,WEBGL);
  background(0);
  blendMode(ADD);
  strokeWeight(100);

  stroke(255,0,0);
  point(0,0,0);
  stroke(0,0,255);
  point(50,0,0);
}

left : before, right : after

pointBug_compare

PR Checklist

I would also like to add a unit test later.

The blend function was not applied inside _drawPoints, so let's apply it.
sorry... trailing space has remained.
This is a test to make sure that the blending method specified by blendMode() is properly applied when drawing using point().
Sorry, I forgot to write "done();".
Copy link
Contributor

@davepagurek davepagurek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching and fixing this bug!

@davepagurek davepagurek merged commit 3d983a1 into processing:main Mar 13, 2023
@inaridarkfox4231 inaridarkfox4231 deleted the inaridarkfox4231-pointBlendBug branch March 13, 2023 16:48
@inaridarkfox4231
Copy link
Contributor Author

Thanks for merging! ('ω')
If I had noticed it earlier, I would have made it in time for 1.6.0, but it can't be helped...

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.

blendMode not working when doing point() drawing in webgl
2 participants