skins/AknSkins/rlplugininc/AknsRlEffectPluginSaturation.h
changeset 0 05e9090e2422
equal deleted inserted replaced
-1:000000000000 0:05e9090e2422
       
     1 /*
       
     2 * Copyright (c) 2004-2008 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:  Saturation provides functionality adjust image saturation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef AKNSRLEFFECTPLUGINSATURATION_H
       
    20 #define AKNSRLEFFECTPLUGINSATURATION_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "AknsRlEffectPlugin.h"
       
    24 #include <AknsRlEffect.h>
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // Effect plugin UID
       
    29 const TInt KAknsRlEffectPluginSaturationUID = 0x10204AE6;
       
    30 
       
    31 // Constants for parameter names
       
    32 _LIT( KAknsRlEffectSaturationAdjustment, "a" );
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 * Saturation provides functionality adjust image saturation. Saturation
       
    38 * adjusting is not done in HSV color space, it is emulated by blending the
       
    39 * original image with grayscaled image.
       
    40 *
       
    41 * @since 2.8
       
    42 */
       
    43 NONSHARABLE_CLASS(CAknsRlEffectPluginSaturation):
       
    44     public CAknsRlEffectPlugin,
       
    45     public MAknsRlEffect
       
    46     {
       
    47     public: // Constructors and destructor
       
    48 
       
    49         /**
       
    50         * Default constructor.
       
    51         *
       
    52         * @since 2.8
       
    53         */
       
    54         CAknsRlEffectPluginSaturation();
       
    55 
       
    56         /**
       
    57         * Destructor.
       
    58         *
       
    59         * @since 2.8
       
    60         */
       
    61         virtual ~CAknsRlEffectPluginSaturation();
       
    62 
       
    63     public: // Implementation of CAknsEffectPlugin
       
    64 
       
    65         TUid EffectUid() const;
       
    66         MAknsRlEffect* Effect( const TInt aInterface );
       
    67 
       
    68     public: // Implementation of MAknsRlEffect
       
    69 
       
    70         void InitializeL();
       
    71         void Release();
       
    72 
       
    73         void ActivateL( MAknsRlEffectContext* aContext );
       
    74         void Deactivate();
       
    75 
       
    76         /**
       
    77         * Accepted named parameters:
       
    78         * - "a", integer, adjustment value.
       
    79         *
       
    80         * The normal range of adjustment value is [-255, 255]. Value -255
       
    81         * produces grayscale image, value 255 produces fully saturated image.
       
    82         * Values outside range [-255, 255] will result in underexposure and
       
    83         * overexposure.
       
    84         *
       
    85         * The default value is 0. With default value the filter produces the
       
    86         * original image.
       
    87         */
       
    88         void SetParametersL( MAknsRlParameterIterator& aParameters );
       
    89 
       
    90         /**
       
    91         * Supported modes:
       
    92         * - EColor64K -> EColor64K
       
    93         * - EColor16MU -> EColor16MU
       
    94         *
       
    95         * Masks are ignored. Target layer and input layer A are both required.
       
    96         */
       
    97         void GetCapabilities( TAknsRlEffectCaps& aCaps );
       
    98 
       
    99         TInt Render( const TAknsRlRenderOpParam& aParam );
       
   100 
       
   101     private:
       
   102 
       
   103         MAknsRlEffectContext* iContext;
       
   104 
       
   105         TInt iAdjustment;
       
   106     };
       
   107 
       
   108 #endif // AKNSRLEFFECTPLUGINSATURATION_H
       
   109 
       
   110 // End of File