Beispiel #1
0
MatrixIcons::~MatrixIcons()
{
	del_bitmap(&overlay);
	del_bitmap(&tmp);

	if (itemproperty)
		delete itemproperty;
}
Beispiel #2
0
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...
	}
}
Beispiel #3
0
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;
}
Beispiel #4
0
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...
	}
}
Beispiel #5
0
Button::~Button()
{
	del_bitmap(&bmp_default);
	del_bitmap(&bmp_focus);
	del_bitmap(&bmp_selected);
}
Beispiel #6
0
ScrollBar::~ScrollBar()
{
	del_bitmap(&button);
}
Beispiel #7
0
SwitchButton::~SwitchButton()
{
	del_bitmap(&bmp_on);
	del_bitmap(&bmp_off);
}
Beispiel #8
0
AreaTablet::~AreaTablet()
{
	//if (backgr)
	//	destroy_bitmap(backgr);
	del_bitmap(&drawarea);
}
Beispiel #9
0
Area::~Area()
{
	if (markfordeletion)
		del_bitmap(&backgr);
}