|
1 /* |
|
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Image Transforms subsystem. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 #ifndef CVTIMAGEBITMAP_H |
|
23 #define CVTIMAGEBITMAP_H |
|
24 |
|
25 // INCLUDE FILES |
|
26 |
|
27 #include "cvtimage.h" |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 |
|
31 class CFbsBitmap; |
|
32 |
|
33 // CLASS DECLARATIONS |
|
34 |
|
35 /** |
|
36 * CFbsBitmap image implementation. |
|
37 * |
|
38 * @lib videosource.lib |
|
39 */ |
|
40 class CVtImageBitmap : public CVtImage |
|
41 { |
|
42 public: |
|
43 |
|
44 /** |
|
45 * Creates new instance of CVtImageBitmap. |
|
46 * @param "aBitmapHandle" Handle of bitmap to "bind" this instance to. |
|
47 * @exception In error situation leaves with one of the system wide |
|
48 * error codes. |
|
49 * @return Pointer to newly created instance. |
|
50 */ |
|
51 IMPORT_C static CVtImageBitmap* NewL( TInt aBitmapHandle ); |
|
52 |
|
53 /** |
|
54 * Creates new instance of CVtImageBitmap. |
|
55 * @param "aSize" Size of the image in pixels. |
|
56 * @param "aDisplayMode" Display mode of the image. |
|
57 * @exception In error situation leaves with one of the system wide |
|
58 * error codes. |
|
59 * @return Pointer to newly created instance. |
|
60 */ |
|
61 IMPORT_C static CVtImageBitmap* NewL( |
|
62 const TSize& aSize, |
|
63 TDisplayMode aDisplayMode ); |
|
64 |
|
65 /** |
|
66 * C++ destructor. |
|
67 */ |
|
68 IMPORT_C ~CVtImageBitmap(); |
|
69 |
|
70 /** |
|
71 * Resizes the image to new dimension. |
|
72 * @exception In error situation leaves with one of the system wide |
|
73 * error codes. |
|
74 * @param "aSize" New size of the image in pixels. |
|
75 */ |
|
76 IMPORT_C void ResizeL( const TSize& aSize ); |
|
77 |
|
78 /** |
|
79 * Sets new bitmap this image references to. |
|
80 * @param "aBitmapHandle" Handle of the bitmap this image will be |
|
81 * referencing to. |
|
82 * @exception In error situation leaves with one of the system wide |
|
83 * error codes. |
|
84 */ |
|
85 IMPORT_C void SetBitmapL( TInt aBitmapHandle ); |
|
86 |
|
87 /** |
|
88 * Returns constant reference to CFbsBitmap owned by this instance. |
|
89 * @exception In error situation leaves with one of the system wide |
|
90 * error codes. |
|
91 * @return Constant reference to CFbsBitmap. |
|
92 */ |
|
93 IMPORT_C CFbsBitmap& Bitmap() const; |
|
94 |
|
95 public: // from CVtImage |
|
96 |
|
97 /** |
|
98 * From CVtImage. See CVtImage for description. |
|
99 */ |
|
100 TBool NeedHeapLock() const; |
|
101 |
|
102 /** |
|
103 * From CVtImage. See CVtImage for description. |
|
104 */ |
|
105 TVtDisplayMode DisplayMode() const; |
|
106 |
|
107 /** |
|
108 * From CVtImage. See CVtImage for description. |
|
109 */ |
|
110 TSize Size() const; |
|
111 |
|
112 /** |
|
113 * From CVtImage. See CVtImage for description. |
|
114 */ |
|
115 TInt BytesPerRow() const; |
|
116 |
|
117 /** |
|
118 * From CVtImage. See CVtImage for description. |
|
119 */ |
|
120 TUint32* DataAddress() const; |
|
121 |
|
122 /** |
|
123 * From CVtImage. See CVtImage for description. |
|
124 */ |
|
125 TUint32* LineAddress( TInt aLine ) const; |
|
126 |
|
127 private: |
|
128 |
|
129 /** |
|
130 * C++ constructor. |
|
131 */ |
|
132 CVtImageBitmap(); |
|
133 |
|
134 /** |
|
135 * Second phase constructor. |
|
136 * @param "aSize" Size of the image in pixels. |
|
137 * @param "aDisplayMode" Display mode of the image. |
|
138 * @exception In error situation leaves with one of the system wide |
|
139 * error codes. |
|
140 */ |
|
141 void ConstructL( const TSize& aSize, TDisplayMode aDisplayMode ); |
|
142 |
|
143 /** |
|
144 * Second phase constructor. |
|
145 * @param "aBitmapHandle" Handle of bitmap to "bind" this instance to. |
|
146 * @exception In error situation leaves with one of the system wide |
|
147 * error codes. |
|
148 */ |
|
149 void ConstructL( TInt aBitmapHandle ); |
|
150 |
|
151 private: |
|
152 |
|
153 // CFbsImage this image instance references to |
|
154 CFbsBitmap* iBitmap; // owned |
|
155 }; |
|
156 |
|
157 |
|
158 #endif // CVTIMAGEBITMAP_H |
|
159 |
|
160 // End of File |
|
161 |
|
162 |