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

Method getProjectSize

Engine/OfxImageEffectInstance.cpp:299–315  ·  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

297// project may be a PAL SD project, but only be a letter-box within that. The project size is
298// the size of this sub window.
299void
300OfxImageEffectInstance::getProjectSize(double & xSize,
301 double & ySize) const
302{
303 Format f;
304
305 _ofxEffectInstance.lock()->getApp()->getProject()->getProjectDefaultFormat(&f);
306 RectI pixelF;
307 pixelF.x1 = f.x1;
308 pixelF.x2 = f.x2;
309 pixelF.y1 = f.y1;
310 pixelF.y2 = f.y2;
311 RectD canonicalF;
312 pixelF.toCanonical_noClipping(0, f.getPixelAspectRatio(), &canonicalF);
313 xSize = canonicalF.width();
314 ySize = canonicalF.height();
315}
316
317// The offset of the current project in canonical coordinates.
318// 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