webengine/webkitutils/rt_gesturehelper/src/pointarray.cpp
changeset 65 5bfc169077b2
parent 0 dd21522fd290
equal deleted inserted replaced
42:d39add9822e2 65:5bfc169077b2
       
     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 the License "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 
       
    19 #include "pointarray.h"
       
    20 
       
    21 using namespace RT_GestureHelper;
       
    22 
       
    23 // ----------------------------------------------------------------------------
       
    24 // TPointArray constructor
       
    25 // ----------------------------------------------------------------------------
       
    26 //
       
    27 TPointArray::TPointArray( const RArray< TPointEntry >& aPoints )
       
    28         : iPoints( aPoints )
       
    29     {}
       
    30     
       
    31 // ----------------------------------------------------------------------------
       
    32 // TPointArray length
       
    33 // ----------------------------------------------------------------------------
       
    34 //
       
    35 TInt TPointArray::Count() const
       
    36     {
       
    37     return iPoints.Count();
       
    38     }
       
    39 
       
    40 // ----------------------------------------------------------------------------
       
    41 // point at index, no filtering
       
    42 // ----------------------------------------------------------------------------
       
    43 //
       
    44 TPoint TPointArray::operator[]( TInt aIndex ) const 
       
    45     {
       
    46     return iPoints[aIndex].iPos;
       
    47     }
       
    48 
       
    49 // ----------------------------------------------------------------------------
       
    50 // Unfiltered point at index
       
    51 // ----------------------------------------------------------------------------
       
    52 //
       
    53 TPoint TPointArray::Raw( TInt aIndex ) const
       
    54     {
       
    55     return iPoints[aIndex].iPos;
       
    56     }
       
    57