void CTangImageManager::Draw(CBitmapContext& aGc)
	{
	if (iBackground)
		iBackground->Draw(aGc);
	//EImageNumber
	
	for(TInt i=0; i<iLayer.Count(); i++)
		{
		TInt index = iLayer[i];
		if (iElements && index<7 && iElements[index])
			//iElements[index]->Draw(aGc);
			iElements[index]->Draw(aGc,iScrollX,iScrollY);
		}
		
	
	CImageElement* element = iElements[iSelectedIndex];
	TInt x = element->GetPositionX();
	TInt y = element->GetPositionY();
	x += iScrollX;
	y += iScrollY;
	if (iSelectedState == ESelectedStateChoose)
		{
		x -= (iBitmapFocus[EBitmapFocus]->SizeInPixels().iWidth >> 1);
		y -= (iBitmapFocus[EBitmapFocus]->SizeInPixels().iHeight >> 1);
		TRect rect( TPoint( 0,0 ),iBitmapFocus[EBitmapFocus]->SizeInPixels() );
		aGc.BitBltMasked(TPoint(x,y),iBitmapFocus[EBitmapFocus],
				rect,iBitmapFocus[EBitmapFocusMask],ETrue);
		}
void CImageElement::Draw(CBitmapContext& aGc, TInt aScrollX, TInt aScrollY)
	{
	if (iBitmapRotate && iBitmapMask)
		{
		TInt x,y;
		x = iCenterX + iOffsetX + aScrollX;
		y = iCenterY + iOffsetY + aScrollY;
		TRect rect( TPoint( 0,0 ),iBitmapRotate->SizeInPixels() );
		aGc.BitBltMasked(TPoint(x,y),iBitmapRotate,
				rect,iBitmapMask,ETrue);
		}
	}
void CBitmapAnimator::Render(CBitmapContext& aBitmapContext, TInt aFrame) const
	{
	aBitmapContext.Reset();

	const CAnimationFrame& nextFrame = *iFrameArray[aFrame];
	const TBool useMask = nextFrame.FrameInfo().iFlags&TFrameInfo::ETransparencyPossible || nextFrame.FrameInfo().iFlags&TFrameInfo::EAlphaChannel;
	
	if (useMask)
		{
		aBitmapContext.BitBltMasked(nextFrame.FrameInfo().iFrameCoordsInPixels.iTl, nextFrame.Bitmap(), nextFrame.FrameInfo().iOverallSizeInPixels, nextFrame.Mask(), EFalse);
		}
	else
		{
		aBitmapContext.BitBlt(nextFrame.FrameInfo().iFrameCoordsInPixels.iTl, nextFrame.Bitmap(), nextFrame.FrameInfo().iOverallSizeInPixels);
		}
	}