MCPcopy Index your code
hub / github.com/processing/processing / bezierVertex

Method bezierVertex

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

Source from the content-addressed store, hash-verified

2083
2084
2085 public void bezierVertex(float x2, float y2,
2086 float x3, float y3,
2087 float x4, float y4) {
2088 bezierInitCheck();
2089 bezierVertexCheck();
2090 PMatrix3D draw = bezierDrawMatrix;
2091
2092 float[] prev = vertices[vertexCount-1];
2093 float x1 = prev[X];
2094 float y1 = prev[Y];
2095
2096 float xplot1 = draw.m10*x1 + draw.m11*x2 + draw.m12*x3 + draw.m13*x4;
2097 float xplot2 = draw.m20*x1 + draw.m21*x2 + draw.m22*x3 + draw.m23*x4;
2098 float xplot3 = draw.m30*x1 + draw.m31*x2 + draw.m32*x3 + draw.m33*x4;
2099
2100 float yplot1 = draw.m10*y1 + draw.m11*y2 + draw.m12*y3 + draw.m13*y4;
2101 float yplot2 = draw.m20*y1 + draw.m21*y2 + draw.m22*y3 + draw.m23*y4;
2102 float yplot3 = draw.m30*y1 + draw.m31*y2 + draw.m32*y3 + draw.m33*y4;
2103
2104 for (int j = 0; j < bezierDetail; j++) {
2105 x1 += xplot1; xplot1 += xplot2; xplot2 += xplot3;
2106 y1 += yplot1; yplot1 += yplot2; yplot2 += yplot3;
2107 vertex(x1, y1);
2108 }
2109 }
2110
2111
2112/**

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