epoc32/include/gifscaler.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
     1.1 --- a/epoc32/include/gifscaler.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/gifscaler.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,79 @@
     1.4 -gifscaler.h
     1.5 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +// This is the public client API for the GifScaler Library
    1.19 +// 
    1.20 +//
    1.21 +
    1.22 +#ifndef __GIFSCALER_H__
    1.23 +#define __GIFSCALER_H__
    1.24 +
    1.25 +#include <e32base.h>
    1.26 +#include <fbs.h>
    1.27 +
    1.28 +
    1.29 +/**
    1.30 +The public API for clients to call the GifScaler scaling and color quantization library.
    1.31 +
    1.32 +@publishedAll
    1.33 +@released
    1.34 +*/
    1.35 +class CGifScaler : public CBase
    1.36 +	{
    1.37 +public:
    1.38 +	/**
    1.39 +	TOptions is an enumeration within the namespace CGifScaler
    1.40 +	The enumeration provides a set of supported quantization levels:
    1.41 +	(EHighQualityQuantization is the default setting as it provides the
    1.42 +	best balance between quality and speed)
    1.43 +	*/
    1.44 +	enum TOptions
    1.45 +		{
    1.46 +		/** Provides the lowest quality, but also the fastest.
    1.47 +		*/
    1.48 +		ELowQualityQuantization,
    1.49 +		/** Provides medium quality quantization
    1.50 +		*/
    1.51 +		EMediumQualityQuantization,
    1.52 +		/** Provides high quality quantization
    1.53 +		*/
    1.54 +		EHighQualityQuantization,
    1.55 +		/** Provides the highest quality quantization, but is also the slowest.
    1.56 +		*/
    1.57 +		EMaximumQualityQuantization
    1.58 +		};
    1.59 +
    1.60 +public:
    1.61 +	IMPORT_C static CGifScaler* NewL(CFbsBitmap& aSource, TOptions aOptions = EHighQualityQuantization);
    1.62 +	IMPORT_C static CGifScaler* NewL(CFbsBitmap& aSource, CFbsBitmap& aSourceMask, TOptions aOptions = EHighQualityQuantization);
    1.63 +	IMPORT_C ~CGifScaler();
    1.64 +
    1.65 +	// Scale source and mask -> 8bpp destination. (One of the palette indices is transparent, if a mask is supplied)
    1.66 +	IMPORT_C void Scale(TRequestStatus* aStatus, CFbsBitmap& aDestination, CPalette& aPalette, TBool aMaintainAspectRatio = ETrue);
    1.67 +
    1.68 +	// Scale source and mask -> 8bpp destination. (As above, except that the transparency threshold must be specified)
    1.69 +	IMPORT_C void ThresholdScale(TRequestStatus* aStatus, CFbsBitmap& aDestination, CPalette& aPalette, TUint8 aTransparencyThreshold, TBool aMaintainAspectRatio = ETrue);
    1.70 +
    1.71 +	// Cancel scaling.
    1.72 +	IMPORT_C void Cancel();
    1.73 +
    1.74 +private:
    1.75 +	CGifScaler();
    1.76 +	void ConstructL(CFbsBitmap& aSource, CFbsBitmap* aSourceMask, TOptions aOptions);
    1.77 +
    1.78 +private:
    1.79 +	class CBody;
    1.80 +	CBody* iBody;
    1.81 +	};
    1.82 +
    1.83 +#endif // __GIFSCALER_H__