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

Method getProjectSize

Engine/OfxImageEffectInstance.cpp:318–334  ·  view source on GitHub ↗

The size of the current project in canonical coordinates. The size of a project is a sub set of the kOfxImageEffectPropProjectExtent. For example a project may be a PAL SD project, but only be a letter-box within that. The project size is the size of this sub window.

Source from the content-addressed store, hash-verified

316// project may be a PAL SD project, but only be a letter-box within that. The project size is
317// the size of this sub window.
318void
319OfxImageEffectInstance::getProjectSize(double & xSize,
320 double & ySize) const
321{
322 Format f;
323
324 _ofxEffectInstance.lock()->getApp()->getProject()->getProjectDefaultFormat(&f);
325 RectI pixelF;
326 pixelF.x1 = f.x1;
327 pixelF.x2 = f.x2;
328 pixelF.y1 = f.y1;
329 pixelF.y2 = f.y2;
330 RectD canonicalF;
331 pixelF.toCanonical_noClipping(0, f.getPixelAspectRatio(), &canonicalF);
332 xSize = canonicalF.width();
333 ySize = canonicalF.height();
334}
335
336// The offset of the current project in canonical coordinates.
337// The offset is related to the kOfxImageEffectPropProjectSize and is the offset from the origin

Callers

nothing calls this directly

Calls 8

getProjectMethod · 0.80
getAppMethod · 0.45
lockMethod · 0.45
getPixelAspectRatioMethod · 0.45
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected