|
1 /* |
|
2 * Copyright (c) 2002 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: Graphics Extension Library source file |
|
15 * |
|
16 */ |
|
17 #include "Gfx2dGcInterface.h" |
|
18 |
|
19 // -------------------------------------------------------------------------- |
|
20 // CGfx2dGcVGR::CGfx2dGcVGR() : iScale( 1 ), |
|
21 // --------------------------------------------------------------------------- |
|
22 CGfx2dGcVGR::CGfx2dGcVGR() |
|
23 { |
|
24 } |
|
25 |
|
26 // |
|
27 // ========================================================================== |
|
28 // Create a new instance. |
|
29 // ========================================================================== |
|
30 // -------------------------------------------------------------------------- |
|
31 // CGfx2dGcVGR* CGfx2dGcVGR::NewL( CFbsBitmap* aFrameBuffer, TFontSpec& aFontSpec ) |
|
32 // --------------------------------------------------------------------------- |
|
33 CGfx2dGcVGR* CGfx2dGcVGR::NewL( const TSize /*aBufferSize*/, TFontSpec& /*aFontSpec*/, CSvgBitmapFontProvider */*aSvgBitmapFontProvider*/ ) |
|
34 { |
|
35 return NULL; |
|
36 } |
|
37 |
|
38 // -------------------------------------------------------------------------- |
|
39 // void CGfx2dGcVGR::ConstructL( CFbsBitmap* aFrameBuffer, TFontSpec& aFontSpec ) |
|
40 // --------------------------------------------------------------------------- |
|
41 void CGfx2dGcVGR::ConstructL( const TSize /*aBufferSize*/, TFontSpec& /*aFontSpec*/, CSvgBitmapFontProvider* /*aSvgBitmapFontProvider*/ ) |
|
42 { |
|
43 } |
|
44 |
|
45 // ========================================================================== |
|
46 // Destructor. |
|
47 // ========================================================================== |
|
48 // -------------------------------------------------------------------------- |
|
49 // CGfx2dGcVGR::~CGfx2dGcVGR() |
|
50 // --------------------------------------------------------------------------- |
|
51 CGfx2dGcVGR::~CGfx2dGcVGR() |
|
52 { |
|
53 } |
|
54 |
|
55 |
|
56 // -------------------------------------------------------------------------- |
|
57 // void CGfx2dGcVGR::SetFrameBufferL( CFbsBitmap* aFrameBuffer ) |
|
58 // --------------------------------------------------------------------------- |
|
59 void CGfx2dGcVGR::ChangeBufferSizeL( const TSize /*aSize */) |
|
60 { |
|
61 } |
|
62 |
|
63 // -------------------------------------------------------------------------- |
|
64 // void CGfx2dGcVGR::ActivateL() |
|
65 // --------------------------------------------------------------------------- |
|
66 void CGfx2dGcVGR::ActivateL() |
|
67 { |
|
68 } |
|
69 |
|
70 // void CGfx2dGcVGR::AdjustShapeComplexityL( TInt32 /*aVertexSize*/ ) |
|
71 // --------------------------------------------------------------------------- |
|
72 void CGfx2dGcVGR::AdjustShapeComplexityL( TInt32 /*aVertexSize*/ ) |
|
73 { |
|
74 } |
|
75 |
|
76 |
|
77 void CGfx2dGcVGR::DoDrawL( MGfxShape* /*aShape*/ ) |
|
78 { |
|
79 } |
|
80 |
|
81 void CGfx2dGcVGR::PostDraw() |
|
82 { |
|
83 } |
|
84 |
|
85 // -------------------------------------------------------------------------- |
|
86 // void CGfx2dGcVGR::SetWindingRule( TGfxWindingRule aRule ) |
|
87 // --------------------------------------------------------------------------- |
|
88 void CGfx2dGcVGR::SetWindingRule( TGfxWindingRule /*aRule*/ ) |
|
89 { |
|
90 } |
|
91 |
|
92 // -------------------------------------------------------------------------- |
|
93 // void CGfx2dGcVGR::Draw( MGfxShape* aShape ) |
|
94 // --------------------------------------------------------------------------- |
|
95 void CGfx2dGcVGR::DrawL( MGfxShape* /*aShape*/ ) |
|
96 { |
|
97 } |
|
98 |
|
99 |
|
100 // -------------------------------------------------------------------------- |
|
101 // TUint8 CGfx2dGcVGR::Composite() |
|
102 // --------------------------------------------------------------------------- |
|
103 TUint8 CGfx2dGcVGR::Composite() |
|
104 { |
|
105 return 0; |
|
106 } |
|
107 |
|
108 // -------------------------------------------------------------------------- |
|
109 // TGfxColor CGfx2dGcVGR::ForegroundColor() |
|
110 // --------------------------------------------------------------------------- |
|
111 TGfxColor CGfx2dGcVGR::ForegroundColor() |
|
112 { |
|
113 return TGfxColor(0); |
|
114 } |
|
115 |
|
116 // -------------------------------------------------------------------------- |
|
117 // TGfxColor CGfx2dGcVGR::BackgroundColor() |
|
118 // --------------------------------------------------------------------------- |
|
119 TGfxColor CGfx2dGcVGR::BackgroundColor() |
|
120 { |
|
121 return TGfxColor(0); |
|
122 } |
|
123 |
|
124 // -------------------------------------------------------------------------- |
|
125 // MGfxPaint* CGfx2dGcVGR::Paint() |
|
126 // --------------------------------------------------------------------------- |
|
127 MGfxPaint* CGfx2dGcVGR::Paint() |
|
128 { |
|
129 return NULL; |
|
130 } |
|
131 |
|
132 // -------------------------------------------------------------------------- |
|
133 // TGfxRenderingHints* CGfx2dGcVGR::RenderingHints() |
|
134 // --------------------------------------------------------------------------- |
|
135 TGfxRenderingHints* CGfx2dGcVGR::RenderingHints() |
|
136 { |
|
137 return NULL; |
|
138 } |
|
139 |
|
140 // -------------------------------------------------------------------------- |
|
141 // TGfxStroke CGfx2dGcVGR::Stroke() |
|
142 // --------------------------------------------------------------------------- |
|
143 TGfxStroke CGfx2dGcVGR::Stroke() |
|
144 { |
|
145 return TGfxStroke(); |
|
146 } |
|
147 |
|
148 // -------------------------------------------------------------------------- |
|
149 // TGfxAffineTransform CGfx2dGcVGR::Transform() |
|
150 // --------------------------------------------------------------------------- |
|
151 TGfxAffineTransform CGfx2dGcVGR::Transform() |
|
152 { |
|
153 return TGfxAffineTransform(); |
|
154 } |
|
155 |
|
156 |
|
157 // -------------------------------------------------------------------------- |
|
158 // MGfxShape* CGfx2dGcVGR::Clip() |
|
159 // --------------------------------------------------------------------------- |
|
160 MGfxShape* CGfx2dGcVGR::Clip() |
|
161 { |
|
162 return NULL; |
|
163 } |
|
164 |
|
165 |
|
166 // -------------------------------------------------------------------------- |
|
167 // void CGfx2dGcVGR::GetDashArray( CArrayFix<TFixPt>*& aArray, |
|
168 // --------------------------------------------------------------------------- |
|
169 void CGfx2dGcVGR::GetDashArray( CArrayFix<TFloatFixPt>*& /*aArray*/, |
|
170 TFloatFixPt& /*aOffset*/ ) |
|
171 { |
|
172 } |
|
173 |
|
174 // -------------------------------------------------------------------------- |
|
175 // void CGfx2dGcVGR::SetDashOffset( TFixPt aDashOffset ) |
|
176 // --------------------------------------------------------------------------- |
|
177 void CGfx2dGcVGR::SetDashOffset( TFloatFixPt /*aDashOffset*/ ) |
|
178 { |
|
179 } |
|
180 |
|
181 // -------------------------------------------------------------------------- |
|
182 // void CGfx2dGcVGR::SetComposite( const TUint8 aComposite ) |
|
183 // --------------------------------------------------------------------------- |
|
184 void CGfx2dGcVGR::SetComposite( const TUint8 /*aComposite*/ ) |
|
185 { |
|
186 } |
|
187 |
|
188 // -------------------------------------------------------------------------- |
|
189 // void CGfx2dGcVGR::SetForegroundColor( const TGfxColor& aColor ) |
|
190 // --------------------------------------------------------------------------- |
|
191 void CGfx2dGcVGR::SetForegroundColor( const TGfxColor& /*aColor*/ ) |
|
192 { |
|
193 } |
|
194 |
|
195 // -------------------------------------------------------------------------- |
|
196 // void CGfx2dGcVGR::SetBackgroundColor( const TGfxColor& aColor ) |
|
197 // --------------------------------------------------------------------------- |
|
198 void CGfx2dGcVGR::SetBackgroundColor( const TGfxColor& /*aColor*/ ) |
|
199 { |
|
200 } |
|
201 |
|
202 // -------------------------------------------------------------------------- |
|
203 // void CGfx2dGcVGR::SetPaint( MGfxPaint* aPaint ) |
|
204 // --------------------------------------------------------------------------- |
|
205 void CGfx2dGcVGR::SetPaint( MGfxPaint* /* aPaint*/ ) |
|
206 { |
|
207 } |
|
208 |
|
209 // -------------------------------------------------------------------------- |
|
210 // void CGfx2dGcVGR::SetStroke( TGfxStroke aStroke ) |
|
211 // --------------------------------------------------------------------------- |
|
212 void CGfx2dGcVGR::SetStroke( TGfxStroke /*aStroke*/ ) |
|
213 { |
|
214 } |
|
215 |
|
216 // -------------------------------------------------------------------------- |
|
217 // void CGfx2dGcVGR::SetRenderingHints( const TGfxRenderingHints& aRenderingHints ) |
|
218 // --------------------------------------------------------------------------- |
|
219 void CGfx2dGcVGR::SetRenderingHints( const TGfxRenderingHints& /*aRenderingHints*/ ) |
|
220 { |
|
221 } |
|
222 |
|
223 // -------------------------------------------------------------------------- |
|
224 // void CGfx2dGcVGR::SetTransform( const TGfxAffineTransform& aTransform ) |
|
225 // --------------------------------------------------------------------------- |
|
226 void CGfx2dGcVGR::SetTransform( const TGfxAffineTransform& /*aTransform*/ ) |
|
227 { |
|
228 } |
|
229 |
|
230 // -------------------------------------------------------------------------- |
|
231 // void CGfx2dGcVGR::SetClip( const TGfxRectangle2D& aClip ) |
|
232 // --------------------------------------------------------------------------- |
|
233 void CGfx2dGcVGR::SetClip( const TGfxRectangle2D& /*aClip*/ ) |
|
234 { |
|
235 } |
|
236 |
|
237 // -------------------------------------------------------------------------- |
|
238 // void CGfx2dGcVGR::SetDashArrayL( CArrayFix<TFloatFixPt>* aArray ) |
|
239 // --------------------------------------------------------------------------- |
|
240 void CGfx2dGcVGR::SetDashArrayL( CArrayFix<TFloatFixPt>* /*aArray*/ ) |
|
241 { |
|
242 } |
|
243 |
|
244 |
|
245 // -------------------------------------------------------------------------- |
|
246 // TSize CGfx2dGcVGR::DeviceBounds() |
|
247 // --------------------------------------------------------------------------- |
|
248 TSize CGfx2dGcVGR::DeviceBounds() |
|
249 { |
|
250 return TSize(); |
|
251 } |
|
252 |
|
253 // -------------------------------------------------------------------------- |
|
254 // void CGfx2dGcVGR::SetAntialiasingMode( const TInt32 /*aAntialiasingEnable*/) |
|
255 // --------------------------------------------------------------------------- |
|
256 void CGfx2dGcVGR::SetAntialiasingMode( const TInt32 /*aAntialiasingEnable*/) |
|
257 { |
|
258 } |
|
259 |
|
260 // -------------------------------------------------------------------------- |
|
261 // void CGfx2dGcVGR::SetFont( const CFont* aFont ) |
|
262 // --------------------------------------------------------------------------- |
|
263 void CGfx2dGcVGR::SetFont( const CFont* /*aFont*/ ) |
|
264 { |
|
265 } |
|
266 // -------------------------------------------------------------------------- |
|
267 // CFont* CGfx2dGcVGR::Font() |
|
268 // --------------------------------------------------------------------------- |
|
269 CFont* CGfx2dGcVGR::Font() |
|
270 { |
|
271 return NULL; |
|
272 } |
|
273 |
|
274 // -------------------------------------------------------------------------- |
|
275 // void CGfx2dGcVGR::GetSystemFontScaled(TFloatFixPt aHeight, |
|
276 // const TDesC& aTypefaceName, |
|
277 // CFont*& aFont, |
|
278 // TFontSpec& aFontSpec ) |
|
279 // --------------------------------------------------------------------------- |
|
280 void CGfx2dGcVGR::GetFontScaled( TFloatFixPt /*aHeight*/, |
|
281 const TDesC& /*aTypefaceName*/, |
|
282 CFont*& /*aFont*/, |
|
283 TFontSpec& /*aFontSpec */) |
|
284 { |
|
285 } |
|
286 |
|
287 // -------------------------------------------------------------------------- |
|
288 // void CGfx2dGcVGR::SetFontSize( const TFloatFixPt aFontSize ) |
|
289 // --------------------------------------------------------------------------- |
|
290 void CGfx2dGcVGR::SetFontSize( const TFloatFixPt /* aFontSize */) |
|
291 { |
|
292 } |
|
293 |
|
294 // -------------------------------------------------------------------------- |
|
295 // void CGfx2dGcVGR::SetFontWeight( const TInt32 aFontWeight ) |
|
296 // --------------------------------------------------------------------------- |
|
297 void CGfx2dGcVGR::SetFontWeight( const TInt32 /* aFontWeight */) |
|
298 { |
|
299 } |
|
300 |
|
301 // -------------------------------------------------------------------------- |
|
302 // void CGfx2dGcVGR::SetFontStyle( const TInt32 aFontStyle ) |
|
303 // --------------------------------------------------------------------------- |
|
304 void CGfx2dGcVGR::SetFontStyle( const TInt32 /*aFontStyle*/ ) |
|
305 { |
|
306 } |
|
307 |
|
308 // -------------------------------------------------------------------------- |
|
309 // void CGfx2dGcVGR::SetFontFamily( CDesCArrayFlat* aFamilies ) |
|
310 // --------------------------------------------------------------------------- |
|
311 void CGfx2dGcVGR::SetFontFamily( CDesCArrayFlat* /*aFamilies*/ ) |
|
312 { |
|
313 } |
|
314 |
|
315 // -------------------------------------------------------------------------- |
|
316 // void CGfx2dGcVGR::SetTextanchor( const TInt32 aTextAnchor ) |
|
317 // --------------------------------------------------------------------------- |
|
318 void CGfx2dGcVGR::SetTextanchor( const TInt32 /*aTextAnchor*/ ) |
|
319 { |
|
320 } |
|
321 |
|
322 // -------------------------------------------------------------------------- |
|
323 // void CGfx2dGcVGR::SetTextDecoration( const TInt32 aTextDecoration ) |
|
324 // --------------------------------------------------------------------------- |
|
325 void CGfx2dGcVGR::SetTextDecoration( const TInt32 /*aTextDecoration*/ ) |
|
326 { |
|
327 } |
|
328 |
|
329 |
|
330 // Text Drawing |
|
331 // -------------------------------------------------------------------------- |
|
332 // void CGfx2dGcVGR::DrawStringL( const TDesC& aDesc, |
|
333 // --------------------------------------------------------------------------- |
|
334 void CGfx2dGcVGR::DrawStringL( const TDesC& /*aDesc*/, |
|
335 TFloatFixPt /*aX*/, |
|
336 TFloatFixPt /*aY*/, |
|
337 TInt8 /* aTextAnchor */, |
|
338 TInt8 /* aTextDecoration */, |
|
339 CDesCArrayFlat* /* aFamilies */, |
|
340 TReal /*aWordSpacing*/, |
|
341 TReal /*aLetterSpacing*/, |
|
342 CArrayFix<TReal32>* /*aArrayRotate*/, |
|
343 CArrayFix<TFloatFixPt>* /*aArrayX*/, |
|
344 CArrayFix<TFloatFixPt>* /*aArrayY*/, |
|
345 TSize& /*aBboxSizeResult*/, |
|
346 CFont*& /*aFont*/, |
|
347 TFontSpec& /*aFontSpec*/ ) |
|
348 { |
|
349 } |
|
350 |
|
351 |
|
352 |
|
353 // Raster image drawing |
|
354 // -------------------------------------------------------------------------- |
|
355 // void CGfx2dGcVGR::DrawImage( CFbsBitmap* aImage, |
|
356 // --------------------------------------------------------------------------- |
|
357 void CGfx2dGcVGR::DrawImage( CFbsBitmap* /*aImage*/, |
|
358 const TGfxRectangle2D& /*aImageRect*/, |
|
359 TBool /*aHasAlpha*/ ) |
|
360 { |
|
361 } |
|
362 |
|
363 |
|
364 // ========================================================================== |
|
365 // Clear the whole graphics context with the background color |
|
366 // ========================================================================== |
|
367 // -------------------------------------------------------------------------- |
|
368 // void CGfx2dGcVGR::Clear(TUint32 aRGBA8888Color) |
|
369 // --------------------------------------------------------------------------- |
|
370 void CGfx2dGcVGR::Clear(TUint32 /*aRGBA8888Color*/) |
|
371 { |
|
372 } |
|
373 |
|
374 // ========================================================================== |
|
375 // This method copies the internal RGBA8888 framebuffer to CfbsBitmap that |
|
376 // is specified in constructor. The CfbsBitmap could be 4k color (RGB0444), |
|
377 // 64k color (RGB565), or 16M color (RGB888). |
|
378 // ========================================================================== |
|
379 // -------------------------------------------------------------------------- |
|
380 // void CGfx2dGcVGR::UpdateFramebufferL() |
|
381 // --------------------------------------------------------------------------- |
|
382 void CGfx2dGcVGR::UpdateFramebufferL( CFbsBitmap* /*aBitmap*/, CFbsBitmap* /*aMask*/ ) |
|
383 { |
|
384 } |
|
385 |
|
386 void CGfx2dGcVGR::UpdateFramebufferL( CFbsBitmap* /*aBitmap*/, CFbsBitmap* /*aMask*/,TSize /*BitmapSize*/,TDisplayMode /*aBitmapDspMode*/,TDisplayMode /*aMaskDspMode*/ ) |
|
387 |
|
388 { |
|
389 |
|
390 |
|
391 |
|
392 } |
|
393 // ==================================================================================== |
|
394 // Blend bitmap with background according to group opacity |
|
395 // This function gets called with the opacity framebuffer and the group opacity value |
|
396 // The opacity buffer is initialized with the 0xAA55AA55 value. The pixels not matching |
|
397 // ==================================================================================== |
|
398 |
|
399 // -------------------------------------------------------------------------- |
|
400 // void CGfx2dGcVGR::BlendWithBackground(TUint32* aFrameBuffer, TReal32 aOpacity) |
|
401 // --------------------------------------------------------------------------- |
|
402 void CGfx2dGcVGR::BlendWithBackground(TUint32* /*aColorBuffer*/, TReal32 /*aOpacity*/) |
|
403 { |
|
404 } |
|
405 |
|
406 // ==================================================================================== |
|
407 // return iBuffer |
|
408 // ========================================================================== |
|
409 // Generate 8 bit gray or 1bit B/W mask from internal ARGB8888 frame buffer. |
|
410 // ========================================================================== |
|
411 // -------------------------------------------------------------------------- |
|
412 // void CGfx2dGcVGR::GenerateMask(CFbsBitmap* aMask) |
|
413 // --------------------------------------------------------------------------- |
|
414 void CGfx2dGcVGR::GenerateMask(CFbsBitmap* /*aMask*/) |
|
415 { |
|
416 } |
|
417 |
|
418 // ========================================================================== |
|
419 // This function calls the low level function to set fill opacity value |
|
420 // ========================================================================== |
|
421 |
|
422 // -------------------------------------------------------------------------- |
|
423 // void CGfx2dGcVGR::SetFillOpacity(TFixPt aFillOpacity) |
|
424 // --------------------------------------------------------------------------- |
|
425 void CGfx2dGcVGR::SetFillOpacity(TFloatFixPt /*aFillOpacity*/) |
|
426 { |
|
427 } |
|
428 // ========================================================================== |
|
429 // This function calls the low level function to set stroke opacity value |
|
430 // ========================================================================== |
|
431 |
|
432 // -------------------------------------------------------------------------- |
|
433 // void CGfx2dGcVGR::SetStrokeOpacity(TFixPt aStrokeOpacity) |
|
434 // --------------------------------------------------------------------------- |
|
435 void CGfx2dGcVGR::SetStrokeOpacity(TFloatFixPt /*aStrokeOpacity*/) |
|
436 { |
|
437 } |
|
438 // ========================================================================== |
|
439 // This function is called to set the dithering flag |
|
440 // ========================================================================== |
|
441 |
|
442 // -------------------------------------------------------------------------- |
|
443 // void CGfx2dGcVGR::SetDoDithering( TBool aDoDithering ) |
|
444 // --------------------------------------------------------------------------- |
|
445 void CGfx2dGcVGR::SetDoDithering( TBool /*aDoDithering*/ ) |
|
446 { |
|
447 } |
|
448 |
|
449 TUint32* CGfx2dGcVGR::ColorBuffer() |
|
450 { |
|
451 return NULL; |
|
452 } |
|
453 |
|
454 // -------------------------------------------------------------------------- |
|
455 // void CGfx2dGcVGR::ColorConvertTo64K |
|
456 // --------------------------------------------------------------------------- |
|
457 void CGfx2dGcVGR::ColorConvertTo64K( TUint32* /*aDestAddress*/, const TSize& /*aSize*/ ) |
|
458 { |
|
459 } |
|
460 |
|
461 void CGfx2dGcVGR::UpdateColorBuffer() |
|
462 { |
|
463 } |