Mercurial > hg > svgui
comparison view/View.cpp @ 1355:b9bfcb8cd5a1
Remove some debug bits
author | Chris Cannam |
---|---|
date | Wed, 10 Oct 2018 14:50:47 +0100 |
parents | 40b9a495a0e0 |
children | 93eaff6f206d |
comparison
equal
deleted
inserted
replaced
1354:40b9a495a0e0 | 1355:b9bfcb8cd5a1 |
---|---|
1505 break; | 1505 break; |
1506 } | 1506 } |
1507 level = getZoomConstraintLevel | 1507 level = getZoomConstraintLevel |
1508 (level.incremented(), ZoomConstraint::RoundUp); | 1508 (level.incremented(), ZoomConstraint::RoundUp); |
1509 } | 1509 } |
1510 cerr << "View::countZoomLevels: " << n << endl; | 1510 // cerr << "View::countZoomLevels: " << n << endl; |
1511 return n; | 1511 return n; |
1512 } | 1512 } |
1513 | 1513 |
1514 ZoomLevel | 1514 ZoomLevel |
1515 View::getZoomLevelByIndex(int ix) const | 1515 View::getZoomLevelByIndex(int ix) const |
1518 ZoomLevel min = ZoomConstraint().getMinZoomLevel(); | 1518 ZoomLevel min = ZoomConstraint().getMinZoomLevel(); |
1519 ZoomLevel max = ZoomConstraint().getMaxZoomLevel(); | 1519 ZoomLevel max = ZoomConstraint().getMaxZoomLevel(); |
1520 ZoomLevel level = min; | 1520 ZoomLevel level = min; |
1521 while (true) { | 1521 while (true) { |
1522 if (n == ix) { | 1522 if (n == ix) { |
1523 cerr << "View::getZoomLevelByIndex: " << ix << " -> " << level | 1523 // cerr << "View::getZoomLevelByIndex: " << ix << " -> " << level |
1524 << endl; | 1524 // << endl; |
1525 return level; | 1525 return level; |
1526 } | 1526 } |
1527 ++n; | 1527 ++n; |
1528 if (level == max) { | 1528 if (level == max) { |
1529 break; | 1529 break; |
1530 } | 1530 } |
1531 level = getZoomConstraintLevel | 1531 level = getZoomConstraintLevel |
1532 (level.incremented(), ZoomConstraint::RoundUp); | 1532 (level.incremented(), ZoomConstraint::RoundUp); |
1533 } | 1533 } |
1534 cerr << "View::getZoomLevelByIndex: " << ix << " -> " << max << " (max)" | 1534 // cerr << "View::getZoomLevelByIndex: " << ix << " -> " << max << " (max)" |
1535 << endl; | 1535 // << endl; |
1536 return max; | 1536 return max; |
1537 } | 1537 } |
1538 | 1538 |
1539 int | 1539 int |
1540 View::getZoomLevelIndex(ZoomLevel z) const | 1540 View::getZoomLevelIndex(ZoomLevel z) const |
1543 ZoomLevel min = ZoomConstraint().getMinZoomLevel(); | 1543 ZoomLevel min = ZoomConstraint().getMinZoomLevel(); |
1544 ZoomLevel max = ZoomConstraint().getMaxZoomLevel(); | 1544 ZoomLevel max = ZoomConstraint().getMaxZoomLevel(); |
1545 ZoomLevel level = min; | 1545 ZoomLevel level = min; |
1546 while (true) { | 1546 while (true) { |
1547 if (z == level) { | 1547 if (z == level) { |
1548 cerr << "View::getZoomLevelIndex: " << z << " -> " << n | 1548 // cerr << "View::getZoomLevelIndex: " << z << " -> " << n |
1549 << endl; | 1549 // << endl; |
1550 return n; | 1550 return n; |
1551 } | 1551 } |
1552 ++n; | 1552 ++n; |
1553 if (level == max) { | 1553 if (level == max) { |
1554 break; | 1554 break; |
1555 } | 1555 } |
1556 level = getZoomConstraintLevel | 1556 level = getZoomConstraintLevel |
1557 (level.incremented(), ZoomConstraint::RoundUp); | 1557 (level.incremented(), ZoomConstraint::RoundUp); |
1558 } | 1558 } |
1559 cerr << "View::getZoomLevelIndex: " << z << " -> " << n << " (max)" | 1559 // cerr << "View::getZoomLevelIndex: " << z << " -> " << n << " (max)" |
1560 << endl; | 1560 // << endl; |
1561 return n; | 1561 return n; |
1562 } | 1562 } |
1563 | 1563 |
1564 bool | 1564 bool |
1565 View::areLayerColoursSignificant() const | 1565 View::areLayerColoursSignificant() const |