def drawBrush(self, fig_param_stack, res_address):
"""Crea un pincel sobre el canvas actual
args:
fig_param_stack -- list(params) : lista de parámetros de inicialización
res_address -- int : dirección donde guardar pincel
"""
color = self.mem.getValue(fig_param_stack.pop())
# create a turtle object
ttl = turtle.RawTurtle(self.canvas)
try:
ttl.color(color)
except:
try:
color = g.colorDict[color]
ttl.color(color)
except KeyError:
self.caller.print('Error: color ' + color + ' no me sirve')
self.caller.running = False
return
ttl.speed('fastest')
ttl.shape('circle')
self.mem.setValue(ttl, int(res_address))
评论列表
文章目录