Lines Matching defs:bmapPtr

73 			    BitmapItem *bmapPtr));
149 BitmapItem *bmapPtr = (BitmapItem *) itemPtr;
163 bmapPtr->anchor = TK_ANCHOR_CENTER;
164 bmapPtr->bitmap = None;
165 bmapPtr->fgColor = NULL;
166 bmapPtr->bgColor = NULL;
167 bmapPtr->gc = None;
173 if ((Tk_CanvasGetCoord(interp, canvas, argv[0], &bmapPtr->x) != TCL_OK)
174 || (Tk_CanvasGetCoord(interp, canvas, argv[1], &bmapPtr->y)
216 BitmapItem *bmapPtr = (BitmapItem *) itemPtr;
220 Tcl_PrintDouble(interp, bmapPtr->x, x);
221 Tcl_PrintDouble(interp, bmapPtr->y, y);
224 if ((Tk_CanvasGetCoord(interp, canvas, argv[0], &bmapPtr->x) != TCL_OK)
225 || (Tk_CanvasGetCoord(interp, canvas, argv[1], &bmapPtr->y)
229 ComputeBitmapBbox(canvas, bmapPtr);
266 BitmapItem *bmapPtr = (BitmapItem *) itemPtr;
274 (char *) bmapPtr, flags) != TCL_OK) {
283 gcValues.foreground = bmapPtr->fgColor->pixel;
285 if (bmapPtr->bgColor != NULL) {
286 gcValues.background = bmapPtr->bgColor->pixel;
289 gcValues.clip_mask = bmapPtr->bitmap;
293 if (bmapPtr->gc != None) {
294 Tk_FreeGC(Tk_Display(tkwin), bmapPtr->gc);
296 bmapPtr->gc = newGC;
298 ComputeBitmapBbox(canvas, bmapPtr);
328 BitmapItem *bmapPtr = (BitmapItem *) itemPtr;
330 if (bmapPtr->bitmap != None) {
331 Tk_FreeBitmap(display, bmapPtr->bitmap);
333 if (bmapPtr->fgColor != NULL) {
334 Tk_FreeColor(bmapPtr->fgColor);
336 if (bmapPtr->bgColor != NULL) {
337 Tk_FreeColor(bmapPtr->bgColor);
339 if (bmapPtr->gc != NULL) {
340 Tk_FreeGC(display, bmapPtr->gc);
367 ComputeBitmapBbox(canvas, bmapPtr)
369 BitmapItem *bmapPtr; /* Item whose bbox is to be
375 x = bmapPtr->x + ((bmapPtr->x >= 0) ? 0.5 : - 0.5);
376 y = bmapPtr->y + ((bmapPtr->y >= 0) ? 0.5 : - 0.5);
378 if (bmapPtr->bitmap == None) {
379 bmapPtr->header.x1 = bmapPtr->header.x2 = x;
380 bmapPtr->header.y1 = bmapPtr->header.y2 = y;
388 Tk_SizeOfBitmap(Tk_Display(Tk_CanvasTkwin(canvas)), bmapPtr->bitmap,
390 switch (bmapPtr->anchor) {
427 bmapPtr->header.x1 = x;
428 bmapPtr->header.y1 = y;
429 bmapPtr->header.x2 = x + width;
430 bmapPtr->header.y2 = y + height;
462 BitmapItem *bmapPtr = (BitmapItem *) itemPtr;
472 if (bmapPtr->bitmap != None) {
473 if (x > bmapPtr->header.x1) {
474 bmapX = x - bmapPtr->header.x1;
475 bmapWidth = bmapPtr->header.x2 - x;
478 if ((x+width) < bmapPtr->header.x2) {
479 bmapWidth = x + width - bmapPtr->header.x1;
481 bmapWidth = bmapPtr->header.x2 - bmapPtr->header.x1;
484 if (y > bmapPtr->header.y1) {
485 bmapY = y - bmapPtr->header.y1;
486 bmapHeight = bmapPtr->header.y2 - y;
489 if ((y+height) < bmapPtr->header.y2) {
490 bmapHeight = y + height - bmapPtr->header.y1;
492 bmapHeight = bmapPtr->header.y2 - bmapPtr->header.y1;
496 (double) (bmapPtr->header.x1 + bmapX),
497 (double) (bmapPtr->header.y1 + bmapY),
506 XSetClipOrigin(display, bmapPtr->gc, drawableX - bmapX,
508 XCopyPlane(display, bmapPtr->bitmap, drawable,
509 bmapPtr->gc, bmapX, bmapY, (unsigned int) bmapWidth,
542 BitmapItem *bmapPtr = (BitmapItem *) itemPtr;
545 x1 = bmapPtr->header.x1;
546 y1 = bmapPtr->header.y1;
547 x2 = bmapPtr->header.x2;
548 y2 = bmapPtr->header.y2;
603 BitmapItem *bmapPtr = (BitmapItem *) itemPtr;
605 if ((rectPtr[2] <= bmapPtr->header.x1)
606 || (rectPtr[0] >= bmapPtr->header.x2)
607 || (rectPtr[3] <= bmapPtr->header.y1)
608 || (rectPtr[1] >= bmapPtr->header.y2)) {
611 if ((rectPtr[0] <= bmapPtr->header.x1)
612 && (rectPtr[1] <= bmapPtr->header.y1)
613 && (rectPtr[2] >= bmapPtr->header.x2)
614 && (rectPtr[3] >= bmapPtr->header.y2)) {
650 BitmapItem *bmapPtr = (BitmapItem *) itemPtr;
652 bmapPtr->x = originX + scaleX*(bmapPtr->x - originX);
653 bmapPtr->y = originY + scaleY*(bmapPtr->y - originY);
654 ComputeBitmapBbox(canvas, bmapPtr);
683 BitmapItem *bmapPtr = (BitmapItem *) itemPtr;
685 bmapPtr->x += deltaX;
686 bmapPtr->y += deltaY;
687 ComputeBitmapBbox(canvas, bmapPtr);
723 BitmapItem *bmapPtr = (BitmapItem *) itemPtr;
729 if (bmapPtr->bitmap == None) {
738 x = bmapPtr->x;
739 y = Tk_CanvasPsY(canvas, bmapPtr->y);
740 Tk_SizeOfBitmap(Tk_Display(Tk_CanvasTkwin(canvas)), bmapPtr->bitmap,
742 switch (bmapPtr->anchor) {
758 if (bmapPtr->bgColor != NULL) {
763 if (Tk_CanvasPsColor(interp, canvas, bmapPtr->bgColor) != TCL_OK) {
776 if (bmapPtr->fgColor != NULL) {
777 if (Tk_CanvasPsColor(interp, canvas, bmapPtr->fgColor) != TCL_OK) {
801 if (Tk_CanvasPsBitmap(interp, canvas, bmapPtr->bitmap,