| 89 | } |
| 90 | |
| 91 | bool MapScaleAnimation::GetProperty(Object object, ObjectProperty property, bool targetValue, |
| 92 | PropertyValue & value) const |
| 93 | { |
| 94 | ASSERT_EQUAL(static_cast<int>(object), static_cast<int>(Animation::Object::MapPlane), ()); |
| 95 | |
| 96 | if (property == Animation::ObjectProperty::Position) |
| 97 | { |
| 98 | ScreenBase screen = AnimationSystem::Instance().GetLastScreen(); |
| 99 | screen.SetScale(targetValue ? m_scaleInterpolator.GetTargetScale() : m_scaleInterpolator.GetScale()); |
| 100 | m2::PointD const pixelOffset = screen.PixelRect().Center() - screen.P3dtoP(m_pxScaleCenter); |
| 101 | value = PropertyValue(screen.PtoG(screen.GtoP(m_globalScaleCenter) + pixelOffset)); |
| 102 | return true; |
| 103 | } |
| 104 | if (property == Animation::ObjectProperty::Scale) |
| 105 | { |
| 106 | value = PropertyValue(targetValue ? m_scaleInterpolator.GetTargetScale() : m_scaleInterpolator.GetScale()); |
| 107 | return true; |
| 108 | } |
| 109 | ASSERT(false, ("Wrong property:", static_cast<int>(property))); |
| 110 | return false; |
| 111 | } |
| 112 | |
| 113 | bool MapScaleAnimation::GetTargetProperty(Object object, ObjectProperty property, PropertyValue & value) const |
| 114 | { |
nothing calls this directly
no test coverage detected