mmplugins/imagingplugins/codecs/PNGCodec/PngCodec.inl
branchRCL_3
changeset 50 948c7f65f6d4
parent 0 40261b775718
equal deleted inserted replaced
49:735348f59235 50:948c7f65f6d4
       
     1 // Copyright (c) 2005-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 inline
       
    17 void CPngReadSubCodec::SetRgbaMode(TBool aMode)
       
    18 	{
       
    19 	iRgbaMode = aMode;
       
    20 	}
       
    21 
       
    22 inline
       
    23 void CPngReadSubCodec::SetAlphaMode(TBool aMode)
       
    24 	{
       
    25 	iAlphaMode = aMode;
       
    26 	}
       
    27 	
       
    28 inline 
       
    29 void CPngReadSubCodec::Start()
       
    30     {
       
    31 	if(iFastProc && !iRgbaMode)
       
    32 		iFastProc->Begin();
       
    33     }
       
    34 
       
    35 inline 
       
    36 void CPngReadSubCodec::Complete()
       
    37     {
       
    38 	if(iFastProc && !iRgbaMode)
       
    39 		iFastProc->End();
       
    40     }
       
    41 
       
    42 inline 
       
    43 void CPngReadCodec::Complete()
       
    44     {
       
    45 	if(iDecoder)
       
    46 		iDecoder->Complete();
       
    47     }
       
    48 
       
    49 inline
       
    50 CImageProcessor* CPngReadCodec::MaskProcessor() const
       
    51 	{
       
    52 	return iMaskProc;
       
    53 	}
       
    54 
       
    55 inline
       
    56 CImageProcessor* CPngReadCodec::ImageProcessor() const
       
    57 	{
       
    58 	return iImageProc;
       
    59 	}
       
    60 
       
    61 inline
       
    62 CFastProcessor* CPngReadCodec::FastProcessor() const
       
    63 	{
       
    64 	return iFastProc;
       
    65 	}
       
    66 
       
    67 inline TInt CPngReadSubCodec::ClampValue(TInt aValue, TInt aMinValue, TInt aMaxValue) const
       
    68 	{
       
    69 	if(aMaxValue<aMinValue)
       
    70 		{
       
    71 		return aMinValue;
       
    72 		}
       
    73 	return (aValue < aMinValue) ? aMinValue : (aValue > aMaxValue) ? aMaxValue : aValue;
       
    74 	}
       
    75 
       
    76 
       
    77 inline TInt CPngWriteSubCodec::BufferSize() const
       
    78 	{ 
       
    79 	return iScanlineBufferSize; 
       
    80 	}
       
    81 
       
    82 inline CPalette* CPngWriteSubCodec::Palette() const
       
    83 	{ 
       
    84 	return iPalette; 
       
    85 	}
       
    86