MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / getExactImageRectangleDisplayed

Method getExactImageRectangleDisplayed

Gui/ViewerGL.cpp:1358–1378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1356} // ViewerGL::getImageRectangleDisplayed
1357
1358RectI
1359ViewerGL::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
1380RectI
1381ViewerGL::getImageRectangleDisplayedRoundedToTileSize(int texIndex,

Callers 1

Calls 2

toPixelEnclosingMethod · 0.80
intersectMethod · 0.45

Tested by

no test coverage detected