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

📄 cfont.h

📁 基于SYMBIAN OS,series 60平台的经典游戏,超级马力
💻 H
字号:
///////////////////////////////////////////////////////////////////////////////
//
// CFont.h
//
// Copyright (c) 2003 Forum Nokia.  All rights reserved.
//
// 	 Technology developed by Rocket Science Oy Ltd
//
///////////////////////////////////////////////////////////////////////////////

#ifndef __CFONT_H__
#define __CFONT_H__

// INCLUDE FILES
#include <e32base.h>
#include "CBitmap.h"

// FORWARD DECLARATIONS
class CBitmap;
class MSystem;

// CLASS DECLARATION

/**
* CFont class handles creation and drawing of bitmap fonts
*/
class CBmFont
	{
	public:

		/**
		* Two-phased constructor.
		*/
		static CBmFont* NewL(CBitmap* aBitmap, MSystem* aSystem );
	
		/**
		* Destructor.
		*/	
		~CBmFont();

	private:

		/**
		* Default constructor
		*/
		CBmFont( CBitmap* aBitmap, MSystem* aSystem );

		/**
		* Second phase constructor
		*/
		void ConstructL( CBitmap* aBitmap );

	public: // New functions
		
		/**
		* Draws string to the given destination and coordinates.
		* @param aTarget Target bitmap.
		* @param aString Text to draw.
		* @param aPosition Text is drawn to this position.
		*/
		void DrawText(  CBitmap& aTarget,  const TDesC8& aString,
				   const TPoint& aPosition );

		/**
		* Draws number to the given destination and coordinates.
		* @param aTarget Target bitmap.
		* @param aNumber Number to be converted to string and drawn.
		* @param aPosition Number is drawn to this position.
		*/
		void DrawNumber(  CBitmap& aTarget,  const TInt aNumber,
				   const TPoint& aPosition );
		
	private: // Data members
				
		TRect		iRects[256];	/// font areas in bitmap
		CBitmap*	iBitmap;		/// font bitmap
		MSystem*    iSystem;		/// pointer to system
	};

#endif

// End of file

⌨️ 快捷键说明

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