Python turtle.pensize() Examples

The following are 4 code examples of turtle.pensize(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module turtle , or try the search function .
Example #1
Source File: xzpq.py    From You-are-Pythonista with GNU General Public License v3.0 6 votes vote down vote up
def tail():
    '''
    尾巴
    '''
    t.pensize(4)
    t.color((255, 155, 192))
    t.pu()
    t.seth(90)
    t.fd(70)
    t.seth(0)
    t.fd(95)
    t.pd()
    t.seth(0)
    t.circle(70, 20)
    t.circle(10, 330)
    t.circle(70, 30) 
Example #2
Source File: clock.py    From Tools with MIT License 5 votes vote down vote up
def createClock(radius):
	turtle.reset()
	turtle.pensize(7)
	for i in range(60):
		move(radius)
		if i % 5 == 0:
			turtle.forward(20)
			move(-radius-20)
		else:
			turtle.dot(5)
			move(-radius)
		turtle.right(6) 
Example #3
Source File: xzpq.py    From You-are-Pythonista with GNU General Public License v3.0 5 votes vote down vote up
def init_pen():
    '''
    初始化画笔的一些属性
    '''
    t.pensize(4)  # 设置画笔的大小
    t.colormode(255)  # 设置GBK颜色范围为0-255
    t.color((255, 155, 192), "pink")  # 设置画笔颜色和填充颜色(pink)
    t.setup(900, 500)  # 设置主窗口的大小为900*500
    t.speed(10)  # 设置画笔速度为10 
Example #4
Source File: xzpq.py    From You-are-Pythonista with GNU General Public License v3.0 5 votes vote down vote up
def foot():
    '''
    脚
    '''
    t.pensize(10)
    t.color((240, 128, 128))
    t.pu()
    t.seth(90)
    t.fd(-75)
    t.seth(0)
    t.fd(-180)
    t.pd()
    t.seth(-90)
    t.fd(40)
    t.seth(-180)
    t.color("black")
    t.pensize(15)
    t.fd(20)
    t.pensize(10)
    t.color((240, 128, 128))
    t.pu()
    t.seth(90)
    t.fd(40)
    t.seth(0)
    t.fd(90)
    t.pd()
    t.seth(-90)
    t.fd(40)
    t.seth(-180)
    t.color("black")
    t.pensize(15)
    t.fd(20)