imagehandling_plat/image_handling_library_api/inc/MIHLBitmapProcessor.h
changeset 54 48dd0f169f0d
parent 42 2e2a89493e2b
equal deleted inserted replaced
42:2e2a89493e2b 54:48dd0f169f0d
     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:  Pure virtual interface to scaling processor
       
    15 *              : using MIHLBitmaps.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef MIHLBITMAPPROCESSOR_H
       
    21 #define MIHLBITMAPPROCESSOR_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <MIHLProcessor.h>
       
    25 
       
    26 // FORWARD DECLARATION
       
    27 class MIHLBitmap;
       
    28 class MIHFilter;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32 *  MIHLBitmapProcessor
       
    33 *
       
    34 *  Pure virtual interface to scaling processor using MIHLBitmaps.
       
    35 *
       
    36 *  If interface needs to be pushed into CleanupStack,
       
    37 *  remember to use CleanupStackDeletePushL() function!
       
    38 *  DO NOT USE CleanupStack::PushL()!!
       
    39 *
       
    40 *  @lib IHL.lib
       
    41 *  @since 3.0
       
    42 */
       
    43 class MIHLBitmapProcessor : public MIHLProcessor
       
    44     {
       
    45 	public:
       
    46 
       
    47         /**
       
    48         * Virtual destructor.
       
    49 		*/
       
    50 		virtual ~MIHLBitmapProcessor() {}
       
    51 
       
    52 	public:
       
    53 
       
    54 		/**
       
    55 		* Flags to control scaler functionality.
       
    56 		* These can be combined using an OR operation.
       
    57 		* @since 3.0
       
    58 		*/
       
    59 		enum TOptions
       
    60 			{
       
    61 			EOptionUseBilinearInterpolation	= 0x01,
       
    62 			};
       
    63 
       
    64     public:
       
    65 
       
    66         /**
       
    67         * Process rectangle from source bitmap to a rectangle
       
    68 		* in destination bitmap. Scaled area can be also
       
    69 		* rotated and/or mirrored during process.
       
    70 		* See full description from MIHLScaler header.
       
    71         * @since 3.0
       
    72         * @param aStatus Process request status reference.
       
    73         * @param aSrcBitmap Source bitmap reference.
       
    74         * @param aSrcRect Rectangle that is processed from source bitmap.
       
    75         * @param aDstBitmap Destination bitmap reference.
       
    76         * @param aDstRect Rectangle that is filled in destination bitmap.
       
    77 		* @return Return system wide error codes:
       
    78 		*         KErrArgument - rectangles are outside of bitmap area.
       
    79 		*                      - source bitmap is empty (handle is null).
       
    80 		*                      - destination bitmap is empty (handle is null).
       
    81 		*                      - destination bitmap displaymode differs
       
    82 		*                        from source bitmap displaymode.
       
    83 		*         KErrBusy     - processor has request pending already.
       
    84         */
       
    85 		virtual TInt Process( TRequestStatus& aStatus,
       
    86 							  const MIHLBitmap& aSrcBitmap,
       
    87 							  const TRect& aSrcRect,
       
    88 							  MIHLBitmap& aDstBitmap,
       
    89 							  const TRect& aDstRect ) = 0;
       
    90 
       
    91         /**
       
    92         * Check if processor has request pending.
       
    93         * @since 3.0
       
    94 		* @return ETrue if request is pending, EFalse if not.
       
    95         */
       
    96 		virtual TBool IsBusy() const = 0;
       
    97 
       
    98         /**
       
    99         * Cancel pending request.
       
   100 		* If not active, method does nothing.
       
   101         * @since 3.0
       
   102         */
       
   103 		virtual void CancelProcess() = 0;
       
   104 
       
   105         /**
       
   106         * Set filter.
       
   107 		* For future use, not used currently!
       
   108         * @since 3.0
       
   109         */
       
   110 		virtual void SetFilter( MIHFilter* aFilter ) = 0;
       
   111     };
       
   112 
       
   113 #endif // MIHLBITMAPPROCESSOR_H
       
   114 
       
   115 // End of File