MatrixIcons::~MatrixIcons() { del_bitmap(&overlay); del_bitmap(&tmp); if (itemproperty) delete itemproperty; }
void Area::changebackgr(BITMAP *newb) { STACKTRACE; if (newb) { if (markfordeletion) del_bitmap(&backgr); // hmm, well, don't do this, leave that to the program that created it !! backgr = newb; markfordeletion = false; // not locally initialized, hence not locally destroyed... } }
BITMAP *clone_bitmap(int bpp, BITMAP *src, double scale, bool vidmem) { BITMAP *dest, *convert; if ( !src ) return 0; int W, H; W = iround( src->w * scale ); H = iround( src->h * scale ); dest = create_bitmap_ex(bpp, W, H); convert = create_bitmap_ex(bpp, src->w, src->h); // use this to convert color depth blit(src, convert, 0, 0, 0, 0, src->w, src->h); if (W != src->w || H != src->h ) stretch_blit(convert, dest, 0, 0, convert->w, convert->h, 0, 0, dest->w, dest->h); else blit(convert, dest, 0, 0, 0, 0, W, H); del_bitmap(&convert); // try to store this in memory, if there's enough room for it // cause the menu-bitmaps are pretty large, and take lotsa time to draw ... if (vidmem) { convert = create_video_bitmap(W, H); if (convert) { blit(dest, convert, 0, 0, 0, 0, W, H); del_bitmap(&dest); dest = convert; } } return dest; }
void Area::changebackgr(char *fname) { STACKTRACE; BITMAP *newb; //newb = getbmp(fname); newb = getbmp_nobutton(fname); if (newb) { if (markfordeletion) del_bitmap(&backgr); backgr = newb; markfordeletion = true; // locally initialized, hence locally destroyed... } }
Button::~Button() { del_bitmap(&bmp_default); del_bitmap(&bmp_focus); del_bitmap(&bmp_selected); }
ScrollBar::~ScrollBar() { del_bitmap(&button); }
SwitchButton::~SwitchButton() { del_bitmap(&bmp_on); del_bitmap(&bmp_off); }
AreaTablet::~AreaTablet() { //if (backgr) // destroy_bitmap(backgr); del_bitmap(&drawarea); }
Area::~Area() { if (markfordeletion) del_bitmap(&backgr); }