Commit Graph

112 Commits

Author SHA1 Message Date
Andrew Murray
e225f9f589 Deprecate ImageDraw.getdraw hints argument 2024-06-10 11:50:13 +10:00
Andrew Murray
5bacce9dc2
Merge pull request #8046 from srittau/type-annotations
Add various type annotations
2024-06-08 18:38:21 +10:00
Andrew Murray
45cdc53bbb Updated type hints 2024-06-08 18:03:06 +10:00
Andrew Murray
f5da04adb0 Added type hints
Co-authored-by: Nulano <nulano@nulano.eu>
2024-06-03 21:58:02 +10:00
Andrew Murray
d566c04d5b Updated type hints 2024-06-03 14:20:01 +10:00
void4
8db5fbead1
Update src/PIL/ImageDraw.py - set circle argument xy to type Sequence[float] instead of Coords, radius to float
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-05-27 13:27:56 +02:00
void4
38e6913579
Simplify circle() by reusing ellipse() 2024-05-27 13:01:10 +02:00
pre-commit-ci[bot]
2ee3cef50e [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-05-26 22:25:16 +00:00
void4
2c4a6e1179 Add function and documentation to draw circle 2024-05-27 00:23:16 +02:00
Andrew Murray
73a3e4938c
Merge branch 'main' into type-annotations 2024-05-15 21:48:41 +10:00
Andrew Murray
a8d154877d Added type hints 2024-05-13 18:47:51 +10:00
Sebastian Rittau
d63caf266d Various fixes 2024-05-07 15:59:20 +02:00
Sebastian Rittau
c92f59d758 Add various type annotations 2024-05-07 14:30:34 +02:00
Andrew Murray
d2453250f1 Fixed joined corners for rounded_rectangle() non-integer dimensions 2024-03-15 23:58:07 +11:00
Andrew Murray
65cb0b0487 Added _typing.Coords 2024-02-06 07:49:43 +11:00
Andrew Murray
5a8e7dda79 Added type hints 2024-02-05 20:36:34 +11:00
Andrew Murray
6768d3aa91
Merge pull request #7497 from ZachNagengast/fix-alpha-for-overlapping-glyphs
Fix incorrect color blending for overlapping glyphs in BGRA mode
2023-12-24 19:03:28 +11:00
Hugo van Kemenade
43b2f61e79 Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
Andrew Murray
a6a612c6c5
Merge branch 'main' into fix-alpha-for-overlapping-glyphs 2023-12-02 21:33:29 +11:00
Zach Nagengast
bd2977c518
Update src/PIL/ImageDraw.py
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2023-12-01 22:56:59 -08:00
Nulano
0cef9f251c fix drawing text alpha on RGBA image on big-endian platforms 2023-11-27 17:12:12 +01:00
Christian Clauss
fd59f91d17 ruff: Minor optimizations of list comprehensions, x in set, etc. 2023-11-06 19:13:47 +06:00
Andrew Murray
b1f5ee9043 Added font_size keyword arguments to ImageDraw text methods 2023-08-26 17:01:15 +10:00
Andrew Murray
c68c508e27 Fixed joined corners for odd dimensions 2023-05-10 13:25:35 +10:00
Andrew Murray
3fc446c277 Added width argument to regular_polygon 2023-05-03 22:54:18 +10:00
Andrew Murray
bc0bf5efea Preserve line spacing backwards compatibility 2023-04-10 18:49:06 +10:00
Andrew Murray
b2301d70d1 Removed ImageFont.getsize and related functions 2023-04-10 16:56:13 +10:00
Andrew Murray
fec92ce9cc
Restored deleted docstring 2023-03-19 13:36:43 +11:00
Auto-5
f03f9670fa
Removed incorrect docstring 2023-03-18 14:12:53 +00:00
Andrew Murray
a4965a7eaa Split into x and y errors 2023-03-01 22:06:40 +11:00
Andrew Murray
b84c29a035 Raise an error if co-ordinates are incorrectly ordered 2023-03-01 11:22:35 +11:00
Andrew Murray
60208a3250 Only allow "corners" to be used as a keyword argument 2023-02-17 10:32:55 +11:00
Andrew Murray
0f2a4c1ae5 Added "corners" argument to rounded_rectangle() 2023-02-16 19:19:17 +11:00
pre-commit-ci[bot]
24183d652e [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-02-06 19:27:19 +00:00
Hugo van Kemenade
2ae55ccbda Improve exception traceback readability 2022-12-30 00:07:52 +02:00
Andrew Murray
5471dc2b26 Use fractional coordinates when drawing text 2022-11-08 11:49:39 +11:00
Hugo van Kemenade
7a06bc6357
Merge pull request #6533 from nulano/document_imagedraw_attributes 2022-10-25 13:06:17 +03:00
Ondrej Baranovič
18bd77bbc0
simplify code, make test more generic 2022-08-25 19:45:33 +10:00
nulano
ced381edaa
Document ImageDraw attributes 2022-08-25 00:48:19 +02:00
Andrew Murray
54b01f55f8 Round box position to integer when pasting embedded color 2022-08-22 12:14:54 +10:00
Andrew Murray
8135bd5cfb Added documentation 2022-08-11 10:35:44 +10:00
Andrew Murray
04d9761316 Changed "font" to class variable 2022-08-06 17:29:44 +10:00
Andrew Murray
8a6050ee5b Replaced __internal__ argument with warning filters 2022-07-01 14:10:29 +02:00
nulano
c854bf8d1c
add getbbox and getlength to basic ImageFont and update related tests 2022-06-19 22:04:56 +01:00
nulano
406fe59242
deprecate font.getsize and related functions 2022-06-19 22:03:34 +01:00
Andrew Murray
e96177451e Only import ImageFont when necessary 2022-05-30 19:36:36 +10:00
Hugo van Kemenade
d3c9a6504e Variable in function should be snake_case 2022-04-10 23:55:16 +03:00
Andrew Murray
90a52d3c0d Added width argument to polygon 2021-11-16 22:02:54 +11:00
Hugo van Kemenade
31a96b9c9b Upgrade Python syntax with pyupgrade --py36-plus and format with Black 2021-10-19 15:34:52 +03:00
Andrew Murray
fa559277fb When allocating a new color, repurpose an unused index if necessary 2021-06-23 19:27:08 +10:00