Commit Graph

156 Commits

Author SHA1 Message Date
nulano
1bf87556ef
add textbbox and textlength to ImageDraw2 and update tests 2022-06-19 22:04:57 +01:00
nulano
c854bf8d1c
add getbbox and getlength to basic ImageFont and update related tests 2022-06-19 22:04:56 +01:00
Hugo van Kemenade
38931c1e47
Merge pull request #6278 from radarhere/polygon
Fixed drawing translucent 1px high polygons
2022-06-04 09:34:37 +03:00
Andrew Murray
cb4b5f212d Separated test 2022-05-28 15:25:19 +10:00
Andrew Murray
62c7ee0f00 Only try to connect discontiguous corners at the end of edges 2022-05-16 22:31:49 +10:00
Andrew Murray
c824ab048f Fixed drawing translucent 1px high polygons 2022-05-06 22:35:26 +10:00
Hugo van Kemenade
f7169f9c93
Merge pull request #5980 from radarhere/polygon 2022-03-27 18:51:10 +03:00
Andrew Murray
b894c8c73d Connected discontiguous polygon corners 2022-01-21 11:55:59 +11:00
Andrew Murray
f8e4e9c2dd Added enums 2022-01-15 09:02:31 +11:00
Andrew Murray
4222605442 Fixed freeing pointer 2021-12-27 13:39:37 +11:00
Andrew Murray
90a52d3c0d Added width argument to polygon 2021-11-16 22:02:54 +11:00
Andrew Murray
d7873e02ab Added test that translucent polygon pixels do not combine 2021-11-16 11:12:48 +11:00
Hugo van Kemenade
f3db65db09
Merge pull request #5347 from radarhere/edge 2021-06-28 17:17:17 +03:00
Stanislau Tsitsianok
ca67a0c1a2
Added test for #5432 2021-05-02 17:12:27 +03:00
Andrew Murray
a3dbee9f08 Cover horizontal lines both increasing in x 2021-04-11 12:41:33 +10:00
Andrew Murray
006de79d60 Use assert_image_equal_tofile 2021-04-11 12:41:33 +10:00
Tsung-Po Sun
9a4b1301de Modify test code 2021-04-11 12:41:33 +10:00
Tsung-Po Sun
87e7e88591 fix lint 2021-04-11 12:41:32 +10:00
Tsung-Po Sun
df0273e024 Reformat 2021-04-11 12:41:32 +10:00
Tsung-Po Sun
324d934128 Remove spaces 2021-04-11 12:41:32 +10:00
Tsung-Po Sun
824d2fa4f3 Add test 2021-04-11 12:41:32 +10:00
Andrew Murray
92edc29439 Round down the radius in rounded_rectangle 2021-04-05 08:54:06 +10:00
Andrew Murray
6591297239 Increased use of assert_image_equal_tofile 2021-03-20 22:32:27 +11: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
Andrew Murray
c0ee869c2c Only draw each rectangle outline pixel once 2021-02-22 07:48:58 +11:00
Andrew Murray
a5c251029c Replaced various instances of assert_image_equal with assert_image_equal_tofile 2021-02-21 22:15:56 +11: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
3fc1be06e6 add and fix tests for text anchors 2020-09-22 11:31:43 +02:00
Andrew Murray
9c22425881 Lint fix 2020-09-05 13:32:59 +10: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
10615a7da7 Upgrade Python syntax for 3.6+
Co-authored-by: nulano <nulano@nulano.eu>
2020-07-30 10:09:18 +03:00
Stanislau Tsitsianok
88651c334f
Try to fix CI 2020-06-29 23:58:58 +03:00
Stanislau Tsitsianok
7dedb1402f
Merge remote-tracking branch 'upstream/master' into ellipse 2020-06-29 23:31:25 +03:00
Stanislau Tsitsianok
5830a641cc
Added more tests 2020-06-29 23:31:04 +03:00
Stanislau Tsitsianok
9a9d3a050a
Fixed tests 2020-06-29 22:49:11 +03:00
Andrew Murray
b042483baa Replaced assert_image_similar with assert_image_similar_tofile 2020-06-23 19:17:41 +10:00
Andrew Murray
c1fe0b4e0c Use hypot function 2020-06-23 19:17:00 +10:00
Stanislau Tsitsianok
27109c9011
Merge remote-tracking branch 'upstream/master' into ellipse 2020-06-16 20:20:44 +03:00
Andrew Murray
eeb9e719e3 Fixed drawing a 1px high polygon 2020-06-07 12:07:13 +10:00
Andrew Murray
a5ef2b4499 Parametrized test 2020-06-04 07:56:14 +10:00
Stanislau Tsitsianok
305b61ed1c
Added test with various ellipse sizes 2020-05-08 23:54:17 +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
5923f95f31 Adjusted symmetry test 2020-04-10 12:15:01 +10:00