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

Method getProjectExtent

Engine/OfxImageEffectInstance.cpp:364–380  ·  view source on GitHub ↗

The extent of the current project in canonical coordinates. The extent is the size of the 'output' for the current project. See ProjectCoordinateSystems for more information on the project extent. The extent is in canonical coordinates and only returns the top right position, as the extent is always rooted at 0,0. For example a PAL SD project would have an extent of 768, 576.

Source from the content-addressed store, hash-verified

362// returns the top right position, as the extent is always rooted at 0,0. For example a PAL SD
363// project would have an extent of 768, 576.
364void
365OfxImageEffectInstance::getProjectExtent(double & xSize,
366 double & ySize) const
367{
368 Format f;
369
370 _ofxEffectInstance.lock()->getApp()->getProject()->getProjectDefaultFormat(&f);
371 RectI pixelF;
372 pixelF.x1 = f.x1;
373 pixelF.x2 = f.x2;
374 pixelF.y1 = f.y1;
375 pixelF.y2 = f.y2;
376 RectD canonicalF;
377 pixelF.toCanonical_noClipping(0, f.getPixelAspectRatio(), &canonicalF);
378 xSize = canonicalF.right();
379 ySize = canonicalF.top();
380}
381
382// The pixel aspect ratio of the current project
383double

Callers

nothing calls this directly

Calls 8

getProjectMethod · 0.80
getAppMethod · 0.45
lockMethod · 0.45
getPixelAspectRatioMethod · 0.45
rightMethod · 0.45
topMethod · 0.45

Tested by

no test coverage detected