⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bitmapmethods.h

📁 一款大砖块的游戏
💻 H
字号:
/*
* ============================================================================
*  Name     : NBitmapMethods from BitmapMethods.cpp
*  Part of  : Mopoid
*  Created  : 16.01.2004 by Andreas Jakl / Mopius - http://www.mopius.com/
*             Based on source file originally provided by Nokia
*  Version  : 1.02
*  Copyright: 
*     'Mopoid' is free software; you can redistribute
*     it and/or modify it under the terms of the GNU General Public License
*     as published by the Free Software Foundation; either version 2 of
*     the License, or (at your option) any later version.
* 
*     'Mopoid' is distributed in the hope that it
*     will be useful, but WITHOUT ANY WARRANTY; without even the implied
*     warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*     See the GNU General Public License for more details.
* 
*     You should have received a copy of the GNU General Public License
*     along with 'Mopoid'; if not, write to the Free Software
*     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
* ============================================================================
*/

/* Copyright (c) 2001, Nokia. All rights reserved */

#ifndef __BITMAPMETHODS__
#define __BITMAPMETHODS__

#define KColourDepth EColor64K

//Ensure these libraries are linked against:
//LIBRARY           bitgdi.lib


#include <e32base.h>
#include <gdi.h>

class CFbsBitGc;
class CFbsBitmapDevice;
class CWsBitmap;
class CFbsBitmap;


/*! 
  @namespace NBitmapMethods
  
  @discussion A set of functions to make bitmap manipulation easier
  */
namespace NBitmapMethods
{
/*!
  @function CreateGraphicsContextLC
  
  @discussion Create a graphics context and leave it on the cleanup stack
  @param aBitmapDevice a reference to a bitmap device
  */
	CFbsBitGc* CreateGraphicsContextLC(CFbsBitmapDevice& aBitmapDevice);

/*!
  @function CreateGraphicsContextL
  
  @discussion Create a graphics context
  @param aBitmapDevice a reference to a bitmap device
  */
	CFbsBitGc* CreateGraphicsContextL(CFbsBitmapDevice& aBitmapDevice);

/*!
  @function CreateBitmapDeviceLC
  
  @discussion Create a bitmap device and leave it on the cleanup stack
  @param aBitmap a reference to a bitmap
  */
	CFbsBitmapDevice* CreateBitmapDeviceLC(CFbsBitmap& aBitmap);

/*!
  @function CreateBitmapDeviceL
  
  @discussion Create a bitmap device
  @param aBitmap a reference to a bitmap
  */
	CFbsBitmapDevice* CreateBitmapDeviceL(CFbsBitmap& aBitmap);

/*!
  @function CreateBitmapLC
  
  @discussion Create a bitmap and leave it on the cleanup stack
  @param aSizeInPixels the size of the bitmap to be created
  @param aDispMode the display mode of the bitmap
  */
	CFbsBitmap* CreateBitmapLC(TSize aSizeInPixels,TDisplayMode aDispMode);

/*!
  @function CreateBitmapL
  
  @discussion Create a bitmap
  @param aSizeInPixels the size of the bitmap to be created
  @param aDispMode the display mode of the bitmap
  */
	CFbsBitmap* CreateBitmapL(TSize aSizeInPixels,TDisplayMode aDispMode);

/*!
  @function CreateBitmapLC
  
  @discussion Create a bitmap from an mbm file bitmap and leave it on the cleanup stack
  @param aFileName the name of an mbm file
  @param aId the position of the bitmap in the mbm file
  */
	CFbsBitmap* CreateBitmapLC(const TDesC& aFileName,TInt aId);

/*!
  @function CreateBitmapLC
  
  @discussion Create a bitmap from an mbm file bitmap
  @param aFileName the name of an mbm file
  @param aId the position of the bitmap in the mbm file
  */
	CFbsBitmap* CreateBitmapL(const TDesC& aFileName,TInt aId);

	CFbsBitmap* CreateMaskL(CFbsBitmap* aBmpSource, TBool aUseMaskColor, TUint16 aMaskColor);

	void SplitImageL(CFbsBitmap* aSourceBmp, CFbsBitmap** aTargetBmps, TInt aNumPics, TDisplayMode aDisplayMode, TBool aReverseOrder);

/*!
  @function BitBltMaskedEntireBitmap
  
  @discussion Blit the entire of a bitmap with a mask onto a gc
  @param aTargetGc gc to blit onto
  @param aTopLeft the position at which the top left of the bitmap will be placed on the gc
  @param aBitmap the bitmap to blit
  @param aBitMask the mask
  */
	void BitBltMaskedEntireBitmap(CFbsBitGc& aTargetGc,TPoint aTopLeft,const CFbsBitmap& aBitmap,
								const CFbsBitmap& aBitMask);
/*!
  @function PartialReset
  
  @discussion Reset a gc so that it is in a sensible state.
  Not all settings are reset, just some of the more useful ones
  @param aGc the gc to reset
  */
	void PartialReset(CFbsBitGc& aGc);
}

#endif //__BITMAPMETHODS__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -