| 293 | } |
| 294 | |
| 295 | bool IsPanningAndRotate(ScreenBase const & s1, ScreenBase const & s2) |
| 296 | { |
| 297 | m2::RectD const & r1 = s1.GlobalRect().GetLocalRect(); |
| 298 | m2::RectD const & r2 = s2.GlobalRect().GetLocalRect(); |
| 299 | |
| 300 | m2::PointD c1 = r1.Center(); |
| 301 | m2::PointD c2 = r2.Center(); |
| 302 | |
| 303 | m2::PointD globPt(c1.x - r1.minX(), c1.y - r1.minY()); |
| 304 | |
| 305 | m2::PointD p1 = s1.GtoP(s1.GlobalRect().ConvertFrom(c1)) - s1.GtoP(s1.GlobalRect().ConvertFrom(c1 + globPt)); |
| 306 | m2::PointD p2 = s2.GtoP(s2.GlobalRect().ConvertFrom(c2)) - s2.GtoP(s2.GlobalRect().ConvertFrom(c2 + globPt)); |
| 307 | |
| 308 | return p1.EqualDxDy(p2, 0.00001); |
| 309 | } |
| 310 | |
| 311 | void ScreenBase::ExtractGtoPParams(MatrixT const & m, double & a, double & s, double & dx, double & dy) |
| 312 | { |