quadraticVertex()

本参考资料用于Processing 3.0+。 如果你使用的是前一版本,请在使用软件帮助菜单内的参考资料。. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.

名称

quadraticVertex()

示例
 noFill();

strokeWeight(4);

beginShape();

vertex(20, 20);

quadraticVertex(80, 20, 50, 50);

endShape();

 noFill();

strokeWeight(4);

beginShape();

vertex(20, 20);

quadraticVertex(80, 20, 50, 50);

quadraticVertex(20, 80, 80, 80);

vertex(80, 60);

endShape();

描述 Specifies vertex coordinates for quadratic Bezier curves. Each call to quadraticVertex() defines the position of one control point and one anchor point of a Bezier curve, adding a new segment to a line or shape. The first time quadraticVertex() is used within a beginShape() call, it must be prefaced with a call to vertex() to set the first anchor point. This function must be used between beginShape() and endShape() and only when there is no MODE parameter specified to beginShape(). Using the 3D version requires rendering with P3D (see the Environment reference for more information).
语法
quadraticVertex(cx, cy, x3, y3) quadraticVertex(cx, cy, cz, x3, y3, z3)
参数
cx float: the x-coordinate of the control point
cy float: the y-coordinate of the control point
x3 float: the x-coordinate of the anchor point
y3 float: the y-coordinate of the anchor point
cz float: the z-coordinate of the control point
z3 float: the z-coordinate of the anchor point
返回值 void
相关 curveVertex()
vertex()
bezierVertex()
bezier()

Updated on October 2, 2018 05:02:08pm EDT

quadraticVertex()