mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
constrain lerpColor() between 0 and 1
This commit is contained in:
@@ -7635,6 +7635,9 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* individual color components of a color supplied as an int value.
|
||||
*/
|
||||
static public int lerpColor(int c1, int c2, float amt, int mode) {
|
||||
if (amt < 0) amt = 0;
|
||||
if (amt > 1) amt = 1;
|
||||
|
||||
if (mode == RGB) {
|
||||
float a1 = ((c1 >> 24) & 0xff);
|
||||
float r1 = (c1 >> 16) & 0xff;
|
||||
|
||||
@@ -14,6 +14,10 @@ X fix image transparency in PDF output
|
||||
X https://github.com/processing/processing/pull/2070
|
||||
X Java2D images crash after being resized
|
||||
X https://github.com/processing/processing/issues/2113
|
||||
X constrain lerpColor() between 0 and 1
|
||||
|
||||
_ JSONObject/Array.format(-1) not working on embedded JSONObjects
|
||||
_ https://github.com/processing/processing/issues/2119
|
||||
|
||||
opengl
|
||||
X fix inconsistency with P2D and resetMatrix()
|
||||
@@ -28,6 +32,8 @@ X push/popStyle() causes color problems with P2D/P3D
|
||||
X https://github.com/processing/processing/issues/2102
|
||||
X child SVG elements misplaced when rendering with P2D/P3D
|
||||
X https://github.com/processing/processing/issues/2086
|
||||
X SUBTRACT and DIFFERENCE blend modes are swapped
|
||||
X https://github.com/processing/processing/issues/2075
|
||||
|
||||
_ Sort out blending differences with P2D/P3D
|
||||
_ https://github.com/processing/processing/issues/1844
|
||||
|
||||
Reference in New Issue
Block a user