Also apply width to pieslice's inner lines

This commit is contained in:
Hugo 2018-09-01 14:40:36 +03:00
parent f70f952f85
commit fbe5bdb6b6
4 changed files with 8 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 488 B

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 B

After

Width:  |  Height:  |  Size: 523 B

View File

@ -207,7 +207,7 @@ Methods
:param end: Ending angle, in degrees.
:param fill: Color to use for the fill.
:param outline: Color to use for the outline.
:param width: The outer line width, in pixels.
:param width: The line width, in pixels.
.. versionadded:: 5.2.0

View File

@ -855,8 +855,13 @@ ellipse(Imaging im, int x0, int y0, int x1, int y1,
if (i != start) {
if (mode == PIESLICE) {
if (x != cx || y != cy) {
draw->line(im, x, y, cx, cy, ink);
draw->line(im, cx, cy, sx, sy, ink);
if (width <= 1) {
draw->line(im, x, y, cx, cy, ink);
draw->line(im, cx, cy, sx, sy, ink);
} else {
ImagingDrawWideLine(im, x, y, cx, cy, &ink, width, op);
ImagingDrawWideLine(im, cx, cy, sx, sy, &ink, width, op);
}
}
} else if (mode == CHORD) {
if (x != sx || y != sy)