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

Function transformRegionFromRoD

Engine/Transform.cpp:787–802  ·  view source on GitHub ↗

compute the bounding box of the transform of a rectangle

Source from the content-addressed store, hash-verified

785
786// compute the bounding box of the transform of a rectangle
787void
788transformRegionFromRoD(const RectD &srcRect,
789 const Matrix3x3 &transform,
790 RectD &dstRect)
791{
792 /// now transform the 4 corners of the source clip to the output image
793 Point3D p[4];
794
795 p[0] = matApply( transform, Point3D(srcRect.x1, srcRect.y1, 1) );
796 p[1] = matApply( transform, Point3D(srcRect.x1, srcRect.y2, 1) );
797 p[2] = matApply( transform, Point3D(srcRect.x2, srcRect.y2, 1) );
798 p[3] = matApply( transform, Point3D(srcRect.x2, srcRect.y1, 1) );
799
800
801 transformRegionFromPoints(p, dstRect);
802}
803} //namespace Transform
804NATRON_NAMESPACE_EXIT
805

Callers 1

transformInputRoisMethod · 0.85

Calls 3

matApplyFunction · 0.85
Point3DClass · 0.85

Tested by

no test coverage detected