窗体函数
t u r t l e . s e t u p ( w i d t h , h e i g h t , s t a r t x , s t a r t y ) \textcolor{red}{turtle.setup(width, height, startx, starty)} turtle.setup(width,height,startx,starty)
设置主窗体的大小和位置
参数 | 描述 |
---|---|
width | 窗口 宽 度 \textcolor{red}{宽度} 宽度 如果值是整数,表示的像素值 如果值是小数,表示窗口宽度与屏幕的比例; |
height | 窗口 高 度 \textcolor{red}{高度} 高度 如果值是整数,表示的像素值 如果值是小数,表示窗口高度与屏幕的比例; |
startx | 窗口 左 侧 \textcolor{red}{左侧} 左侧与屏幕左侧的像素距离 如果值是None 窗口位于屏幕水平中央; |
starty | 窗口 顶 部 \textcolor{red}{顶部} 顶 |