mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-15 20:06:28 +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
|
||||
ImagingFillLinearGradient(const char *mode) {
|
||||
ImagingFillLinearGradient(const Mode *mode) {
|
||||
Imaging im;
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -102,12 +105,15 @@ ImagingFillLinearGradient(const char *mode) {
|
|||
}
|
||||
|
||||
Imaging
|
||||
ImagingFillRadialGradient(const char *mode) {
|
||||
ImagingFillRadialGradient(const Mode *mode) {
|
||||
Imaging im;
|
||||
int x, y;
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user