mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-29 02:34:10 +03:00
use mode structs in Fill.c
This commit is contained in:
parent
e6d2f9a642
commit
d2e691c788
|
@ -68,11 +68,14 @@ ImagingFill(Imaging im, const void *colour) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Imaging
|
Imaging
|
||||||
ImagingFillLinearGradient(const char *mode) {
|
ImagingFillLinearGradient(const Mode *mode) {
|
||||||
Imaging im;
|
Imaging im;
|
||||||
int y;
|
int y;
|
||||||
|
|
||||||
if (strlen(mode) != 1) {
|
if (mode != IMAGING_MODE_1 && mode != IMAGING_MODE_F &&
|
||||||
|
mode != IMAGING_MODE_I && mode != IMAGING_MODE_L &&
|
||||||
|
mode != IMAGING_MODE_P
|
||||||
|
) {
|
||||||
return (Imaging)ImagingError_ModeError();
|
return (Imaging)ImagingError_ModeError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,12 +105,15 @@ ImagingFillLinearGradient(const char *mode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Imaging
|
Imaging
|
||||||
ImagingFillRadialGradient(const char *mode) {
|
ImagingFillRadialGradient(const Mode *mode) {
|
||||||
Imaging im;
|
Imaging im;
|
||||||
int x, y;
|
int x, y;
|
||||||
int d;
|
int d;
|
||||||
|
|
||||||
if (strlen(mode) != 1) {
|
if (mode != IMAGING_MODE_1 && mode != IMAGING_MODE_F &&
|
||||||
|
mode != IMAGING_MODE_I && mode != IMAGING_MODE_L &&
|
||||||
|
mode != IMAGING_MODE_P
|
||||||
|
) {
|
||||||
return (Imaging)ImagingError_ModeError();
|
return (Imaging)ImagingError_ModeError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user