Platinum Partner

Drawing Circle Function

Just to make drawing a circle easier.
Here is a function that will draw yellow circle with black outline.

# from appuifw import *
# c = Canvas()
# app.body = c

def circle(x,y,radius=5, outline=0, fill=0xffff00, width=1):
  c.ellipse((x-radius, y-radius, x+radius, y+radius), outline, fill, width)

You may use other default values.

Then I create a function to show circles randomly
import e32
from random import randint, choice

sleep = e32.ao_sleep
colors = [0xff0000, 0x00ff00, 0x0000ff, 0xffff00, 0xffffff]

def rand_circle(n):
  c.clear()
  for i in range(n):
    circle(randint(0,176), randint(0,144), randint(5,20), fill=choice(colors))
    sleep(0.1)

# now show it
rand_circle(30)
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}