[英]turtle width and pensize Difference?
i changed these attribute of turtle and they seem to do the same thing which is make the line drawn bigger or smaller, what's the difference between the two attributes? 我更改了turtle的这些属性,它们似乎在做相同的事情,即使线绘制得更大或更小,这两个属性之间有什么区别? they seem to be the same thing
他们似乎是同一回事
There is no difference, turtle.width()
is an alias for turtle.pensize()
. 没有区别,
turtle.width()
的一个别名turtle.pensize()
Here is the docstring shown by help(turtle.pensize)
: 这是
help(turtle.pensize)
显示的文档字符串:
Help on function pensize in module turtle:
关于模块乌龟中的函数pensize的帮助:
pensize(width=None) Set or return the line thickness.
pensize(width = None)设置或返回线条粗细。
Aliases: pensize | width Argument: width -- positive number Set the line thickness to width or return it. If resizemode is set to "auto" and turtleshape is a polygon, that polygon is drawn with the same line thickness. If no argument is given, current pensize is returned. Example: >>> pensize() 1 >>> pensize(10) # from here on lines of width 10 are drawn
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.