| 251 | } |
| 252 | |
| 253 | void FlatImageView::SetDisplayScaleStable(float newScale, dm::int2 stablePoint) |
| 254 | { |
| 255 | const float2 stableUv = WindowPosToUv(stablePoint); |
| 256 | const float2 splitUv = WindowPosToUv(int2(m_splitPosition, 0)); |
| 257 | |
| 258 | m_displayScale = newScale; |
| 259 | |
| 260 | // Move the center using the difference between where the mouse cursor actually is |
| 261 | // and where it is predicted to be using the new scale |
| 262 | m_textureCenterOffset += stablePoint - UvToWindowPos(stableUv); |
| 263 | |
| 264 | // Move the split to maintain its position relative to the image |
| 265 | m_splitPosition = UvToWindowPos(splitUv).x; |
| 266 | } |
| 267 | |
| 268 | bool FlatImageView::MouseScrollUpdate(double xoffset, double yoffset) |
| 269 | { |
nothing calls this directly
no outgoing calls
no test coverage detected