parameters: (draw, i, color)
docstring: Draw a dot around a circle with a color.
docstring_summary: Draw a dot around a circle with a color.
docstring_tokens: Draw a dot around a circle with a color .
function: def draw_dot(draw, i, color):
      """ Draw a dot around a circle with a color. """
      # Positions around the big circle.
      unit_x = 1 + math.sin(i/TOTAL_DOTS * 2*math.pi)
      unit_y = 1 - math.cos(i/TOTAL_DOTS * 2*math.pi)
  
      # Scale to the desired size and circle diameter.
      x = round(((SIZE - DIAMETER)/2 - 1) * unit_x)
      y = round(((SIZE - DIAMETER)/2 - 1) * unit_y)
  
      # Center the pixels for the library.  (Doesn't appear to have
      # any effect at 16x16, but might possibly matter if we add
      # some kind of filter.)
      x += 0.5
      y += 0.5
  
      # These are drawn as rectangles in a 16x16 image, but if we
      # increase the size then they're circles.
      draw.ellipse((x, y, x + DIAMETER, y + DIAMETER), fill=color, width=1)
function_tokens: def draw_dot ( draw , i , color ) : # Positions around the big circle. unit_x = 1 + math . sin ( i / TOTAL_DOTS * 2 * math . pi ) unit_y = 1 - math . cos ( i / TOTAL_DOTS * 2 * math . pi ) # Scale to the desired size and circle diameter. x = round ( ( ( SIZE - DIAMETER ) / 2 - 1 ) * unit_x ) y = round ( ( ( SIZE - DIAMETER ) / 2 - 1 ) * unit_y ) # Center the pixels for the library.  (Doesn't appear to have # any effect at 16x16, but might possibly matter if we add # some kind of filter.) x += 0.5 y += 0.5 # These are drawn as rectangles in a 16x16 image, but if we # increase the size then they're circles. draw . ellipse ( ( x , y , x + DIAMETER , y + DIAMETER ) , fill = color , width = 1 )