|
1 // Copyright (c) 2002-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 // This is an internal API for bitmap transform - supporting implementation by plugin |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @publishedPartner |
|
21 @released |
|
22 */ |
|
23 |
|
24 #ifndef BITMTRANSPLUGIN_H |
|
25 #define BITMTRANSPLUGIN_H |
|
26 |
|
27 #include <e32base.h> |
|
28 #include <bitmaptransforms.h> |
|
29 |
|
30 _LIT8(KBitmTransPluginMatchString, "*"); // ECom insists on something |
|
31 |
|
32 /** |
|
33 Plugin API for the BitmapTransforms Library bitmap rotation. |
|
34 The CBitmapRotator implementation loads a plugin based on this interface class. |
|
35 Once this has been constructed, calls to method functions of CBitmapRotator are passed |
|
36 verbatim to this interface. For further description of required functionality, |
|
37 see CBitmapRotator. |
|
38 |
|
39 @see CBitmapRotator |
|
40 */ |
|
41 class MBitmapRotatorPlugin |
|
42 { |
|
43 protected: |
|
44 typedef CBitmapRotator::TRotationAngle TRotationAngle; |
|
45 |
|
46 public: |
|
47 /** |
|
48 This must provide an implementation as defined by CBitmapRotator::~CBitmapRotator() |
|
49 |
|
50 @see CBitmapRotator::~CBitmapRotator() |
|
51 */ |
|
52 virtual ~MBitmapRotatorPlugin() {}; |
|
53 |
|
54 /** |
|
55 This must provide an implementation as defined by |
|
56 CBitmapRotator::Rotate(TRequestStatus* aRequestStatus, CFbsBitmap& aSrcBitmap, CFbsBitmap& aTgtBitmap, TRotationAngle aAngle) |
|
57 |
|
58 @param aRequestStatus |
|
59 A pointer to the completion status of the asynchronous operation. |
|
60 @param aSrcBitmap |
|
61 This bitmap should have been created and be of type EColor16M. |
|
62 @param aTgtBitmap |
|
63 This bitmap should have been created and be of type EColor16M. |
|
64 @param aAngle |
|
65 A member of the enumeration TRotationAngle that specifies the rotation mirror operation. |
|
66 |
|
67 @see CBitmapRotator::Rotate(TRequestStatus* aRequestStatus, CFbsBitmap& aSrcBitmap, CFbsBitmap& aTgtBitmap, TRotationAngle aAngle) |
|
68 */ |
|
69 virtual void Rotate(TRequestStatus* aRequestStatus, CFbsBitmap& aSrcBitmap, CFbsBitmap& aTgtBitmap, TRotationAngle aAngle)=0; |
|
70 |
|
71 /** |
|
72 This must provide an implementation as defined by |
|
73 CBitmapRotator::Rotate(TRequestStatus* aRequestStatus, CFbsBitmap& aBitmap, TRotationAngle aAngle) |
|
74 |
|
75 @param aRequestStatus |
|
76 A pointer to the completion status of the asynchronous operation. |
|
77 @param aBitmap |
|
78 A reference to a CFbsBitmap. This bitmap should have been created |
|
79 and is also an output. |
|
80 @param aAngle |
|
81 A member of the enumeration TRotationAngle that specifies the rotation mirror operation. |
|
82 |
|
83 @see CBitmapRotator::Rotate(TRequestStatus* aRequestStatus, CFbsBitmap& aBitmap, TRotationAngle aAngle) |
|
84 */ |
|
85 virtual void Rotate(TRequestStatus* aRequestStatus, CFbsBitmap& aBitmap, TRotationAngle aAngle)=0; |
|
86 |
|
87 /** |
|
88 This must provide an implementation as defined by CBitmapRotator::CustomCommand(TUid aUid, TAny* aParam) |
|
89 |
|
90 @param aUid |
|
91 @param aParam |
|
92 @return TInt |
|
93 @see CBitmapRotator::CustomCommand(TUid aUid, TAny* aParam) |
|
94 */ |
|
95 virtual TInt CustomCommand(TUid aUid, TAny* aParam)=0; |
|
96 |
|
97 /** |
|
98 This must provide an implementation as defined by CBitmapRotator::Cancel() |
|
99 |
|
100 @see CBitmapRotator::Cancel() |
|
101 */ |
|
102 virtual void Cancel()=0; |
|
103 }; |
|
104 |
|
105 /** |
|
106 @released |
|
107 |
|
108 Plugin API for the BitmapTransforms Library bitmap scaling. |
|
109 The CBitmapScaler implementation loads a plugin based on this interface class. |
|
110 Once this has been constructed, calls to method functions of CBitmapScaler are passed |
|
111 verbatim to this interface. For further description of required functionality, |
|
112 see CBitmapScaler. |
|
113 |
|
114 @see CBitmapScaler |
|
115 */ |
|
116 class MBitmapScalerPlugin |
|
117 { |
|
118 public: |
|
119 |
|
120 /** |
|
121 This must provide an implementation as defined by CBitmapScaler::~CBitmapScaler() |
|
122 |
|
123 @see CBitmapScaler::~CBitmapScaler() |
|
124 */ |
|
125 virtual ~MBitmapScalerPlugin() {}; |
|
126 |
|
127 /** |
|
128 This must provide an implementation as defined by |
|
129 CBitmapScaler::Scale(TRequestStatus* aRequestStatus, CFbsBitmap& aSrcBitmap, CFbsBitmap& aTgtBitmap, TBool aMaintainAspectRatio = ETrue) |
|
130 |
|
131 @param aRequestStatus |
|
132 On return, contains a pointer to the completion status of the rescale of the bitmap. |
|
133 @param aSrcBitmap |
|
134 The bitmap to be re-scaled. |
|
135 @param aTgtBitmap |
|
136 The target location for the re-scaled bitmap. |
|
137 @param aMaintainAspectRatio |
|
138 A boolean indicating if the aspect ratio is maintained. ETrue means the aspect ratio is |
|
139 retained; this is the default. The same scaling factor is applied in both the horizontal |
|
140 and vertical directions. This is the smaller of the horizontal scaling factor and the |
|
141 vertical scaling factor. EFalse means the aspect ratio need not be retained. |
|
142 |
|
143 @see CBitmapScaler::Scale(TRequestStatus* aRequestStatus, CFbsBitmap& aSrcBitmap, CFbsBitmap& aTgtBitmap, TBool aMaintainAspectRatio = ETrue) |
|
144 */ |
|
145 virtual void Scale(TRequestStatus* aRequestStatus, CFbsBitmap& aSrcBitmap, CFbsBitmap& aTgtBitmap, TBool aMaintainAspectRatio = ETrue)=0; |
|
146 |
|
147 /** |
|
148 This must provide an implementation as defined by |
|
149 CBitmapScaler::Scale(TRequestStatus* aRequestStatus, CFbsBitmap& aBitmap, const TSize& aDestinationSize, TBool aMaintainAspectRatio = ETrue) |
|
150 |
|
151 @param aRequestStatus |
|
152 On return, contains a pointer to the completion status of the rescale of the bitmap. |
|
153 @param aBitmap |
|
154 The bitmap to be re-scaled. This reference is also the |
|
155 target location for the re-scaled bitmap. |
|
156 @param aDestinationSize |
|
157 The requested target size for the re-scaled bitmap. |
|
158 @param aMaintainAspectRatio |
|
159 A boolean indicating if the aspect ratio is maintained. ETrue means the aspect ratio is |
|
160 retained; this is the default. The same scaling factor is applied in both the horizontal |
|
161 and vertical directions. This is the smaller of the horizontal scaling factor and the |
|
162 vertical scaling factor. EFalse means the aspect ratio need not be retained. |
|
163 |
|
164 @see CBitmapScaler::Scale(TRequestStatus* aRequestStatus, CFbsBitmap& aBitmap, const TSize& aDestinationSize, TBool aMaintainAspectRatio = ETrue) |
|
165 */ |
|
166 virtual void Scale(TRequestStatus* aRequestStatus, CFbsBitmap& aBitmap, const TSize& aDestinationSize, TBool aMaintainAspectRatio = ETrue)=0; |
|
167 |
|
168 /** |
|
169 This must provide an implementation as defined by CBitmapScaler::Cancel() |
|
170 |
|
171 @see CBitmapScaler::Cancel() |
|
172 */ |
|
173 virtual void Cancel()=0; |
|
174 |
|
175 /** |
|
176 This must provide an implementation as defined by CBitmapScaler::CustomCommand(TUid aUid, TAny* aParam) |
|
177 |
|
178 @param aUid |
|
179 @param aParam |
|
180 @return TInt |
|
181 @see CBitmapScaler::CustomCommand(TUid aUid, TAny* aParam) |
|
182 */ |
|
183 virtual TInt CustomCommand(TUid aUid, TAny* aParam)=0; |
|
184 }; |
|
185 |
|
186 #endif BITMTRANSPLUGIN_H |
|
187 |