diff options
Diffstat (limited to 'src/frame.py')
| -rw-r--r-- | src/frame.py | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/frame.py b/src/frame.py index c066cdb..cddb611 100644 --- a/src/frame.py +++ b/src/frame.py @@ -5,6 +5,11 @@ from PyQt5 import QtGui from PIL import Image from PIL.ImageQt import ImageQt import sys +import os + + +class Frame: + '''Controller class for all frames.''' class FramePainter(QtGui.QPainter): @@ -43,5 +48,19 @@ def FloodFrame(width, height, RgbaTuple): def BlankFrame(width, height): - '''The base frame used by each component to start drawing''' + '''The base frame used by each component to start drawing.''' return FloodFrame(width, height, (0, 0, 0, 0)) + + +def Checkerboard(width, height): + ''' + A checkerboard to represent transparency to the user. + TODO: Would be cool to generate this image with numpy instead. + ''' + image = FloodFrame(1920, 1080, (0, 0, 0, 0)) + image.paste(Image.open( + os.path.join(Frame.core.wd, "background.png")), + (0, 0) + ) + image = image.resize((width, height)) + return image |
