uiaccelerator_plat/alf_visual_api/tsrc/src/testplatalfvisualblocksdropshadow.cpp
changeset 0 15bf7259bb7c
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     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 alfvisual.h
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // [INCLUDE FILES]
       
    21 #include <e32svr.h>
       
    22 #include <stifparser.h>
       
    23 #include <stiftestinterface.h>
       
    24 
       
    25 #include "testplatalfvisual.h"
       
    26 
       
    27 // CONSTANTS
       
    28 const TInt KBufSize = 64;
       
    29 
       
    30 // ============================ MEMBER FUNCTIONS ===============================
       
    31 
       
    32 // -----------------------------------------------------------------------------
       
    33 // CTestPlatAlfVisual::TestAlfDropShadowSetAttributesL
       
    34 // -----------------------------------------------------------------------------
       
    35 //
       
    36 TInt CTestPlatAlfVisual::TestAlfDropShadowSetAttributesL( CStifItemParser& /*aItem*/ )
       
    37     {
       
    38     _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" );
       
    39     _LIT( KTestAlfDropShadowSetAttributesL, "TestAlfDropShadowSetAttributesL" );
       
    40     TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfDropShadowSetAttributesL );
       
    41     // Print to log file
       
    42     iLog->Log( KTestAlfDropShadowSetAttributesL );
       
    43     CAlfTextVisual* vVisual = CAlfTextVisual::AddNewL( *iAlfCtl );
       
    44     _LIT( KTest, "test" );
       
    45     TBuf<KBufSize> vBuf( KTest );
       
    46     vVisual->SetTextL( vBuf );
       
    47     vVisual->EnableDropShadowL();
       
    48     CAlfDropShadow* vDropShadow = vVisual->DropShadowHandler();
       
    49     TReal32 vReal = 0;
       
    50     TAlfMetric vMetric( 0 );
       
    51     TAlfTimedPoint vPoint;
       
    52     TRgb vRgb( KRgbBlack );
       
    53     TAknsItemID vId;
       
    54     TAlfTimedValue vValue( 0 );
       
    55     
       
    56     vDropShadow->SetOffset( vReal, vMetric );
       
    57     vDropShadow->SetOffset( vPoint );
       
    58     vDropShadow->SetColor( vRgb );
       
    59     vDropShadow->SetColor( vId, 0 );
       
    60     vDropShadow->SetOpacity( vValue);
       
    61     vDropShadow->SetRadius( vValue);
       
    62     vDropShadow->SetScale( vValue);
       
    63     
       
    64     return KErrNone;
       
    65     }
       
    66 
       
    67 // End of file
       
    68