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

Method getProjectExtent

Engine/OfxImageEffectInstance.cpp:345–361  ·  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 infomation 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

343// returns the top right position, as the extent is always rooted at 0,0. For example a PAL SD
344// project would have an extent of 768, 576.
345void
346OfxImageEffectInstance::getProjectExtent(double & xSize,
347 double & ySize) const
348{
349 Format f;
350
351 _ofxEffectInstance.lock()->getApp()->getProject()->getProjectDefaultFormat(&f);
352 RectI pixelF;
353 pixelF.x1 = f.x1;
354 pixelF.x2 = f.x2;
355 pixelF.y1 = f.y1;
356 pixelF.y2 = f.y2;
357 RectD canonicalF;
358 pixelF.toCanonical_noClipping(0, f.getPixelAspectRatio(), &canonicalF);
359 xSize = canonicalF.right();
360 ySize = canonicalF.top();
361}
362
363// The pixel aspect ratio of the current project
364double

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