vtprotocolplugins/DisplaySink/inc/CVtImageRotatorImplMirrorFlip.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 CVTIMAGEROTATORIMPLMIRRORFLIP_H
       
    22 #define CVTIMAGEROTATORIMPLMIRRORFLIP_H
       
    23 
       
    24 // INCLUDE FILES
       
    25 
       
    26 #include "CVtImageRotatorImpl.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 
       
    30 class CVtImage;
       
    31 class CVtImageIYUV;
       
    32 
       
    33 // CLASS DECLARATIONS
       
    34 
       
    35 /**
       
    36 *  Image scaler implementation.
       
    37 *
       
    38 *  @lib videosource.lib
       
    39 */
       
    40 class CVtImageRotatorImplMirrorFlip : public CVtImageRotatorImpl
       
    41     {
       
    42     public:
       
    43         /**
       
    44         * C++ constructor
       
    45         * @param "aAngle" Selected rotation angle.
       
    46         */
       
    47         CVtImageRotatorImplMirrorFlip( const CVtImageRotator::TRotationAngle& aAngle );
       
    48 
       
    49         /**
       
    50         * Rotates the image.
       
    51         * @param "aContinue" When method returns, this parameter will contain
       
    52         * ETrue if new call is needed (i.e. scaling is not yet finished) or
       
    53         * EFalse if scaling is complete.
       
    54         * @return KErrNone or one of the system wide error codes.
       
    55         */
       
    56         TInt Rotate( TBool& aContinue );
       
    57 
       
    58         /**
       
    59         * Source and target image validation method.
       
    60         * @param "aSource" Constant reference to source image.
       
    61         * @param "aTarget" Constant reference to target image.
       
    62         * @exception If source or target is not valid, this method leaves
       
    63         * with KErrNotSupported.
       
    64         */
       
    65         void ValidateSourceTargetL( 
       
    66             const CVtImage& aSource, 
       
    67             CVtImage& aTarget );
       
    68 
       
    69         /**
       
    70         * 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         TBool SupportsRotationAngle( const CVtImageRotator::TRotationAngle& aAngle );
       
    76 
       
    77     private:
       
    78 
       
    79         /**
       
    80         * Mirrors image horizontally from iSource to iTarget.
       
    81         */
       
    82         void Mirror();
       
    83     
       
    84         /**
       
    85         * Mirrors image horizontally from aTarget to aTarget.
       
    86         */
       
    87         void Mirror( CVtImage& aTarget );
       
    88 
       
    89         /**
       
    90         * Mirrors IYUV image from iSource to iTarget.
       
    91         */
       
    92         void MirrorIYUV
       
    93             ( 
       
    94             const CVtImageIYUV& aSource, 
       
    95             CVtImageIYUV& aTarget 
       
    96             );
       
    97 
       
    98         /**
       
    99         * Mirrors one plane of IYUV image from iSource to iTarget.
       
   100         */
       
   101         void MirrorPlane
       
   102             ( 
       
   103             TUint8* aSource,
       
   104             TUint8* aTarget,
       
   105             TInt aWidth,
       
   106             TInt aHeight,
       
   107             TInt aBytesPerRow
       
   108             );
       
   109 
       
   110         /**
       
   111         * Flips image vertically from iSource to iTarget.
       
   112         */
       
   113         void Flip();
       
   114            
       
   115         /**
       
   116         * Flips image vertically from aTarget to aTarget.
       
   117         */
       
   118         void Flip( CVtImage& aTarget );
       
   119 
       
   120         /**
       
   121         * Flips IYUV image vertically from iSource to iTarget.
       
   122         */
       
   123         void FlipIYUV
       
   124             ( 
       
   125             const CVtImageIYUV& aSource, 
       
   126             CVtImageIYUV& aTarget 
       
   127             );
       
   128 
       
   129         /**
       
   130         * Flips one plane of IYUV.
       
   131         */
       
   132         void FlipPlane
       
   133             ( 
       
   134             TUint8* aSource, 
       
   135             TUint8* aTarget, 
       
   136             TInt aHeight, 
       
   137             TInt aBytesPerRow 
       
   138             );
       
   139     };
       
   140 
       
   141 #endif // CVTIMAGEROTATORIMPLMIRRORFLIP_H
       
   142             
       
   143 // End of File
       
   144 
       
   145