MCPcopy Index your code
hub / github.com/benfry/processing4 / setTintImpl

Method setTintImpl

core/src/processing/opengl/PShapeOpenGL.java:2071–2093  ·  view source on GitHub ↗
(int tint)

Source from the content-addressed store, hash-verified

2069
2070
2071 protected void setTintImpl(int tint) {
2072 if (tintColor == tint) return;
2073 tintColor = tint;
2074
2075 if (image != null) {
2076 Arrays.fill(inGeo.colors, 0, inGeo.vertexCount,
2077 PGL.javaToNativeARGB(tintColor));
2078 if (shapeCreated && tessellated && hasPolys) {
2079 if (is3D()) {
2080 Arrays.fill(tessGeo.polyColors, firstPolyVertex, lastPolyVertex + 1,
2081 PGL.javaToNativeARGB(tintColor));
2082 root.setModifiedPolyColors(firstPolyVertex, lastPolyVertex);
2083 } else if (is2D()) {
2084 int last1 = lastPolyVertex + 1;
2085 if (-1 < firstLineVertex) last1 = firstLineVertex;
2086 if (-1 < firstPointVertex) last1 = firstPointVertex;
2087 Arrays.fill(tessGeo.polyColors, firstPolyVertex, last1,
2088 PGL.javaToNativeARGB(tintColor));
2089 root.setModifiedPolyColors(firstPolyVertex, last1 - 1);
2090 }
2091 }
2092 }
2093 }
2094
2095
2096 @Override

Callers 1

setTintMethod · 0.95

Calls 5

javaToNativeARGBMethod · 0.95
setModifiedPolyColorsMethod · 0.80
fillMethod · 0.45
is3DMethod · 0.45
is2DMethod · 0.45

Tested by

no test coverage detected