| 217 | // ------------------------------------------------------------------------------------ |
| 218 | |
| 219 | inline point_transform_affine unnormalizing_tform ( |
| 220 | const rectangle& rect |
| 221 | ) |
| 222 | /*! |
| 223 | ensures |
| 224 | - returns a transform that maps (0,0) to rect.tl_corner() and (1,1) to |
| 225 | rect.br_corner(). |
| 226 | !*/ |
| 227 | { |
| 228 | std::vector<vector<float,2> > from_points, to_points; |
| 229 | to_points.push_back(rect.tl_corner()); from_points.push_back(point(0,0)); |
| 230 | to_points.push_back(rect.tr_corner()); from_points.push_back(point(1,0)); |
| 231 | to_points.push_back(rect.br_corner()); from_points.push_back(point(1,1)); |
| 232 | return find_affine_transform(from_points, to_points); |
| 233 | } |
| 234 | |
| 235 | // ------------------------------------------------------------------------------------ |
| 236 | |