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

📄 pngloader.h

📁 一款大砖块的游戏
💻 H
字号:
/*
* ============================================================================
*  Name     : CPngLoader from PngLoader.h
*  Part of  : Mopoid
*  Created  : 16.01.2004 by Andreas Jakl / Mopius - http://www.mopius.com/
*  Description:
*     Takes care of loading png/jpg images.
*  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
* ============================================================================
*/

#ifndef __PNGLOADER_H__
#define __PNGLOADER_H__


#include <e32base.h>
#include <eikenv.h>
#include <MdaImageConverter.h>
#include "bitmapmethods.h"
#include <aknutils.h>

/*!
  @class CPngLoader
  
  @discussion Converts pngs to bitmaps
  */
class CPngLoader : public CBase, public MMdaImageUtilObserver
{

public:
    /*!
      @function ~CPngLoader
      
      @discussion Destroy the object and release all memory objects
      */
    virtual ~CPngLoader();

public:	 //from MMdaImageUtilObserver
    /*!
      @function MiuoOpenComplete
      
      @discussion Called when the gif file has been opened
      @param aError an error code or KErrNone if process was successful
      */
    void MiuoOpenComplete(TInt aError);

    /*!
      @function MiuoConvertComplete
      
      @discussion Called when any conversion process performed on the bitmap is complete
      @param aError an error code or KErrNone if process was successful
      */
    void MiuoConvertComplete(TInt aError);

    /*!
      @function MiuoCreateComplete
      
      @discussion Called when the file in which the bitmap is to be saved has been created 
      @param aError an error code or KErrNone if process was successful
     */
    void MiuoCreateComplete(TInt aError);

public:
	static void LoadAndSplitImageL(const TDesC& aFilename, CFbsBitmap** aTargetBmps, TInt aNumPics, TDisplayMode aDisplayMode);
    /*!
      @function LoadImageL

      @discussion Loads a image file and converts it into a CFbsBitmap* object
      @param aFilename filename of the image file
      */
    static CFbsBitmap* LoadImageL(const TDesC &aFilename, const TDisplayMode aDisplayMode);

private:
    /*!
      @function CPngLoader
      
      @discussion Perform the first phase of two phase construction 
      */
    CPngLoader(const TDesC *aFilename);

private:  // Own functions
    void ReadImageL();

private:
    /** Converts the png file to a bitmap */
    CMdaImageFileToBitmapUtility*		iConverter;

    /** The bitmap being displayed */
    CFbsBitmap*							iBitmap;

    TDesC* iFilename;

    TInt iErrorCode;
};

#endif


// End of file.

⌨️ 快捷键说明

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