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
Andrew Murray
362d504011
Raise an error if textbbox is used without a FreeTypeFont
2021-05-25 20:45:38 +10:00
Andrew Murray
92edc29439
Round down the radius in rounded_rectangle
2021-04-05 08:54:06 +10:00
Andrew Murray
9ce3eba7eb
Only draw each pixel once
2021-03-08 19:54:03 +11:00
Andrew Murray
f5d49f4f61
Added rounded_rectangle method
2021-03-08 19:53:59 +11:00
nulano
d7a08cbd15
add color support to new text measuring functions
2020-10-12 16:05:19 +01:00
nulano
90e8255ba4
Merge remote-tracking branch 'upstream/master' into anchor-part3
...
# Conflicts:
# Tests/test_imagefontctl.py
2020-10-12 15:50:45 +01:00
Hugo van Kemenade
43c3f4de80
Merge pull request #4955 from nulano/ft-color3
2020-10-12 13:52:01 +03:00
Hugo van Kemenade
15c339470d
Merge pull request #4523 from xtsm/ellipse
...
Implemented another ellipse drawing algorithm
2020-10-11 18:04:34 +03:00
nulano
1551e120ae
add textlength and textbbox to ImageDraw
2020-10-09 01:02:51 +01:00
nulano
395aa946a9
add getbbox and getlength, with tests
...
Squashed commits:
[ec9ec31b] add tests for invalid anchor
(cherry picked from commit 9e50a6a47f79876ee56942152047f03fff03c49b)
[386a9170] fix lint and docs
(cherry picked from commit 2d0d5282fcfc3ee332a41e60b865ee766445cc3d)
[29f5d4c9] restore and document previous getsize behaviour
see discussion in issue 4789
(cherry picked from commit 9fbc94571ce0ed42fdd11e99f343a1613c9dc6d3)
[0ffd51a0] add getbbox and getlength, with tests
(cherry picked from commit c5f63737476a998c81e589e5819d21ca69bb7b46)
2020-10-09 00:56:58 +01:00
nulano
82a28d12e2
add support for fonts with COLR data
2020-10-07 05:29:10 +01:00
nulano
e6d4c2ce8f
implement text anchor for truetype fonts
...
(cherry picked from commit bac9025918ccf944bac77addc130f33cf9d74701)
2020-09-19 15:17:45 +02:00
Hugo van Kemenade
3dba4ee10a
Merge pull request #4846 from comhar/features/compute_polygon_coordinates
2020-09-04 23:28:43 +03:00
Hugo van Kemenade
e0eec1eb56
Merge branch 'master' into rm-3.5
2020-09-01 20:16:46 +03:00
Tommy C
b142560488
Rename b_circle
and bounding_circle
+ accept ((x0, y0), r)
...
Summary of changes
- Rename `b_circle` and `bounding_circle`
-`bounding_circle` now accepts both formats below:
- (x0, y0, r)
- ((x0, y0), r)
2020-08-22 20:19:23 +01:00
Tommy C
df9329f9f0
Replace bbox
with b_circle
, kwargs with args + minor tweaks
...
Summary of changes:
- `ImageDraw.regular_polygon` now accepts a bounding circle which
inscribes the polygon. A bounding circle is defined by a center point
(x0, y0) and a radius. A bounding box is no longer accepted.
- All keyword args have been replaced with positional args.
Misc
- Test image file renaming, minor variable name changes
2020-08-20 20:46:11 +01:00
Tommy C
ac7d41545d
Update regular_polygon
args + arg checks
...
Summary of changes
- Allow positional args in `regular_polygon` method
- Allow multiple bounding box formats
- (e.g. bbox = [(x0, y0), (x1, y1)] or [x0, y0, x1, y1])
- Check if bounding box is square
- Update var names
- b_box => bbox
- nb_sides => n_sides
2020-08-16 21:07:16 +01:00
Tommy C
0ed01dd964
Add ImageDraw.regular_polygon
2020-08-16 13:29:13 +01:00
Hugo van Kemenade
dd87dd50c0
Update to isort 5 with Black profile support
2020-08-08 22:39:29 +03:00
Hugo van Kemenade
e42aec8c90
Update Black target to py36
2020-07-27 17:02:10 +03:00
Stanislau Tsitsianok
9a9d3a050a
Fixed tests
2020-06-29 22:49:11 +03:00
Andrew Murray
f5e9252b12
Fixed drawing a jointed line with a sequence of numeric values
2020-04-24 18:48:10 +10:00
Andrew Murray
56f30ef792
Allow explicit zero width to hide outline
2020-01-08 21:55:15 +11:00
Hugo
6f88d8dd6b
black --target-version py35
2019-11-02 20:02:07 +02:00