diff options
author | zsloan | 2021-10-18 17:50:26 +0000 |
---|---|---|
committer | zsloan | 2021-10-18 17:50:26 +0000 |
commit | e36eaf0003a598bc5aa688803dd1b36c24a4c051 (patch) | |
tree | a59b7dadf02241575eb0774f97c6048e2425c053 /wqflask/utility/pillow_utils.py | |
parent | bd421438f1f0b4de913fa40cd49cfcda27e6b16f (diff) | |
parent | 04f3d13aceeaec2e52b94037d59f08ed6dc6a8bb (diff) | |
download | genenetwork2-e36eaf0003a598bc5aa688803dd1b36c24a4c051.tar.gz |
Merge branch 'testing' of github.com:genenetwork/genenetwork2 into feature/remove_trait_creation_from_search
Diffstat (limited to 'wqflask/utility/pillow_utils.py')
-rw-r--r-- | wqflask/utility/pillow_utils.py | 6 |
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) |