equal
deleted
inserted
replaced
45 // ============================ MEMBER FUNCTIONS =============================== |
45 // ============================ MEMBER FUNCTIONS =============================== |
46 |
46 |
47 void TGlxZoomAndPanMathsEngine::Initialize(TPoint& aCenter, |
47 void TGlxZoomAndPanMathsEngine::Initialize(TPoint& aCenter, |
48 TSize& aScreenSize, |
48 TSize& aScreenSize, |
49 TSize& aImageSize, |
49 TSize& aImageSize, |
50 TSize& aOriginalZoomedDimensions, |
50 TSize& /*aOriginalZoomedDimensions*/, |
51 TUint8 aInitialZoomRatio) |
51 TUint8 aInitialZoomRatio) |
52 { |
52 { |
53 TRACER("void TGlxZoomAndPanMathsEngine::Initialize()"); |
53 TRACER("void TGlxZoomAndPanMathsEngine::Initialize()"); |
54 |
54 |
55 iCenter = aCenter; |
55 iCenter = aCenter; |
231 |
231 |
232 TSize imageDimension = TSize(iActualImageSize); |
232 TSize imageDimension = TSize(iActualImageSize); |
233 imageDimension.iWidth = (imageDimension.iWidth * newZoomRatio)/100; |
233 imageDimension.iWidth = (imageDimension.iWidth * newZoomRatio)/100; |
234 imageDimension.iHeight = (imageDimension.iHeight * newZoomRatio)/100; |
234 imageDimension.iHeight = (imageDimension.iHeight * newZoomRatio)/100; |
235 |
235 |
236 // Is image size bigger than screen size AND image is panned to such an extent that |
236 // Check if image size is bigger than screen size AND image is panned to such an extent that |
237 // the an edge of the image comes within the screen rectange? If so go ahead, |
237 // the an edge of the image comes within the screen rectange. If so go ahead, |
238 // for everything else there is mastercard. I mean the else condition below. |
238 // for everything else there is mastercard. I mean the else condition below. |
239 // [TODO] The master card however needs more simplification. |
239 // [TODO] The master card however needs more simplification. |
240 if( |
240 if( |
241 ((iImageVirtualSize.iHeight > iScreenSize.iHeight) |
241 ((iImageVirtualSize.iHeight > iScreenSize.iHeight) |
242 && (iImageVirtualSize.iWidth > iScreenSize.iWidth)) |
242 && (iImageVirtualSize.iWidth > iScreenSize.iWidth)) |
390 |
390 |
391 //------------------------------------------------------------------------------------- |
391 //------------------------------------------------------------------------------------- |
392 // UpdatePanFactor: Calculates the Pan Factor based on time the key was pressed |
392 // UpdatePanFactor: Calculates the Pan Factor based on time the key was pressed |
393 //------------------------------------------------------------------------------------- |
393 //------------------------------------------------------------------------------------- |
394 // |
394 // |
395 void TGlxZoomAndPanMathsEngine::UpdatePanFactor(TTime& aPanTime) |
395 void TGlxZoomAndPanMathsEngine::UpdatePanFactor(TTime& /*aPanTime*/) |
396 { |
396 { |
397 TRACER("void TGlxZoomAndPanMathsEngine::UpdatePanFactor()"); |
397 TRACER("void TGlxZoomAndPanMathsEngine::UpdatePanFactor()"); |
398 |
398 |
399 iContinuousPanOperations++; |
399 iContinuousPanOperations++; |
400 |
400 |