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

Method bezierVertex

core/src/processing/core/PGraphics.java:2159–2183  ·  view source on GitHub ↗
(float x2, float y2,
                           float x3, float y3,
                           float x4, float y4)

Source from the content-addressed store, hash-verified

2157
2158
2159 public void bezierVertex(float x2, float y2,
2160 float x3, float y3,
2161 float x4, float y4) {
2162 bezierInitCheck();
2163 bezierVertexCheck();
2164 PMatrix3D draw = bezierDrawMatrix;
2165
2166 float[] prev = vertices[vertexCount-1];
2167 float x1 = prev[X];
2168 float y1 = prev[Y];
2169
2170 float xplot1 = draw.m10*x1 + draw.m11*x2 + draw.m12*x3 + draw.m13*x4;
2171 float xplot2 = draw.m20*x1 + draw.m21*x2 + draw.m22*x3 + draw.m23*x4;
2172 float xplot3 = draw.m30*x1 + draw.m31*x2 + draw.m32*x3 + draw.m33*x4;
2173
2174 float yplot1 = draw.m10*y1 + draw.m11*y2 + draw.m12*y3 + draw.m13*y4;
2175 float yplot2 = draw.m20*y1 + draw.m21*y2 + draw.m22*y3 + draw.m23*y4;
2176 float yplot3 = draw.m30*y1 + draw.m31*y2 + draw.m32*y3 + draw.m33*y4;
2177
2178 for (int j = 0; j < bezierDetail; j++) {
2179 x1 += xplot1; xplot1 += xplot2; xplot2 += xplot3;
2180 y1 += yplot1; yplot1 += yplot2; yplot2 += yplot3;
2181 vertex(x1, y1);
2182 }
2183 }
2184
2185
2186/**

Callers 2

quadraticVertexMethod · 0.95
bezierMethod · 0.95

Calls 3

bezierInitCheckMethod · 0.95
bezierVertexCheckMethod · 0.95
vertexMethod · 0.95

Tested by

no test coverage detected