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
Hugo
3e24c5fea4
Replace isStringType(t) with isinstance(t, str)
...
Co-Authored-By: Jon Dufresne <jon.dufresne@gmail.com>
2019-10-08 17:26:52 +03:00
Hugo
538d9e2e5d
Upgrade Python syntax with pyupgrade --py3-plus
2019-10-07 14:30:59 +03:00
Andrew Murray
da39d40342
Merge pull request #3978 from radarhere/stroke
...
Added text stroking
2019-09-06 19:14:49 +10:00
Andrew Murray
e790a4066a
Renamed method
...
Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
2019-09-06 06:18:48 +10:00
Andrew Murray
23872c0645
Do not allow floodfill to extend into negative coordinates
2019-08-12 06:51:16 +10:00
Andrew Murray
f93a5d0972
Added text stroking
2019-07-29 06:40:03 +10:00
Hugo van Kemenade
1ab5670eb1
Introduce isort to automate import ordering and formatting ( #3954 )
...
Introduce isort to automate import ordering and formatting
2019-07-16 23:02:31 +03:00
Jon Dufresne
d50445ff30
Introduce isort to automate import ordering and formatting
...
Similar to the recent adoption of Black. isort is a Python utility to
sort imports alphabetically and automatically separate into sections. By
using isort, contributors can quickly and automatically conform to the
projects style without thinking. Just let the tool do it.
Uses the configuration recommended by the Black to avoid conflicts of
style.
Rewrite TestImageQt.test_deprecated to no rely on import order.
2019-07-06 16:11:35 -07:00
Andrew Murray
13224bf029
Removed unused argument
2019-07-04 20:07:33 +10:00
Hugo
53a7e35004
Format with Black
2019-06-10 18:22:46 +03:00
Ben Yang
8bd4bbb808
implemented language parameter for multiline ImageDraw methods, updated release notes
2019-03-11 20:21:52 -07:00
Andrew Murray
929f7397db
Line too long
2018-10-21 18:26:08 +11:00
Andrew Murray
7edca01921
Minor documentation improvement [ci skip]
2018-10-11 19:36:50 +11:00
Andrew Murray
1e305380ae
Merge pull request #3094 from hugovk/add-width-to-shapes
...
Add line width parameter to rectangle and ellipse-based shapes
2018-09-29 23:21:03 +10:00
Andrew Murray
b5af283732
Added support to floodfill for non-RGB colors
2018-09-26 22:22:17 +10:00
Andrew Murray
f3842460ba
Added line joints
2018-09-16 21:29:09 +10:00
Andrew Murray
7b4040f991
Merge pull request #3294 from yo1995/perfperf-improv-ImageDraw-floodfill
...
Performance improvement of ImageDraw.floodfill()
2018-09-16 12:46:50 +10:00
Hugo
fa14698e66
Merge pull request #3233 from hugovk/PYTHONOPTIMIZE
...
Fix code for PYTHONOPTIMIZE
2018-09-05 19:57:10 +03:00
yo1995
bb77f62586
fix typo: proceeded -> processed
2018-09-04 21:15:25 -04:00
yo1995
3cf1a4ea87
improved comments and one logic according to PR 3294 discussion
2018-09-04 12:03:20 -04:00
Andrew Murray
5e2d6c951a
Merge branch 'master' into perfperf-improv-ImageDraw-floodfill
2018-09-01 20:58:53 +10:00