Skip to content

Instantly share code, notes, and snippets.

@abrahamjso
Created May 14, 2013 19:43
Show Gist options
  • Save abrahamjso/5578871 to your computer and use it in GitHub Desktop.
Save abrahamjso/5578871 to your computer and use it in GitHub Desktop.
def antenas():
global colorsm antenas
imagen = Image.new( 'RGB', (500, 500), "white")
x, y = imagen.size
antenas_l = []
i = 0
for antena in antenas:
draw = ImageDraw.Draw(imagen)
intensidad, posX, posY = antena
box = (posX - intensidad/2, posY - intensidad/2, posX + intensidad/2, posY + intensidad/2)
draw.ellipse(box, fill=None, outline= colors[i])
draw.text((centrox, centroy), 'antena'+str(i), fill=colors[i]) #Para pintar el ID de cada figura
antenas_l.append(posX, posY)
i += 1
posReceptor(antenas_l, imagen)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment