Polygon_addVertex(&p, v1); Polygon_addVertex(&p, v2); Polygon_addVertex(&p, v3); Polygon_print(&p); printf("Polygon(p) area=%.3f\n", Polygon_area(&p)); Polygon_destroy(&p); Polygon q; Polygon_init(&q, 4); Polygon_addVertex(&q, v1); Polygon_addVertex(&q, v2); Polygon_a...
GL_POLYGON:绘制一个凸多边形。顶点1到N定义此多边形。对于concave polygons,您至少有两种选择:
qp.setPen(Qt.blue)#绘制弧rect = QRect(0, 10, 100, 100)#alen: 1个alen等于1/16度qp.drawArc(rect, 0, 50 * 16)#通过弧绘制园qp.setPen(Qt.red) qp.drawArc(120, 10, 100, 100, 0, 360 * 16)#绘制带弦的弧qp.drawChord(10, 120, 100, 100, 12, 130 * 16)#绘制扇形qp.drawPie(...