graphicstest/graphicstestharness/src/thashreferenceimages.cpp
branchRCL_3
changeset 7 5e51caaeeb72
parent 0 5d03bc08d59c
equal deleted inserted replaced
6:de3d5b6102ac 7:5e51caaeeb72
   134 	TBool stringFound = iStep->GetStringFromConfig(iStep->ConfigSection(), aHashIndex, hashFromConfig);
   134 	TBool stringFound = iStep->GetStringFromConfig(iStep->ConfigSection(), aHashIndex, hashFromConfig);
   135 	if (stringFound)
   135 	if (stringFound)
   136 		{
   136 		{
   137 		//cannot use the macro //TEST((hashFromConfig.Compare(hexString)) == 0); since iStep needs to be 
   137 		//cannot use the macro //TEST((hashFromConfig.Compare(hexString)) == 0); since iStep needs to be 
   138 		//referenced
   138 		//referenced
   139 		iStep->testBooleanTrue((hashFromConfig.Compare(hexString)) == 0, (TText8*)__FILE__, __LINE__);
   139 		iStep->testBooleanTrue((hashFromConfig.Compare(hexString)) == 0, (TText8*)__FILE__, __LINE__, ETrue);
   140 		}
   140 		}
   141 	else
   141 	else
   142 		{
   142 		{
   143 #ifdef APPEND_NEW_OR_MISSING_HASH_DATA
   143 #ifdef APPEND_NEW_OR_MISSING_HASH_DATA
   144 		//Hash data will be written to ini file if hash id is not found.
   144 		//Hash data will be written to ini file if hash id is not found.
   202 	TRect rect = TRect(iBitmapDevice->SizeInPixels());
   202 	TRect rect = TRect(iBitmapDevice->SizeInPixels());
   203 	CFbsBitmapDevice *device=CFbsBitmapDevice::NewL(bitmap);
   203 	CFbsBitmapDevice *device=CFbsBitmapDevice::NewL(bitmap);
   204 	CleanupStack::PushL(device);
   204 	CleanupStack::PushL(device);
   205 	CFbsBitGc *gc;
   205 	CFbsBitGc *gc;
   206 	User::LeaveIfError(device->CreateContext(gc));
   206 	User::LeaveIfError(device->CreateContext(gc));
       
   207 	gc->SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
   207 	gc->BitBlt(TPoint(), iBitmap, rect);
   208 	gc->BitBlt(TPoint(), iBitmap, rect);
   208 	TFileName mbmFile;
   209 	TFileName mbmFile;
   209 	mbmFile.Format(iPath->Des(), &aHashIndex);
   210 	mbmFile.Format(iPath->Des(), &aHashIndex);
   210 	bitmap->Save(mbmFile);
   211 	bitmap->Save(mbmFile);
   211 	delete gc;
   212 	delete gc;