| 377 | } |
| 378 | |
| 379 | void Editor::setDefaultScroll() |
| 380 | { |
| 381 | View* view = View::getView(this); |
| 382 | Rect vp = view->viewportBounds(); |
| 383 | |
| 384 | setEditorScroll( |
| 385 | gfx::Point( |
| 386 | m_padding.x - vp.w/2 + m_zoom.apply(m_sprite->width())/2, |
| 387 | m_padding.y - vp.h/2 + m_zoom.apply(m_sprite->height())/2)); |
| 388 | } |
| 389 | |
| 390 | // Sets the scroll position of the editor |
| 391 | void Editor::setEditorScroll(const gfx::Point& scroll) |
no test coverage detected