processing / processing4-javafx

JavaFX library for Processing 4
14 stars 5 forks source link

tint() on FX2D renderer does not work properly #1

Open SanielDan opened 4 years ago

SanielDan commented 4 years ago
## Description

Using tint() on different image() call for the same PImage cause all the images being tinted of the same color.

Your Environment

Possible Causes / Solutions

The problem is caused by the caching system that the PImage use when the FX2D rederer is on. The image is cached with the last used tint value, that cause all the images being displayed with the same color, if they are refered to the same PImage. The PImage should be probably cached once per color in order to allow the drawing of different tinted version of the same PImage.

stigmollerhansen commented 3 years ago

Until this bug gets fixed, adding g.removeCache(); after applying a tint to a PImage is a possible workaround.