Hi,
I have a bmp image and I want to rotate it.
I try to do by the following code but the image is unchanged. I don't understand why it doesn't work.
Thank you very much for your help.
Thank you.Code:// .CPP FILE #include "MyApp.h" #include <BitmapTransforms.h> //Rotation #include <MyApp.mbg> // Contains icon enumeration #include <MyApp.rsg> // R_ICON_FILE_NAME // ================= MEMBER FUNCTIONS ======================= CMyApp* CMyApp::NewLC(MConverterController* aController) { CMyApp* self = new( ELeave )CMyApp(aController); CleanupStack::PushL( self ); self->ConstructL(); return self; } CMyApp* CMyApp::NewL(MConverterController* aController) { CMyApp* self = CMyApp::NewLC(aController); CleanupStack::Pop( self ); return self; } CMyApp::CMyApp(MConverterController* aController) : iController( aController ), CActive( EPriorityNormal ) { } void CMyApp::ConstructL() { iBitmapRotator = CBitmapRotator::NewL(); CActiveScheduler::Add( this ); } CMyApp::~CMyApp() { delete iBitmapRotator; } void CMyApp::DrawClock(CFbsBitmap * aBmp) { iBitmapRotator->Rotate(&iStatus, *aBmp, CBitmapRotator::EMirrorVerticalAxis); SetActive(); } void CMyApp::RunL() { iController->NotifyCompletion( KErrNone ); } void CMyApp::DoCancel() { } //---------------- // .H FILE class MConverterController { public: virtual void NotifyCompletion( TInt aErr ) = 0; }; class CBitmapRotator; class CMyApp: public CActive { public: // // Constructors and destructor static CMyApp* NewLC(MConverterController* aController); static CMyApp* NewL(MConverterController* aController); /** Symbian default constructor. */ void ConstructL(); /** Destructor. */ ~CMyApp(); CMyApp(MConverterController* aController); public: // New functions void DrawClock(CFbsBitmap * aBmp); public: // CActive virtual void RunL(); virtual void DoCancel(); private: //Data CBitmapRotator* iBitmapRotator; MConverterController* iController; // ui controller //----------- //And I use this class, like this : //CFbsBitmap * iBmp; iBmp = CEikonEnv::Static()->CreateBitmapL( * iconFileName, EMbmMyAppAiguille ); //CMyApp * iDraw; iDraw = CMyApp::NewL(this); iDraw->DrawClock(iBmp);
Bernie

Reply With Quote

