mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-22 21:24:46 +03:00
Changed wide line co-ordinates from int to long
This commit is contained in:
parent
2456601e6b
commit
d70bb74490
BIN
Tests/images/imagedraw_wide_line_larger_than_int.png
Normal file
BIN
Tests/images/imagedraw_wide_line_larger_than_int.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 557 B |
|
@ -887,6 +887,19 @@ def test_wide_line_dot():
|
|||
assert_image_similar(im, Image.open(expected), 1)
|
||||
|
||||
|
||||
def test_wide_line_larger_than_int():
|
||||
# Arrange
|
||||
im = Image.new("RGB", (W, H))
|
||||
draw = ImageDraw.Draw(im)
|
||||
expected = "Tests/images/imagedraw_wide_line_larger_than_int.png"
|
||||
|
||||
# Act
|
||||
draw.line([(0, 0), (32768, 32768)], width=3)
|
||||
|
||||
# Assert
|
||||
assert_image_similar(im, Image.open(expected), 1)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"xy",
|
||||
[
|
||||
|
|
|
@ -669,7 +669,7 @@ ImagingDrawWideLine(Imaging im, int x0, int y0, int x1, int y1,
|
|||
{
|
||||
DRAW* draw;
|
||||
INT32 ink;
|
||||
int dx, dy;
|
||||
long dx, dy;
|
||||
double big_hypotenuse, small_hypotenuse, ratio_max, ratio_min;
|
||||
int dxmin, dxmax, dymin, dymax;
|
||||
Edge e[4];
|
||||
|
|
Loading…
Reference in New Issue
Block a user