mulwidgets/gesturehelper/src/pointarray.cpp
branchRCL_3
changeset 26 0e9bb658ef58
parent 0 e83bab7cf002
equal deleted inserted replaced
25:4ea6f81c838a 26:0e9bb658ef58
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Array of points
       
    15 *
       
    16 */
       
    17 
       
    18 #include "pointarray.h"
       
    19 
       
    20 using namespace GestureHelper;
       
    21 
       
    22 // ----------------------------------------------------------------------------
       
    23 // TPointArray constructor
       
    24 // ----------------------------------------------------------------------------
       
    25 //
       
    26 TPointArray::TPointArray( const RArray< TPointEntry >& aPoints )
       
    27         : iPoints( aPoints )
       
    28     {}
       
    29     
       
    30 // ----------------------------------------------------------------------------
       
    31 // TPointArray length
       
    32 // ----------------------------------------------------------------------------
       
    33 //
       
    34 TInt TPointArray::Count() const
       
    35     {
       
    36     return iPoints.Count();
       
    37     }
       
    38 
       
    39 // ----------------------------------------------------------------------------
       
    40 // point at index, no filtering
       
    41 // ----------------------------------------------------------------------------
       
    42 //
       
    43 TPoint TPointArray::operator[]( TInt aIndex ) const 
       
    44     {
       
    45     return iPoints[aIndex].iPos;
       
    46     }
       
    47 
       
    48 // ----------------------------------------------------------------------------
       
    49 // Unfiltered point at index
       
    50 // ----------------------------------------------------------------------------
       
    51 //
       
    52 TPoint TPointArray::Raw( TInt aIndex ) const
       
    53     {
       
    54     return iPoints[aIndex].iPos;
       
    55     }
       
    56