我正在用pycairo绘制曲线,代码如下:
ctx.move_to(0.4,0.8)
ctx.curve_to(0.3,0.4 ,0.4,0.4 ,0.4,0.4)
ctx.set_source_rgb(0,0,0)
ctx.set_line_width(0.001)
ctx.fill()
ctx.move_to(0.4,0.8)
ctx.line_to(0.5,0.8)
ctx.set_source_rgb(0,0,0)
ctx.set_line_width(0.001)
ctx.stroke()
ctx.move_to(0.5,0.8)
ctx.curve_to(0.6,0.4 ,0.5,0.4 ,0.5,0.4)
ctx.set_source_rgb(0,0,0)
ctx.set_line_width(0.001)
ctx.fill()
ctx.move_to(0.4,0.4)
ctx.line_to(0.5,0.4)
ctx.set_source_rgb(0,0,0)
ctx.set_line_width(0.001)
ctx.stroke()
我想填充对象,但正如你所见,我不能填充所有对象,因为它们是分开的,还没有合并。所以我认为最接近的方法是合并它们。你知道吗
关于:
我测试了它,它形成了一个填充区域。我不确定这是否正确。你知道吗
相关问题 更多 >
编程相关推荐