|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef PANORAMAIMPL_H |
|
17 #define PANORAMAIMPL_H |
|
18 |
|
19 class MImagePanoramaPlugin; |
|
20 class MVFTrackerPlugin; |
|
21 |
|
22 /** |
|
23 * Concrete implementation of CPanoramaTransform |
|
24 */ |
|
25 NONSHARABLE_CLASS(CPanoramaTransformImpl) : public CBase |
|
26 { |
|
27 public: |
|
28 static CPanoramaTransformImpl* NewL(); |
|
29 |
|
30 void GetTranslation(TPoint& aDxDy, TSize& aDims) const; |
|
31 void SetTranslationL(const TPoint& aDxDy, const TSize& aDims); |
|
32 void GetDirection(TDirection& aDirection); |
|
33 void GetDirection(TDirection& aDirection, TInt& aMinimumDelta); |
|
34 void SetDirection(TDirection& aDirection); |
|
35 void SetDirection(TDirection& aDirection, TInt aMinDelta); |
|
36 |
|
37 ~CPanoramaTransformImpl(); |
|
38 |
|
39 private: |
|
40 CPanoramaTransformImpl(); |
|
41 void ConstructL(); |
|
42 |
|
43 private: |
|
44 TPoint iDxDy; |
|
45 TSize iDims; |
|
46 TDirection iDirection; |
|
47 TInt iMinDelta; |
|
48 }; |
|
49 |
|
50 /** |
|
51 * Concrete implementation of CImagePanorama |
|
52 */ |
|
53 |
|
54 NONSHARABLE_CLASS(CImagePanoramaImpl) : public CBase |
|
55 { |
|
56 public: |
|
57 static CImagePanoramaImpl* NewL(); |
|
58 |
|
59 void AddFileL(const TDesC& aFilename, CPanoramaTransform& aPanTrans); |
|
60 void AddBufferL(const TDesC8& aData, CPanoramaTransform& aPanTrans); |
|
61 void AddImageL(const CFbsBitmap& aBitmap, CPanoramaTransform& aPanTrans); |
|
62 void AddImageL(const CImageFrame& aImageFrame, CPanoramaTransform& aPanTrans); |
|
63 |
|
64 void CurrentImageSizeL(TSize& aSize); |
|
65 |
|
66 void RenderL(const TDesC& aFilename); |
|
67 void RenderL(const TDesC& aFilename, const TSize& aSize, const TBool aMaintainAspectRatio, const TUid& aImageTypeUid); |
|
68 |
|
69 void RenderL(RFile& aFile); |
|
70 void RenderL(RFile& aFile, const TSize& aSize, const TBool aMaintainAspectRatio, const TUid& aImageTypeUid); |
|
71 |
|
72 void RenderL(HBufC8*& aDestData); |
|
73 void RenderL(HBufC8*& aDestData, TUint32 aMaxBufferSize, const TSize& aSize, const TBool aMaintainAspectRatio, const TUid& aImageTypeUid); |
|
74 |
|
75 void RenderL(const CFbsBitmap& aBitmap); |
|
76 void RenderL(const CFbsBitmap& aBitmap, const TBool aMaintainAspectRatio); |
|
77 |
|
78 void RenderL(const CImageFrame& aImageFrame); |
|
79 void RenderL(const CImageFrame& aImageFrame, const TBool aMaintainAspectRatio); |
|
80 |
|
81 void InitializeL(const TSize & aSize, const TPanoramaLens& aPanoramaLens, const TDirection& aDirection); |
|
82 MImagePanoramaPlugin* GetPanoramaPlugin(); |
|
83 |
|
84 TAny* Extension(TUid aExtension); |
|
85 |
|
86 ~CImagePanoramaImpl(); |
|
87 |
|
88 private: |
|
89 CImagePanoramaImpl(); |
|
90 void ConstructL(); |
|
91 |
|
92 private: |
|
93 MImagePanoramaPlugin* iPlugin; |
|
94 TUid iDestructorKey; |
|
95 }; |
|
96 |
|
97 /** |
|
98 * Concrete implementation of CVTracker |
|
99 */ |
|
100 NONSHARABLE_CLASS(CVFTrackerImpl) : public CBase |
|
101 { |
|
102 public: |
|
103 static CVFTrackerImpl* NewL(); |
|
104 |
|
105 void RegisterImageL(const CFbsBitmap& aBitmap,CPanoramaTransform& aPanTrans); |
|
106 void RegisterImageL(const CImageFrame& aImageFrame, CPanoramaTransform& aPanTrans); |
|
107 void Reset(); |
|
108 |
|
109 TBool IsTimeToCapture(TDirection& aDirection, TInt aOverlap) const; |
|
110 TBool IsTimeToCapture(TDirection& aDirection); |
|
111 |
|
112 void InitializeL(const TSize& aSize); |
|
113 MVFTrackerPlugin* GetVFTrackerPlugin(); |
|
114 |
|
115 TAny* Extension(TUid aExtension); |
|
116 |
|
117 ~CVFTrackerImpl(); |
|
118 |
|
119 private: |
|
120 CVFTrackerImpl(); |
|
121 void ConstructL(); |
|
122 |
|
123 private: |
|
124 MVFTrackerPlugin* iPlugin; |
|
125 TUid iDestructorKey; |
|
126 }; |
|
127 |
|
128 #endif //PANORAMIMPL_H |
|
129 |