|
@ -5,6 +5,8 @@ from PIL import Image |
|
|
from PIL import ImageDraw |
|
|
from PIL import ImageDraw |
|
|
from PIL import ImageFont |
|
|
from PIL import ImageFont |
|
|
|
|
|
|
|
|
|
|
|
mirror = False |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def rgb(r=0, g=None, b=None): |
|
|
def rgb(r=0, g=None, b=None): |
|
|
if g == None: |
|
|
if g == None: |
|
@ -19,6 +21,8 @@ def rrc(tuple, center, angle): |
|
|
cos = math.cos(angle) |
|
|
cos = math.cos(angle) |
|
|
tpl = (tuple[0] - center[0], tuple[1] - center[1]) |
|
|
tpl = (tuple[0] - center[0], tuple[1] - center[1]) |
|
|
tpl = tuple |
|
|
tpl = tuple |
|
|
|
|
|
if mirror: |
|
|
|
|
|
cos = -cos |
|
|
return (int(tpl[0] * sin + tpl[1] * cos + center[0]), int(-tpl[0] * cos + tpl[1] * sin + center[1])) |
|
|
return (int(tpl[0] * sin + tpl[1] * cos + center[0]), int(-tpl[0] * cos + tpl[1] * sin + center[1])) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|