Exemple #1
0
BOOL CDIB::Create( int width, int height, int bits ) {
	/*
		Free existing image
	*/
	DestroyDIB();
	BITMAPINFOHEADER bmInfo;
	memset( &bmInfo, 0, sizeof( BITMAPINFOHEADER ) );
	bmInfo.biSize = sizeof( BITMAPINFOHEADER );
	bmInfo.biWidth = width;
	bmInfo.biHeight = height;
	bmInfo.biPlanes = 1;
	bmInfo.biBitCount = bits;
	bmInfo.biCompression = BI_RGB;
	return Create( bmInfo );
}
Exemple #2
0
void InvalidateMapImage()
{
	MySetRect(&mapImageRect,0,0,0,0);
#ifdef MAC
	if (model -> mapImage)		// test line/body STH
	{
		KillGWorld (model -> mapImage);
		model -> mapImage = nil;
	}
#else
	if (model -> mapImage)		// test line/body STH
	{
		DestroyDIB(model -> mapImage);
		model -> mapImage = nil;
	}
#endif
}
Exemple #3
0
zBOOL
ZDib2::Create( int lWidth, int lHeight, int uBits )
{
   // Free existing image.
   DestroyDIB( );
// ASSERT( lBits == 24 || lBits == 8 );

   BITMAPINFOHEADER bmInfo;

   zmemset( &bmInfo, 0, sizeof( BITMAPINFOHEADER ) );
   bmInfo.biSize = sizeof( BITMAPINFOHEADER );
   bmInfo.biWidth = lWidth;
   bmInfo.biHeight = lHeight;
   bmInfo.biPlanes = 1;
   bmInfo.biBitCount = uBits;
   bmInfo.biCompression = BI_RGB;
   return( Create( bmInfo ) );
}
Exemple #4
0
CDIB::~CDIB()
{
	DestroyDIB();
}
Exemple #5
0
ZDib2::~ZDib2( )
{
   DestroyDIB( );
}