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

Method getProjectOffset

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

320// project offset is the offset to the bottom left hand corner of the letter box. The project
321// offset is in canonical coordinates.
322void
323OfxImageEffectInstance::getProjectOffset(double & xOffset,
324 double & yOffset) const
325{
326 Format f;
327
328 _ofxEffectInstance.lock()->getApp()->getProject()->getProjectDefaultFormat(&f);
329 RectI pixelF;
330 pixelF.x1 = f.x1;
331 pixelF.x2 = f.x2;
332 pixelF.y1 = f.y1;
333 pixelF.y2 = f.y2;
334 RectD canonicalF;
335 pixelF.toCanonical_noClipping(0, f.getPixelAspectRatio(), &canonicalF);
336 xOffset = canonicalF.left();
337 yOffset = canonicalF.bottom();
338}
339
340// The extent of the current project in canonical coordinates.
341// 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