mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-29 18:23:24 +03:00
Tabs to spaces, no other changes
This commit is contained in:
parent
b33f1a4477
commit
e25df9d65f
|
@ -16,7 +16,7 @@
|
||||||
* following lines to your Tcl_AppInit function (in tkappinit.c)
|
* following lines to your Tcl_AppInit function (in tkappinit.c)
|
||||||
* instead. Put them after the calls to Tcl_Init and Tk_Init:
|
* instead. Put them after the calls to Tcl_Init and Tk_Init:
|
||||||
*
|
*
|
||||||
* {
|
* {
|
||||||
* extern void TkImaging_Init(Tcl_Interp* interp);
|
* extern void TkImaging_Init(Tcl_Interp* interp);
|
||||||
* TkImaging_Init(interp);
|
* TkImaging_Init(interp);
|
||||||
* }
|
* }
|
||||||
|
@ -69,7 +69,7 @@ ImagingFind(const char* name)
|
||||||
id = atol(name);
|
id = atol(name);
|
||||||
#endif
|
#endif
|
||||||
if (!id)
|
if (!id)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return (Imaging) id;
|
return (Imaging) id;
|
||||||
}
|
}
|
||||||
|
@ -112,32 +112,32 @@ PyImagingPhotoPut(ClientData clientdata, Tcl_Interp* interp,
|
||||||
/* Active region */
|
/* Active region */
|
||||||
#if 0
|
#if 0
|
||||||
if (src_xoffset + xsize > im->xsize)
|
if (src_xoffset + xsize > im->xsize)
|
||||||
xsize = im->xsize - src_xoffset;
|
xsize = im->xsize - src_xoffset;
|
||||||
if (src_yoffset + ysize > im->ysize)
|
if (src_yoffset + ysize > im->ysize)
|
||||||
ysize = im->ysize - src_yoffset;
|
ysize = im->ysize - src_yoffset;
|
||||||
if (xsize < 0 || ysize < 0
|
if (xsize < 0 || ysize < 0
|
||||||
|| src_xoffset >= im->xsize
|
|| src_xoffset >= im->xsize
|
||||||
|| src_yoffset >= im->ysize)
|
|| src_yoffset >= im->ysize)
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Mode */
|
/* Mode */
|
||||||
|
|
||||||
if (strcmp(im->mode, "1") == 0 || strcmp(im->mode, "L") == 0) {
|
if (strcmp(im->mode, "1") == 0 || strcmp(im->mode, "L") == 0) {
|
||||||
block.pixelSize = 1;
|
block.pixelSize = 1;
|
||||||
block.offset[0] = block.offset[1] = block.offset[2] = 0;
|
block.offset[0] = block.offset[1] = block.offset[2] = 0;
|
||||||
} else if (strncmp(im->mode, "RGB", 3) == 0) {
|
} else if (strncmp(im->mode, "RGB", 3) == 0) {
|
||||||
block.pixelSize = 4;
|
block.pixelSize = 4;
|
||||||
block.offset[0] = 0;
|
block.offset[0] = 0;
|
||||||
block.offset[1] = 1;
|
block.offset[1] = 1;
|
||||||
block.offset[2] = 2;
|
block.offset[2] = 2;
|
||||||
if (strcmp(im->mode, "RGBA") == 0)
|
if (strcmp(im->mode, "RGBA") == 0)
|
||||||
block.offset[3] = 3; /* alpha (or reserved, under 8.2) */
|
block.offset[3] = 3; /* alpha (or reserved, under 8.2) */
|
||||||
else
|
else
|
||||||
block.offset[3] = 0; /* no alpha */
|
block.offset[3] = 0; /* no alpha */
|
||||||
} else {
|
} else {
|
||||||
TCL_APPEND_RESULT(interp, "Bad mode", (char*) NULL);
|
TCL_APPEND_RESULT(interp, "Bad mode", (char*) NULL);
|
||||||
return TCL_ERROR;
|
return TCL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
block.width = im->xsize;
|
block.width = im->xsize;
|
||||||
|
@ -146,8 +146,8 @@ PyImagingPhotoPut(ClientData clientdata, Tcl_Interp* interp,
|
||||||
block.pixelPtr = (unsigned char*) im->block;
|
block.pixelPtr = (unsigned char*) im->block;
|
||||||
#if 0
|
#if 0
|
||||||
block.pixelPtr = (unsigned char*) im->block +
|
block.pixelPtr = (unsigned char*) im->block +
|
||||||
src_yoffset * im->linesize +
|
src_yoffset * im->linesize +
|
||||||
src_xoffset * im->pixelsize;
|
src_xoffset * im->pixelsize;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (TK_LT_85) { /* Tk 8.4 */
|
if (TK_LT_85) { /* Tk 8.4 */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user