aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/pillow_utils.py
diff options
context:
space:
mode:
authorAlexander Kabui2021-05-10 08:46:44 +0300
committerGitHub2021-05-10 08:46:44 +0300
commitf7eeb913af479358583844164400dc8489a87d8f (patch)
tree5deb035007120eff4d691c270c2ec2937622b852 /wqflask/utility/pillow_utils.py
parent0b723720f7b1b9802b2f5453b747c7e48b693817 (diff)
parent1afece5464520700901cbde19599ac45222ea58f (diff)
downloadgenenetwork2-f7eeb913af479358583844164400dc8489a87d8f.tar.gz
Merge branch 'testing' into feature/integrate-correlation-api
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)