vtprotocolplugins/DisplaySink/inc/CVtImageRotatorImpl.h
changeset 0 ed9695c8bcbe
equal deleted inserted replaced
-1:000000000000 0:ed9695c8bcbe
       
     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 #ifndef CVTIMAGEROTATORIMPL_H
       
    22 #define CVTIMAGEROTATORIMPL_H
       
    23 
       
    24 // INCLUDE FILES
       
    25 
       
    26 #include "cvtimagerotator.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 
       
    30 class CVtImage;
       
    31 
       
    32 // CLASS DECLARATIONS
       
    33 
       
    34 /**
       
    35 *  Image scaler implementation.
       
    36 *
       
    37 *  @lib videosource.lib
       
    38 */
       
    39 class CVtImageRotatorImpl : public CBase
       
    40     {
       
    41     public:
       
    42 
       
    43         /**
       
    44         * Sets scaler params.
       
    45         * @param "aParams" Scaling params, including source and target images.
       
    46         * @exception In error situation leaves with one of the system wide
       
    47         * error codes.
       
    48         */
       
    49         void SetSourceTargetL( const CVtImage& aSource, CVtImage& aTarget );
       
    50 
       
    51         /**
       
    52         * Method to check whether bitmap heap locking is needed or not during
       
    53         * scaling process.
       
    54         * @exception In error situation leaves with one of the system wide
       
    55         * error codes.
       
    56         * @return ETrue if bitmap heap lock is needed, EFalse otherwise.
       
    57         */
       
    58         TBool NeedHeapLock() const;
       
    59 
       
    60         /**
       
    61         * Pure virtual rotation method.
       
    62         * @param "aContinue" When method returns, this parameter will contain
       
    63         * ETrue if new call is needed (i.e. scaling is not yet finished) or
       
    64         * EFalse if scaling is complete.
       
    65         * @return KErrNone or one of the system wide error codes.
       
    66         */
       
    67         virtual TInt Rotate( TBool& aContinue ) = 0;
       
    68 
       
    69         /**
       
    70         * Pure virtual method for checking specific rotation angle support.
       
    71         * @param "aAngle" Rotation type that will be needed.
       
    72         * @return ETrue if aAngle is one of the supported rotation types
       
    73         * EFalse otherwise.
       
    74         */
       
    75         virtual TBool SupportsRotationAngle( const CVtImageRotator::TRotationAngle& aAngle ) = 0;
       
    76 
       
    77         /**
       
    78         * Sets rotation angle to be used.
       
    79         * @param "aAngle" Rotation type that will be needed.
       
    80         */
       
    81         void SetAngle( const CVtImageRotator::TRotationAngle& aAngle );
       
    82 
       
    83     protected:
       
    84 
       
    85         /**
       
    86         * C++ constructor.
       
    87         * @param "aAngle" Rotation type that will be needed.
       
    88         */
       
    89         CVtImageRotatorImpl( const CVtImageRotator::TRotationAngle& aAngle );
       
    90 
       
    91     private:
       
    92 
       
    93         /**
       
    94         * Pure virtual source and target image validation method.
       
    95         * @param "aSource" Constant reference to source image.
       
    96         * @param "aTarget" Constant reference to target image.
       
    97         * @exception If source or target is not valid, this method leaves
       
    98         * with KErrNotSupported.
       
    99         */
       
   100         virtual void ValidateSourceTargetL(
       
   101             const CVtImage& aSource,
       
   102             CVtImage& aTarget ) = 0;
       
   103 
       
   104     protected:
       
   105 
       
   106         // Source for scaling
       
   107         const CVtImage* iSource; // not owned
       
   108 
       
   109         // Target image (will hold scaled source)
       
   110         CVtImage* iTarget; // not owned
       
   111 
       
   112         // Selected rotation angle
       
   113         CVtImageRotator::TRotationAngle iAngle;
       
   114     };
       
   115 
       
   116 #endif // CVTIMAGEROTATORIMPL_H
       
   117 
       
   118 // End of File
       
   119 
       
   120