| 1356 | } // ViewerGL::getImageRectangleDisplayed |
| 1357 | |
| 1358 | RectI |
| 1359 | ViewerGL::getExactImageRectangleDisplayed(int texIndex, |
| 1360 | const RectD & rod, |
| 1361 | const double par, |
| 1362 | unsigned int mipMapLevel) |
| 1363 | { |
| 1364 | bool clipToFormat = isClippingImageToFormat(); |
| 1365 | RectD clippedRod; |
| 1366 | |
| 1367 | if (clipToFormat) { |
| 1368 | rod.intersect(_imp->displayTextures[texIndex].format, &clippedRod); |
| 1369 | } else { |
| 1370 | clippedRod = rod; |
| 1371 | } |
| 1372 | |
| 1373 | RectI bounds; |
| 1374 | clippedRod.toPixelEnclosing(mipMapLevel, par, &bounds); |
| 1375 | RectI roi = getImageRectangleDisplayed(bounds, par, mipMapLevel); |
| 1376 | |
| 1377 | return roi; |
| 1378 | } |
| 1379 | |
| 1380 | RectI |
| 1381 | ViewerGL::getImageRectangleDisplayedRoundedToTileSize(int texIndex, |
no test coverage detected