aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/pillow_utils.py
diff options
context:
space:
mode:
authorzsloan2021-05-06 18:07:19 -0500
committerGitHub2021-05-06 18:07:19 -0500
commit9ed3c226c561d80957e34294f884fe48373cf6e6 (patch)
tree7b3c603b961aa4b840d82ef289887b0a31c0f676 /wqflask/utility/pillow_utils.py
parent2444d60a93ef7c9900ed9a52877bff0ee08fbfb6 (diff)
parent3c430082b767a29c3e35cb03e68c1b22373ad353 (diff)
downloadgenenetwork2-9ed3c226c561d80957e34294f884fe48373cf6e6.tar.gz
Merge branch 'testing' into bug/fix_rqtl_covariates
Diffstat (limited to 'wqflask/utility/pillow_utils.py')
-rw-r--r--wqflask/utility/pillow_utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/wqflask/utility/pillow_utils.py b/wqflask/utility/pillow_utils.py
index c486abba..5713e155 100644
--- a/wqflask/utility/pillow_utils.py
+++ b/wqflask/utility/pillow_utils.py
@@ -3,12 +3,14 @@ from PIL import Image, ImageColor, ImageDraw, ImageFont
from utility.tools import TEMPDIR
import utility.logger
-logger = utility.logger.getLogger(__name__ )
+logger = utility.logger.getLogger(__name__)
BLACK = ImageColor.getrgb("black")
WHITE = ImageColor.getrgb("white")
# def draw_rotated_text(canvas: Image, text: str, font: ImageFont, xy: tuple, fill: ImageColor=BLACK, angle: int=-90):
+
+
def draw_rotated_text(canvas, text, font, xy, fill=BLACK, angle=-90):
# type: (Image, str, ImageFont, tuple, ImageColor, int)
"""Utility function draw rotated text"""
@@ -20,6 +22,8 @@ def draw_rotated_text(canvas, text, font, xy, fill=BLACK, angle=-90):
canvas.paste(im=tmp_img2, box=tuple([int(i) for i in xy]))
# def draw_open_polygon(canvas: Image, xy: tuple, fill: ImageColor=WHITE, outline: ImageColor=BLACK):
+
+
def draw_open_polygon(canvas, xy, fill=None, outline=BLACK, width=0):
# type: (Image, tuple, ImageColor, ImageColor)
draw_ctx = ImageDraw.Draw(canvas)