As I have described yesterday (Create an alternative form of questionnaire), I'm trying to create a form of questionnaire in which respondents express their approval by dragging the question into a ring that surrounds it. Since I first wanted to get the layout right, I'm now stuck on drawing a ring that contains color gradients, similar to the picture that I have attached. Does anybody have a suggestion on how I could do that, keeping in mind that I'd like to be able to manipulate the color grading, in order to try out different settings. Also, I wondered if theres an easy way to draw a ring around my text-block. Thanks for any tips and suggestions.
import pygame
import ptext
pygame.init()
screen = pygame.display.set_mode((500, 500))
BG_COLOR = pygame.Color('white')
BG_COLOR2 = pygame.Color('black')
x = 200
y = 220
font = pygame.font.SysFont("myanmarmn", 18)
text = """ I shy away
from crowds
and people."""
done = False
while not done:
for event in pygame.event.get():
if event.type == pygame.QUIT:
done = True
elif event.type == pygame.MOUSEMOTION:
if event.buttons[0]:
x += event.rel[0]
y += event.rel[1]
screen.fill(BG_COLOR)
ptext.draw(text, (x, y), color = BG_COLOR2)
pygame.draw.circle(screen, (0,0,0), (250, 250), 230, 20)
pygame.display.flip()
pygame.quit()
quit()