• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/tcl-102/tk84/tk/generic/

Lines Matching +defs:image +defs:height

4  *	This file implements image items for canvas widgets.
21 * The structure below defines the record for each image item.
27 Tk_Canvas canvas; /* Canvas containing the image. */
29 * image. */
30 Tk_Anchor anchor; /* Where to anchor image relative to
32 char *imageString; /* String describing -image option (malloc-ed).
33 * NULL means no image right now. */
35 * NULL means no image right now. */
37 * NULL means no image right now. */
38 Tk_Image image; /* Image to display in window, or NULL if
39 * no image at present. */
41 * no image at present. */
43 * no image at present. */
68 {TK_CONFIG_STRING, "-image", (char *) NULL, (char *) NULL,
84 int x, int y, int width, int height, int imgWidth,
107 int x, int y, int width, int height));
115 * The structures below defines the image item type in terms of
120 "image", /* name */
148 * This procedure is invoked to create a new image
158 * A new image item is created.
188 imgPtr->image = NULL;
225 * command on image items. See the user documentation for
293 * of an image item, such as its anchor position.
316 Tk_Image image;
325 * Create the image. Save the old image around and don't free it
327 * count from going to zero so the image doesn't have to be recreated
337 image = Tk_GetImage(interp, tkwin, imgPtr->imageString,
339 if (image == NULL) {
343 image = NULL;
345 if (imgPtr->image != NULL) {
346 Tk_FreeImage(imgPtr->image);
348 imgPtr->image = image;
350 image = Tk_GetImage(interp, tkwin, imgPtr->activeImageString,
352 if (image == NULL) {
356 image = NULL;
361 imgPtr->activeImage = image;
363 image = Tk_GetImage(interp, tkwin, imgPtr->disabledImageString,
365 if (image == NULL) {
369 image = NULL;
374 imgPtr->disabledImage = image;
386 * associated with a image item.
415 if (imgPtr->image != NULL) {
416 Tk_FreeImage(imgPtr->image);
433 * all the pixels that may be drawn as part of a image item.
434 * This procedure is where the child image's placement is
454 int width, height;
456 Tk_Image image;
462 image = imgPtr->image;
465 image = imgPtr->activeImage;
469 image = imgPtr->disabledImage;
476 if ((state == TK_STATE_HIDDEN) || (image == None)) {
483 * Compute location and size of image, using anchor information.
486 Tk_SizeOfImage(image, &width, &height);
496 y -= height/2;
500 y -= height;
504 y -= height;
507 y -= height;
510 y -= height/2;
516 y -= height/2;
527 imgPtr->header.y2 = y + height;
536 * This procedure is invoked to draw a image item in a given
550 DisplayImage(canvas, itemPtr, display, drawable, x, y, width, height)
556 int x, y, width, height; /* Describes region of canvas that
561 Tk_Image image;
568 image = imgPtr->image;
571 image = imgPtr->activeImage;
575 image = imgPtr->disabledImage;
579 if (image == NULL) {
584 * Translate the coordinates to those of the image, then redisplay it.
589 Tk_RedrawImage(image, x - imgPtr->header.x1, y - imgPtr->header.y1,
590 width, height, drawable, drawableX, drawableY);
604 * are coordPtr[0] and coordPtr[1] is inside the image. If the
605 * point isn't inside the image then the return value is the
606 * distance from the point to the image.
704 * image items.
735 int width, height;
736 Tk_Image image;
743 image = imgPtr->image;
746 image = imgPtr->activeImage;
750 image = imgPtr->disabledImage;
753 if (image == NULL) {
755 * Image item without actual image specified.
759 Tk_SizeOfImage(image, &width, &height);
762 * Compute the coordinates of the lower-left corner of the image,
763 * taking into account the anchor position for the image.
770 case TK_ANCHOR_NW: y -= height; break;
771 case TK_ANCHOR_N: x -= width/2.0; y -= height; break;
772 case TK_ANCHOR_NE: x -= width; y -= height; break;
773 case TK_ANCHOR_E: x -= width; y -= height/2.0; break;
777 case TK_ANCHOR_W: y -= height/2.0; break;
778 case TK_ANCHOR_CENTER: x -= width/2.0; y -= height/2.0; break;
786 return Tk_PostscriptImage(image, interp, canvasWin,
787 ((TkCanvas *) canvas)->psInfo, 0, 0, width, height, prepass);
864 * This procedure is invoked by the image code whenever the manager
865 * for an image does something that affects the image's size or
878 ImageChangedProc(clientData, x, y, width, height, imgWidth, imgHeight)
879 ClientData clientData; /* Pointer to canvas item for image. */
880 int x, y; /* Upper left pixel (within image)
882 int width, height; /* Dimensions of area to redisplay
884 int imgWidth, imgHeight; /* New dimensions of image. */
889 * If the image's size changed and it's not anchored at its
891 * image. This is a bit over-conservative, but we need to do
899 height = imgHeight;
906 (int) (imgPtr->header.y1 + y + height));