我想要修改沿x平移得到的一条直线,怎么修改参数?
-
img.draw_line( line2.line(), color = 50),将这条直线元祖里面的x对应坐标值加一个值,然后画出来,怎么做呀?? line2【0】+=59这样报错
-
https://docs.singtown.com/micropython/zh/latest/openmvcam/library/omv.image.html#line
line2.line()是直线元组(x1, y1, x2, y2) 。x1 = line2.x1() + 59 y1 = line2.y1() x2 = line2.x2() y2 = line2.y2() img.draw_line( [x1,y1,x2,y2], color = 50)
如果想简单一点:
img.draw_line(line2.line()+[59,0,0,0], color = 50)