Changeset 57140 in vbox
- Timestamp:
- Jul 31, 2015 12:11:27 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 101882
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r56359 r57140 294 294 295 295 /** Returns the transformation mode corresponding to the passed @a dScaleFactor and ScalingOptimizationType. */ 296 static Qt::TransformationMode transformationMode( double dScaleFactor, ScalingOptimizationType type);296 static Qt::TransformationMode transformationMode(ScalingOptimizationType type, double dScaleFactor = 0); 297 297 298 298 /** Erases corresponding @a rect with @a painter. */ … … 1347 1347 scaledImage = m_image.copy(); 1348 1348 /* And scaling the image to predefined scaled-factor: */ 1349 scaledImage = scaledImage.scaled(m_scaledSize, Qt::IgnoreAspectRatio, 1350 transformationMode(m_dScaleFactor, scalingOptimizationType())); 1349 switch (m_pMachineView->visualStateType()) 1350 { 1351 case UIVisualStateType_Scale: 1352 scaledImage = scaledImage.scaled(m_scaledSize, Qt::IgnoreAspectRatio, 1353 transformationMode(scalingOptimizationType())); 1354 break; 1355 default: 1356 scaledImage = scaledImage.scaled(m_scaledSize, Qt::IgnoreAspectRatio, 1357 transformationMode(scalingOptimizationType(), m_dScaleFactor)); 1358 break; 1359 } 1351 1360 } 1352 1361 /* Finally we are choosing image to paint from: */ … … 1388 1397 scaledImage = m_image.copy(); 1389 1398 /* And scaling the image to predefined scaled-factor: */ 1390 scaledImage = scaledImage.scaled(m_scaledSize, Qt::IgnoreAspectRatio, 1391 transformationMode(m_dScaleFactor, scalingOptimizationType())); 1399 switch (m_pMachineView->visualStateType()) 1400 { 1401 case UIVisualStateType_Scale: 1402 scaledImage = scaledImage.scaled(m_scaledSize, Qt::IgnoreAspectRatio, 1403 transformationMode(scalingOptimizationType())); 1404 break; 1405 default: 1406 scaledImage = scaledImage.scaled(m_scaledSize, Qt::IgnoreAspectRatio, 1407 transformationMode(scalingOptimizationType(), m_dScaleFactor)); 1408 break; 1409 } 1392 1410 } 1393 1411 /* Finally we are choosing image to paint from: */ … … 1445 1463 1446 1464 /* static */ 1447 Qt::TransformationMode UIFrameBufferPrivate::transformationMode( double dScaleFactor, ScalingOptimizationType type)1465 Qt::TransformationMode UIFrameBufferPrivate::transformationMode(ScalingOptimizationType type, double dScaleFactor /* = 0 */) 1448 1466 { 1449 1467 switch (type) … … 1454 1472 } 1455 1473 /* For integer-scaling we are choosing the 'Performance' optimization type ourselves: */ 1456 return floor(dScaleFactor) == dScaleFactor ? Qt::FastTransformation : Qt::SmoothTransformation;1474 return dScaleFactor && floor(dScaleFactor) == dScaleFactor ? Qt::FastTransformation : Qt::SmoothTransformation;; 1457 1475 } 1458 1476
Note:
See TracChangeset
for help on using the changeset viewer.