MCPcopy Create free account
hub / github.com/SimHacker/micropolis / DeleteBitmap

Function DeleteBitmap

micropolis-activity/src/tk/tkcvbmap.c:309–331  ·  view source on GitHub ↗
(itemPtr)

Source from the content-addressed store, hash-verified

307 * Side effects:
308 * Resources associated with itemPtr are released.
309 *
310 *--------------------------------------------------------------
311 */
312
313static void
314DeleteBitmap(itemPtr)
315 Tk_Item *itemPtr; /* Item that is being deleted. */
316{
317 register BitmapItem *bmapPtr = (BitmapItem *) itemPtr;
318
319 if (bmapPtr->bitmap != None) {
320#if defined(USE_XPM3)
321 Tk_FreePixmap(bmapPtr->bitmap);
322#else
323 Tk_FreeBitmap(bmapPtr->bitmap);
324#endif
325 }
326 if (bmapPtr->fgColor != NULL) {
327 Tk_FreeColor(bmapPtr->fgColor);
328 }
329 if (bmapPtr->bgColor != NULL) {
330 Tk_FreeColor(bmapPtr->bgColor);
331 }
332 if (bmapPtr->gc != NULL) {
333 Tk_FreeGC(bmapPtr->gc);
334 }

Callers 1

CreateBitmapFunction · 0.85

Calls 4

Tk_FreePixmapFunction · 0.85
Tk_FreeBitmapFunction · 0.85
Tk_FreeColorFunction · 0.85
Tk_FreeGCFunction · 0.85

Tested by

no test coverage detected