用法:
turtle.shapetransform(t11=None, t12=None, t21=None, t22=None)
- t11:- 一個數字(可選)
- t12:- 一個數字(可選)
- t21:- 一個數字(可選)
- t12:- 一個數字(可選)
參數:
設置或返回 turtle 形狀的當前變換矩陣。
如果沒有給出任何矩陣元素,則將轉換矩陣作為 4 個元素的元組返回。否則設置給定元素並根據由第一行 t11、t12 和第二行 t21、t22 組成的矩陣變換 turtle 形狀。行列式 t11 * t22 - t12 * t21 不能為零,否則會引發錯誤。根據給定的矩陣修改拉伸因子、剪切因子和傾斜角。
>>> turtle = Turtle() >>> turtle.shape("square") >>> turtle.shapesize(4,2) >>> turtle.shearfactor(-0.5) >>> turtle.shapetransform() (4.0, -1.0, -0.0, 2.0)
相關用法
- Python turtle.shapetransform()用法及代碼示例
- Python turtle.shapesize用法及代碼示例
- Python turtle.shape()用法及代碼示例
- Python turtle.shape用法及代碼示例
- Python turtle.showturtle()用法及代碼示例
- Python turtle.shearfactor()用法及代碼示例
- Python turtle.shearfactor用法及代碼示例
- Python turtle.speed()用法及代碼示例
- Python turtle.setworldcoordinates()用法及代碼示例
- Python turtle.setx()用法及代碼示例
- Python turtle.settiltangle()用法及代碼示例
- Python turtle.screensize用法及代碼示例
- Python turtle.setup用法及代碼示例
- Python turtle.sety用法及代碼示例
- Python turtle.speed用法及代碼示例
- Python turtle.settiltangle用法及代碼示例
- Python turtle.stamp用法及代碼示例
- Python turtle.setundobuffer()用法及代碼示例
- Python turtle.stamp()用法及代碼示例
- Python turtle.setx用法及代碼示例
注:本文由純淨天空篩選整理自python.org大神的英文原創作品 turtle.shapetransform。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。