tint(rgb, alpha) bug #5040

Closed
cameyo42 opened this Issue May 1, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@cameyo42

cameyo42 commented May 1, 2017

I think this is a tint(rgb, alpha) error (processing 3.3.2 windows10):
The same code works well with 3.3 version.

PGraphics pg0;
float t0=128;

void setup() 
{
  size(200, 200);
  pg0 = createGraphics(200, 200);
  pg0.smooth();
  pg0.beginDraw();
  pg0.fill(255,0,0);
  pg0.rect(30, 30, 100, 100);
  pg0.endDraw();   
}

void draw() 
{
  background(255);
  // uncomment the following line to get NullPointeException  
  //tint(255,t0); 
  image(pg0, 0, 0);    
}

void mousePressed() 
{
  t0 = random(20, 255);
  println(t0);
}
@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry May 2, 2017

Member

@JakubValtar regressions related to image changes?

Member

benfry commented May 2, 2017

@JakubValtar regressions related to image changes?

JakubValtar added a commit to JakubValtar/processing that referenced this issue May 2, 2017

Revert updatePixels() to set modified flag to true
PImage.modify flag is now used for two purposes and should be split into
two variables:
- internally by renderers to signal that pixels[] changed and need to be
drawn
- externally to signal other renderers that this image changed in some
way and they should update their cache

Reverts 51dff76

Fixes #5040
@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar May 2, 2017

Contributor

@benfry I reverted the change which caused the NPE.

There is however a deeper issue with how PImage.modified is used which I will address later. Check the PR description #5042.

Contributor

JakubValtar commented May 2, 2017

@benfry I reverted the change which caused the NPE.

There is however a deeper issue with how PImage.modified is used which I will address later. Check the PR description #5042.

@benfry benfry closed this in #5042 May 2, 2017

@benfry

This comment has been minimized.

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