camerauis/cameraapp/generic/src/camlinevfgriddrawer.cpp
branchRCL_3
changeset 25 2c87b2808fd7
parent 24 bac7acad7cb3
equal deleted inserted replaced
24:bac7acad7cb3 25:2c87b2808fd7
     1 /*
     1 /*
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2007-2010 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 *
       
    26 *
    15 *
    27 */
    16 */
    28 
    17 
    29 
    18 
    30 #include <gdi.h>
    19 #include <gdi.h>
   273   TInt i = 0;
   262   TInt i = 0;
   274   while( i < aHorizontalLines )
   263   while( i < aHorizontalLines )
   275     {
   264     {
   276     // Max used to make sure no div-by-zero
   265     // Max used to make sure no div-by-zero
   277     TInt currentY = ((i+indexOffset)*height) / Max(1,aHorizontalLines+countOffset) - KPenHeight/2;
   266     TInt currentY = ((i+indexOffset)*height) / Max(1,aHorizontalLines+countOffset) - KPenHeight/2;
       
   267     currentY += aDrawingRect.iTl.iY; //Offset, due to NHD viewfinder on VGA display
   278     iLineArray.Append( TRect( leftX, currentY, rightX, currentY ) );
   268     iLineArray.Append( TRect( leftX, currentY, rightX, currentY ) );
   279     i++;
   269     i++;
   280     }
   270     }
   281 
   271 
   282   // -----------------------------------
   272   // -----------------------------------