diff --git a/pg.py b/pg.py index 98db8dd..8cad092 100644 --- a/pg.py +++ b/pg.py @@ -216,6 +216,15 @@ class TextButton: # self.delay = delay +def set_rot_point(img, pos): + w, h = img.get_size() + w, h = w * 2, h * 2 + + img2 = pygame.Surface((w, h), pygame.SRCALPHA) + img2.blit(img, (w / 2 - pos[0], h / 2 - pos[1])) + return img2, (w, h) + + def bt_from_ca(ca, function): # bt_from_ca = button from collide able return Button(function, ca)