camerauis/cameraapp/generic/src/camlinevfgriddrawer.cpp
branchRCL_3
changeset 67 756ad29ed18e
parent 57 2c87b2808fd7
equal deleted inserted replaced
62:f0c0788c4de2 67:756ad29ed18e
     1 /*
     1 /*
     2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  Implemantation for CCamLineVfGridDrawer class.
    14 * Description:  Implemantation for CCamLineVfGridDrawer class.
       
    15 *
       
    16 *  Copyright © 2007 Nokia.  All rights reserved.
       
    17 *  This material, including documentation and any related computer
       
    18 *  programs, is protected by copyright controlled by Nokia.  All
       
    19 *  rights are reserved.  Copying, including reproducing, storing,
       
    20 *  adapting or translating, any or all of this material requires the
       
    21 *  prior written consent of Nokia.  This material also contains
       
    22 *  confidential information which may not be disclosed to others
       
    23 *  without the prior written consent of Nokia.
       
    24 
       
    25 *
    15 *
    26 *
    16 */
    27 */
    17 
    28 
    18 
    29 
    19 #include <gdi.h>
    30 #include <gdi.h>
   262   TInt i = 0;
   273   TInt i = 0;
   263   while( i < aHorizontalLines )
   274   while( i < aHorizontalLines )
   264     {
   275     {
   265     // Max used to make sure no div-by-zero
   276     // Max used to make sure no div-by-zero
   266     TInt currentY = ((i+indexOffset)*height) / Max(1,aHorizontalLines+countOffset) - KPenHeight/2;
   277     TInt currentY = ((i+indexOffset)*height) / Max(1,aHorizontalLines+countOffset) - KPenHeight/2;
   267     currentY += aDrawingRect.iTl.iY; //Offset, due to NHD viewfinder on VGA display
       
   268     iLineArray.Append( TRect( leftX, currentY, rightX, currentY ) );
   278     iLineArray.Append( TRect( leftX, currentY, rightX, currentY ) );
   269     i++;
   279     i++;
   270     }
   280     }
   271 
   281 
   272   // -----------------------------------
   282   // -----------------------------------