imageeditor/ImageEditorUI/src/PreviewControlBase.cpp
changeset 8 18b321db4884
parent 1 edfc90759b9f
equal deleted inserted replaced
1:edfc90759b9f 8:18b321db4884
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 
    20 
    21 #include "PreviewControlBase.h"
    21 #include "PreviewControlBase.h"
       
    22 #include <AknUtils.h>
    22 
    23 
    23 //=============================================================================
    24 //=============================================================================
    24 EXPORT_C CPreviewControlBase * CPreviewControlBase::NewL (
    25 EXPORT_C CPreviewControlBase * CPreviewControlBase::NewL (
    25 	const TRect &		aRect,
    26 	const TRect &		aRect,
    26 	CCoeControl	*		aParent
    27 	CCoeControl	*		aParent
    43 	SetContainerWindowL (*aParent);
    44 	SetContainerWindowL (*aParent);
    44     
    45     
    45 	//	Set extent
    46 	//	Set extent
    46     SetRect (aRect);
    47     SetRect (aRect);
    47 
    48 
       
    49     iStatuspaneHeight = aRect.iBr.iY;
    48     //  Activate
    50     //  Activate
    49     ActivateL();
    51     ActivateL();
    50 }
    52 }
    51 
    53 
    52 //=============================================================================
    54 //=============================================================================
    76     // Set graphics context parameters
    78     // Set graphics context parameters
    77 	gc.SetPenStyle (CGraphicsContext::ESolidPen);
    79 	gc.SetPenStyle (CGraphicsContext::ESolidPen);
    78 	gc.SetPenColor (KRgbBlack);
    80 	gc.SetPenColor (KRgbBlack);
    79     gc.SetBrushStyle (CGraphicsContext::ESolidBrush);
    81     gc.SetBrushStyle (CGraphicsContext::ESolidBrush);
    80 	gc.SetBrushColor (KRgbBlack);
    82 	gc.SetBrushColor (KRgbBlack);
    81 
    83 //	TRect rect;
       
    84 //	AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EApplicationWindow,rect );
       
    85 //	TRect ImageRect(iSysPars->VisibleImageRectPrev());
       
    86 //
       
    87 //	TInt ImageStartPosition = (rect.Height() - aRect.Height())/2;
    82 	//	Draw preview image if found
    88 	//	Draw preview image if found
    83 	if ( iPreview && iPreview->Handle() )
    89 	if ( iPreview && iPreview->Handle() )
    84 	{
    90 	{
    85 		gc.BitBlt (TPoint(0,0), iPreview);
    91 		gc.BitBlt (TPoint(0,iStatuspaneHeight), iPreview);
    86 	}
    92 	}
    87     else
    93     else
    88     {
    94     {
    89         gc.DrawRect (aRect);
    95         gc.DrawRect (aRect);
    90     }
    96     }