Lines Matching defs:imgPtr

70 			    ImageItem *imgPtr));
146 ImageItem *imgPtr = (ImageItem *) itemPtr;
160 imgPtr->canvas = canvas;
161 imgPtr->anchor = TK_ANCHOR_CENTER;
162 imgPtr->imageString = NULL;
163 imgPtr->image = NULL;
169 if ((Tk_CanvasGetCoord(interp, canvas, argv[0], &imgPtr->x) != TCL_OK)
170 || (Tk_CanvasGetCoord(interp, canvas, argv[1], &imgPtr->y)
212 ImageItem *imgPtr = (ImageItem *) itemPtr;
216 Tcl_PrintDouble(interp, imgPtr->x, x);
217 Tcl_PrintDouble(interp, imgPtr->y, y);
220 if ((Tk_CanvasGetCoord(interp, canvas, argv[0], &imgPtr->x) != TCL_OK)
222 &imgPtr->y) != TCL_OK)) {
225 ComputeImageBbox(canvas, imgPtr);
262 ImageItem *imgPtr = (ImageItem *) itemPtr;
268 argv, (char *) imgPtr, flags) != TCL_OK) {
279 if (imgPtr->imageString != NULL) {
280 image = Tk_GetImage(interp, tkwin, imgPtr->imageString,
281 ImageChangedProc, (ClientData) imgPtr);
288 if (imgPtr->image != NULL) {
289 Tk_FreeImage(imgPtr->image);
291 imgPtr->image = image;
292 ComputeImageBbox(canvas, imgPtr);
321 ImageItem *imgPtr = (ImageItem *) itemPtr;
323 if (imgPtr->imageString != NULL) {
324 ckfree(imgPtr->imageString);
326 if (imgPtr->image != NULL) {
327 Tk_FreeImage(imgPtr->image);
354 ComputeImageBbox(canvas, imgPtr)
356 ImageItem *imgPtr; /* Item whose bbox is to be
362 x = imgPtr->x + ((imgPtr->x >= 0) ? 0.5 : - 0.5);
363 y = imgPtr->y + ((imgPtr->y >= 0) ? 0.5 : - 0.5);
365 if (imgPtr->image == None) {
366 imgPtr->header.x1 = imgPtr->header.x2 = x;
367 imgPtr->header.y1 = imgPtr->header.y2 = y;
375 Tk_SizeOfImage(imgPtr->image, &width, &height);
376 switch (imgPtr->anchor) {
413 imgPtr->header.x1 = x;
414 imgPtr->header.y1 = y;
415 imgPtr->header.x2 = x + width;
416 imgPtr->header.y2 = y + height;
448 ImageItem *imgPtr = (ImageItem *) itemPtr;
451 if (imgPtr->image == NULL) {
461 Tk_RedrawImage(imgPtr->image, x - imgPtr->header.x1, y - imgPtr->header.y1,
492 ImageItem *imgPtr = (ImageItem *) itemPtr;
495 x1 = imgPtr->header.x1;
496 y1 = imgPtr->header.y1;
497 x2 = imgPtr->header.x2;
498 y2 = imgPtr->header.y2;
552 ImageItem *imgPtr = (ImageItem *) itemPtr;
554 if ((rectPtr[2] <= imgPtr->header.x1)
555 || (rectPtr[0] >= imgPtr->header.x2)
556 || (rectPtr[3] <= imgPtr->header.y1)
557 || (rectPtr[1] >= imgPtr->header.y2)) {
560 if ((rectPtr[0] <= imgPtr->header.x1)
561 && (rectPtr[1] <= imgPtr->header.y1)
562 && (rectPtr[2] >= imgPtr->header.x2)
563 && (rectPtr[3] >= imgPtr->header.y2)) {
597 ImageItem *imgPtr = (ImageItem *) itemPtr;
599 imgPtr->x = originX + scaleX*(imgPtr->x - originX);
600 imgPtr->y = originY + scaleY*(imgPtr->y - originY);
601 ComputeImageBbox(canvas, imgPtr);
630 ImageItem *imgPtr = (ImageItem *) itemPtr;
632 imgPtr->x += deltaX;
633 imgPtr->y += deltaY;
634 ComputeImageBbox(canvas, imgPtr);
665 ImageItem *imgPtr = (ImageItem *) clientData;
674 if (((imgPtr->header.x2 - imgPtr->header.x1) != imgWidth)
675 || ((imgPtr->header.y2 - imgPtr->header.y1) != imgHeight)) {
679 Tk_CanvasEventuallyRedraw(imgPtr->canvas, imgPtr->header.x1,
680 imgPtr->header.y1, imgPtr->header.x2, imgPtr->header.y2);
682 ComputeImageBbox(imgPtr->canvas, imgPtr);
683 Tk_CanvasEventuallyRedraw(imgPtr->canvas, imgPtr->header.x1 + x,
684 imgPtr->header.y1 + y, (int) (imgPtr->header.x1 + x + width),
685 (int) (imgPtr->header.y1 + y + height));