Changed wide line co-ordinates from int to long

This commit is contained in:
Andrew Murray 2020-06-23 18:12:12 +10:00
parent 2456601e6b
commit d70bb74490
3 changed files with 14 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

View File

@ -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",
[

View File

@ -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];