Commit Graph

146 Commits

Author SHA1 Message Date
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
Stanislau Tsitsianok
a491ed6889 fixed failing tests 2020-04-06 22:01:42 +10:00
Andrew Murray
17c10b0ca0 Fixed stroke on FreeType < 2.9 2020-02-24 22:49:33 +11:00
Jon Dufresne
4f185329f4 Streamline test skipping based on supported features
This adds a new test decorator: skip_unless_feature(). The argument is
the same as passed to features.check(). If the feature is not supported,
the test will be skipped.

This removes several kinds of boilerplate copied and pasted around tests
so test feature checking is handled and displayed more consistently.

Refs #4193
2020-02-18 13:07:01 -08:00
Andrew Murray
8e81e0dd0e Restored test 2020-02-16 13:44:34 +11:00
Hugo
9087599e60 Merge remote-tracking branch 'upstream/master' into pytest 2020-02-15 16:56:21 +02:00
Hugo van Kemenade
0e993c4740
Merge pull request #4334 from radarhere/outline_width
Allow explicit zero width to hide outline
2020-02-15 14:30:12 +02:00
Andrew Murray
919abe2555 Updated test 2020-02-15 21:17:26 +11:00
Hugo van Kemenade
c57e4b3a85
Merge pull request #4333 from radarhere/polygon
Only draw each polygon pixel once
2020-02-15 11:57:14 +02:00
Hugo
affade7595 Replace unittest with pytest 2020-02-13 12:15:05 +02:00
Hugo
a4bf9fa036 Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00