mmplugins/imagingplugins/codecs/PNGCodec/PngCodec.inl
branchRCL_3
changeset 50 948c7f65f6d4
parent 0 40261b775718
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmplugins/imagingplugins/codecs/PNGCodec/PngCodec.inl	Wed Sep 01 12:38:50 2010 +0100
@@ -0,0 +1,86 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+inline
+void CPngReadSubCodec::SetRgbaMode(TBool aMode)
+	{
+	iRgbaMode = aMode;
+	}
+
+inline
+void CPngReadSubCodec::SetAlphaMode(TBool aMode)
+	{
+	iAlphaMode = aMode;
+	}
+	
+inline 
+void CPngReadSubCodec::Start()
+    {
+	if(iFastProc && !iRgbaMode)
+		iFastProc->Begin();
+    }
+
+inline 
+void CPngReadSubCodec::Complete()
+    {
+	if(iFastProc && !iRgbaMode)
+		iFastProc->End();
+    }
+
+inline 
+void CPngReadCodec::Complete()
+    {
+	if(iDecoder)
+		iDecoder->Complete();
+    }
+
+inline
+CImageProcessor* CPngReadCodec::MaskProcessor() const
+	{
+	return iMaskProc;
+	}
+
+inline
+CImageProcessor* CPngReadCodec::ImageProcessor() const
+	{
+	return iImageProc;
+	}
+
+inline
+CFastProcessor* CPngReadCodec::FastProcessor() const
+	{
+	return iFastProc;
+	}
+
+inline TInt CPngReadSubCodec::ClampValue(TInt aValue, TInt aMinValue, TInt aMaxValue) const
+	{
+	if(aMaxValue<aMinValue)
+		{
+		return aMinValue;
+		}
+	return (aValue < aMinValue) ? aMinValue : (aValue > aMaxValue) ? aMaxValue : aValue;
+	}
+
+
+inline TInt CPngWriteSubCodec::BufferSize() const
+	{ 
+	return iScanlineBufferSize; 
+	}
+
+inline CPalette* CPngWriteSubCodec::Palette() const
+	{ 
+	return iPalette; 
+	}
+