|
1 /* |
|
2 * Copyright (c) 2002 - 2007 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: test functions for alftextureprocessor.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // [INCLUDE FILES] |
|
21 #include <alf/alftextureprocessor.h> |
|
22 #include <avkon.mbg> |
|
23 |
|
24 #include "testplatalfvisual.h" |
|
25 |
|
26 |
|
27 |
|
28 // ============================ MEMBER FUNCTIONS =============================== |
|
29 |
|
30 // ----------------------------------------------------------------------------- |
|
31 // CTestPlatAlfVisual::TestTxtProcessorBlurL |
|
32 // ----------------------------------------------------------------------------- |
|
33 // |
|
34 TInt CTestPlatAlfVisual::TestTxtProcessorBlurL( CStifItemParser& /*aItem*/ ) |
|
35 { |
|
36 // Print to UI |
|
37 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
38 _LIT( KTestTxtProcessorBlurL, "TestTxtProcessorBlurL" ); |
|
39 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestTxtProcessorBlurL ); |
|
40 // Print to log file |
|
41 iLog->Log( KTestTxtProcessorBlurL ); |
|
42 |
|
43 CAlfTextureManager* txtMgr = &( iAlfEnv->TextureManager() ); |
|
44 |
|
45 CAlfImageVisual* imgVisual = CAlfImageVisual::AddNewL( *iAlfCtl ); |
|
46 imgVisual->SetScaleMode(CAlfImageVisual::EScaleFitInside); |
|
47 TAlfImage magnifyingGlassImage( |
|
48 KAknsIIDQgnIndiFindGlass, |
|
49 iAlfDisplay->VisibleArea().Size(), |
|
50 EAspectRatioPreserved, |
|
51 &AknIconUtils::AvkonIconFileName(), |
|
52 EMbmAvkonQgn_indi_find_glass, |
|
53 EMbmAvkonQgn_indi_find_glass_mask, |
|
54 0.f,0.f,1.f,1.f, |
|
55 TAlfTextureFlags( EAlfTextureFlagGenerateShadow | EAlfTextureFlagSkinContent ), |
|
56 2, |
|
57 txtMgr ); |
|
58 imgVisual->SetImage( magnifyingGlassImage ); |
|
59 |
|
60 CAlfTexture* tex = ( CAlfTexture* ) &( imgVisual->Image().Texture() ); |
|
61 |
|
62 txtMgr->Processor().BlurL( *tex, *tex ); |
|
63 txtMgr->Processor().BlurL( *tex, *tex, iAlfDisplay->VisibleArea().Size() ); |
|
64 |
|
65 return KErrNone; |
|
66 } |
|
67 |
|
68 |
|
69 // [End of File] |