停止在平面形状内创建孔。
beginContour() 和 endContour() 函数允许在平面自定义形状内创建负空间。 beginContour() 开始添加顶点到负空间,而 endContour() 则停止添加。 beginContour() 和 endContour() 必须在 beginShape() 和 endShape() 之间被调用。
一些变换图形的函数,如 translate(), rotate(),和 scale() 在 beginContour() 和 endContour() 之间不起作用。 在 beginContour() 和 endContour() 之间之间也不可能使用其他形状,比如 ellipse() 或 rect()。
注意:定义负空间的顶点必须与外部形状的顶点方向相反。首先,以顺时针顺序绘制外部形状的顶点。然后,以逆时针顺序绘制负空间的顶点。
示例
This page is generated from the comments in src/core/shape/vertex.js . Please feel free to edit it and submit a pull request!