idlehomescreen/xmluirendering/uiengine/src/xnpointarray.cpp
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     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 "xnpointarray.h"
       
    19 
       
    20 using namespace XnGestureHelper;
       
    21 
       
    22 // ----------------------------------------------------------------------------
       
    23 // TXnPointArray constructor
       
    24 // ----------------------------------------------------------------------------
       
    25 //
       
    26 TXnPointArray::TXnPointArray( const RArray< TXnPointEntry >& aPoints )
       
    27     : iPoints( aPoints )
       
    28     {
       
    29     }
       
    30 
       
    31 // ----------------------------------------------------------------------------
       
    32 // TXnPointArray length
       
    33 // ----------------------------------------------------------------------------
       
    34 //
       
    35 TInt TXnPointArray::Count() const
       
    36     {
       
    37     return iPoints.Count();
       
    38     }
       
    39 
       
    40 // ----------------------------------------------------------------------------
       
    41 // point at index, no filtering
       
    42 // ----------------------------------------------------------------------------
       
    43 //
       
    44 TPoint TXnPointArray::operator[]( TInt aIndex ) const
       
    45     {
       
    46     return iPoints[aIndex].iPos;
       
    47     }
       
    48 
       
    49 // ----------------------------------------------------------------------------
       
    50 // Unfiltered point at index
       
    51 // ----------------------------------------------------------------------------
       
    52 //
       
    53 const TPoint& TXnPointArray::Raw( TInt aIndex ) const
       
    54     {
       
    55     return iPoints[aIndex].iPos;
       
    56     }