examples/Graphics/Bitmaps/BitmapsGraphicsControl.h

00001 // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
00002 // All rights reserved.
00003 // This component and the accompanying materials are made available
00004 // under the terms of "Eclipse Public License v1.0"
00005 // which accompanies this distribution, and is available
00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
00007 //
00008 // Initial Contributors:
00009 // Nokia Corporation - initial contribution.
00010 //
00011 // Contributors:
00012 //
00013 // Description:
00014 //
00015 
00016 #ifndef __BitmapsGraphicsControl_H
00017 #define __BitmapsGraphicsControl_H
00018 
00019 #include <coecntrl.h>
00020 #include <s32file.h>
00021 #include "CommonGraphicsControlFramework.h"
00022 class CBitmapControl : public CGraphicExampleControl
00023         {
00024 public:
00025         CBitmapControl() { SetMaxPhases(8); };
00026         ~CBitmapControl() { delete(iBitmap); delete(iMaskBitmap); };
00027         void UpdateModelL();
00028         void Draw(const TRect& aRect) const;
00029 private:
00030         void LoadBitmapL(CFbsBitmap* aBitMap,const TDesC& aPathAndFile,TInt aId,TBool aShareIfLoaded);
00031 private:
00032         CFbsBitmap* iBitmap;
00033         CFbsBitmap* iMaskBitmap;
00034         };
00035 
00036 
00037 class CFbsControl : public CGraphicExampleControl
00038         {
00039 public:
00040         CFbsControl() { SetMaxPhases(10); };
00041         ~CFbsControl();
00042         void UpdateModelL();
00043         void Draw(const TRect& aRect) const;
00044 private:
00045         void DrawL(CWindowGc& aGc);
00046         void DrawSmiley(CGraphicsContext& aGc);
00047         void CreateRotatedBitmapL();
00048         void DrawSingleBitmap(CFbsBitmap* aDrawBitmap,CWindowGc& aGc) const;
00049         void DrawTwoBitmaps(CFbsBitmap* aBitmap1,CFbsBitmap* aBitmap2,CWindowGc& aGc) const;
00050         void LoadBitmapL(CFbsBitmap* aBitMap,const TDesC& aPathAndFile,TInt aId,TBool aShareIfLoaded);
00051         CFbsBitmap* iBitmap1;
00052         CFbsBitmap* iBitmap2;
00053         CFbsBitmap* iBitmap3;
00054         CFbsBitmap* iBitmap4;
00055         };
00056 
00057 #endif

Generated by  doxygen 1.6.2