mmplugins/imagingplugins/codecs/GifCodec/rawimageprocessor.h
branchRCL_3
changeset 50 948c7f65f6d4
parent 0 40261b775718
equal deleted inserted replaced
49:735348f59235 50:948c7f65f6d4
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef RAWIMAGEPROCESSOR_H
       
    17 #define RAWIMAGEPROCESSOR_H
       
    18 
       
    19 #include <icl/imageprocessor.h>
       
    20 #include "ImageProcessorPriv.h"
       
    21 
       
    22 /**
       
    23    @file
       
    24    @internalComponent
       
    25 */
       
    26 class CRawImageProcessor: public CImageProcessor
       
    27 	{
       
    28 public:
       
    29 	static CRawImageProcessor* NewL();
       
    30 // from the CImageProcessor
       
    31 	TBool SetPixels(TRgb* aColorBuffer,TInt aBufferLength);
       
    32 	TBool SetMonoPixel(TInt /*aGray256*/);
       
    33 	TBool SetMonoPixelRun(TInt /*aGray256*/,TInt /*aCount*/);
       
    34 	TBool SetMonoPixels(TUint32* /*aGray256Buffer*/,TInt /*aBufferLength*/);
       
    35 	TBool SetMonoPixelBlock(TUint32* /*aGray256Buffer*/);
       
    36 	void PrepareL(CFbsBitmap& aBitmap,const TRect& aImageRect);
       
    37 	void PrepareL(CFbsBitmap& /*aBitmap*/,const TRect& /*aImageRect*/,const TSize& /*aRgbBlockSize*/);
       
    38 	void SetYPosIncrement(TInt /*aYInc*/);
       
    39 	void SetLineRepeat(TInt /*aLineRepeat*/);
       
    40 	void SetPixelPadding(TInt /*aNumberOfPixels*/);
       
    41 
       
    42 	TBool SetPixelBlock(TRgb* /*aColorBuffer*/);
       
    43 	TBool SetPixelRun(TRgb /*aColor*/,TInt /*aCount*/);
       
    44 	TBool SetPixel(TRgb /*aColor*/);
       
    45 	TBool SetPos(const TPoint& aPosition);
       
    46 	TBool FlushPixels();
       
    47 
       
    48 protected:
       
    49 	CRawImageProcessor();
       
    50 	
       
    51 protected:	
       
    52 	CFbsBitmap*	iBitmap;	// destination bitmap, not owned
       
    53 	TUint8* iBitmapData;
       
    54 	TUint8* iBitmapDataPtr; // destination bitmap data ptr, not owned
       
    55 	TUint8* iBitmapDataPtrLimit; 
       
    56 	TInt	iPixelSize; // size of pixels in bytes
       
    57 	TInt	iScanlineSize;
       
    58 	TRect	iImageRect;
       
    59 
       
    60 	};
       
    61 
       
    62 class CRawImageUtilProcessor: public CRawImageProcessor
       
    63 	{
       
    64 
       
    65 public:
       
    66 	static CRawImageUtilProcessor* NewL();
       
    67 // from the CImageProcessor
       
    68 	TBool SetPixels(TRgb* aColorBuffer,TInt aBufferLength);
       
    69 	TBool SetMonoPixels(TUint32* aGray256Buffer,TInt aBufferLength);
       
    70 	void PrepareL(CFbsBitmap& aBitmap,const TRect& aImageRect);
       
    71 	
       
    72 	TBool SetPos(const TPoint& aPosition);
       
    73 
       
    74 protected:
       
    75 	TImageBitmapUtil iUtil;
       
    76 	TPoint iPosition;
       
    77 	TSize iSize;
       
    78 	};
       
    79 
       
    80 #endif // RAWIMAGEPROCESSOR_H
       
    81