mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 10:55:38 +01:00
don't reapply blendMode() if it's unset
This commit is contained in:
@@ -227,7 +227,7 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* images go out of scope, they will be properly garbage collected.
|
||||
*/
|
||||
protected WeakHashMap<PImage, Object> cacheMap =
|
||||
new WeakHashMap<PImage, Object>();
|
||||
new WeakHashMap<>();
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -334,7 +334,7 @@ public class PGraphics extends PImage implements PConstants {
|
||||
/** True if colors are not in the range 0..1 */
|
||||
boolean colorModeScale; // = true;
|
||||
|
||||
/**
|
||||
/**
|
||||
* True if colorMode(RGB, 255). Defaults to true so that color()
|
||||
* used as part of a field declaration will properly assign values.
|
||||
*/
|
||||
@@ -2016,6 +2016,7 @@ public class PGraphics extends PImage implements PConstants {
|
||||
showMissingWarning("clip");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ( begin auto-generated from noClip.xml )
|
||||
*
|
||||
@@ -2269,9 +2270,9 @@ public class PGraphics extends PImage implements PConstants {
|
||||
*/
|
||||
public void curveVertex(float x, float y) {
|
||||
curveVertexCheck();
|
||||
float[] vertex = curveVertices[curveVertexCount];
|
||||
vertex[X] = x;
|
||||
vertex[Y] = y;
|
||||
float[] v = curveVertices[curveVertexCount];
|
||||
v[X] = x;
|
||||
v[Y] = y;
|
||||
curveVertexCount++;
|
||||
|
||||
// draw a segment if there are enough points
|
||||
@@ -2292,10 +2293,10 @@ public class PGraphics extends PImage implements PConstants {
|
||||
*/
|
||||
public void curveVertex(float x, float y, float z) {
|
||||
curveVertexCheck();
|
||||
float[] vertex = curveVertices[curveVertexCount];
|
||||
vertex[X] = x;
|
||||
vertex[Y] = y;
|
||||
vertex[Z] = z;
|
||||
float[] v = curveVertices[curveVertexCount];
|
||||
v[X] = x;
|
||||
v[Y] = y;
|
||||
v[Z] = z;
|
||||
curveVertexCount++;
|
||||
|
||||
// draw a segment if there are enough points
|
||||
@@ -3904,6 +3905,7 @@ public class PGraphics extends PImage implements PConstants {
|
||||
}
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
// SHAPE
|
||||
@@ -3957,7 +3959,6 @@ public class PGraphics extends PImage implements PConstants {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ( begin auto-generated from shape.xml )
|
||||
*
|
||||
@@ -4055,6 +4056,7 @@ public class PGraphics extends PImage implements PConstants {
|
||||
}
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
// TEXT/FONTS
|
||||
@@ -6169,7 +6171,9 @@ public class PGraphics extends PImage implements PConstants {
|
||||
ellipseMode(s.ellipseMode);
|
||||
shapeMode(s.shapeMode);
|
||||
|
||||
blendMode(s.blendMode);
|
||||
if (blendMode != 0) {
|
||||
blendMode(s.blendMode);
|
||||
}
|
||||
|
||||
if (s.tint) {
|
||||
tint(s.tintColor);
|
||||
@@ -8128,7 +8132,7 @@ public class PGraphics extends PImage implements PConstants {
|
||||
*/
|
||||
static public void showWarning(String msg) { // ignore
|
||||
if (warnings == null) {
|
||||
warnings = new HashMap<String, Object>();
|
||||
warnings = new HashMap<>();
|
||||
}
|
||||
if (!warnings.containsKey(msg)) {
|
||||
System.err.println(msg);
|
||||
|
||||
Reference in New Issue
Block a user