mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 18:56:17 +03:00
Using local block rather than array literal
This commit is contained in:
parent
a10b91786a
commit
98a4991762
|
@ -625,8 +625,8 @@ ImagingDrawWideLine(Imaging im, int x0, int y0, int x1, int y1,
|
||||||
dxmax = ROUND_DOWN(ratio_max * dy);
|
dxmax = ROUND_DOWN(ratio_max * dy);
|
||||||
dymin = ROUND_DOWN(ratio_min * dx);
|
dymin = ROUND_DOWN(ratio_min * dx);
|
||||||
dymax = ROUND_DOWN(ratio_max * dx);
|
dymax = ROUND_DOWN(ratio_max * dx);
|
||||||
|
{
|
||||||
vertices = (int[][]) {
|
int vertices[4][2] = {
|
||||||
{x0 - dxmin, y0 + dymax},
|
{x0 - dxmin, y0 + dymax},
|
||||||
{x1 - dxmin, y1 + dymax},
|
{x1 - dxmin, y1 + dymax},
|
||||||
{x1 + dxmax, y1 - dymin},
|
{x1 + dxmax, y1 - dymin},
|
||||||
|
@ -639,7 +639,7 @@ ImagingDrawWideLine(Imaging im, int x0, int y0, int x1, int y1,
|
||||||
add_edge(e+3, vertices[3][0], vertices[3][1], vertices[0][0], vertices[0][1]);
|
add_edge(e+3, vertices[3][0], vertices[3][1], vertices[0][0], vertices[0][1]);
|
||||||
|
|
||||||
draw->polygon(im, 4, e, ink, 0);
|
draw->polygon(im, 4, e, ink, 0);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user