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

Method getProjectOffset

Engine/OfxImageEffectInstance.cpp:341–357  ·  view source on GitHub ↗

The offset of the current project in canonical coordinates. The offset is related to the kOfxImageEffectPropProjectSize and is the offset from the origin of the project 'subwindow'. For example for a PAL SD project that is in letterbox form, the project offset is the offset to the bottom left hand corner of the letter box. The project offset is in canonical coordinates.

Source from the content-addressed store, hash-verified

339// project offset is the offset to the bottom left hand corner of the letter box. The project
340// offset is in canonical coordinates.
341void
342OfxImageEffectInstance::getProjectOffset(double & xOffset,
343 double & yOffset) const
344{
345 Format f;
346
347 _ofxEffectInstance.lock()->getApp()->getProject()->getProjectDefaultFormat(&f);
348 RectI pixelF;
349 pixelF.x1 = f.x1;
350 pixelF.x2 = f.x2;
351 pixelF.y1 = f.y1;
352 pixelF.y2 = f.y2;
353 RectD canonicalF;
354 pixelF.toCanonical_noClipping(0, f.getPixelAspectRatio(), &canonicalF);
355 xOffset = canonicalF.left();
356 yOffset = canonicalF.bottom();
357}
358
359// The extent of the current project in canonical coordinates.
360// The extent is the size of the 'output' for the current project. See ProjectCoordinateSystems

Callers

nothing calls this directly

Calls 8

getProjectMethod · 0.80
getAppMethod · 0.45
lockMethod · 0.45
getPixelAspectRatioMethod · 0.45
leftMethod · 0.45
bottomMethod · 0.45

Tested by

no test coverage detected