compute the bounding box of the transform of a rectangle
| 785 | |
| 786 | // compute the bounding box of the transform of a rectangle |
| 787 | void |
| 788 | transformRegionFromRoD(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 |
| 804 | NATRON_NAMESPACE_EXIT |
| 805 |
no test coverage detected