| 487 | sliderArea() {} |
| 488 | |
| 489 | void recheckArea() noexcept |
| 490 | { |
| 491 | if (startPos.getY() == endPos.getY()) |
| 492 | { |
| 493 | // horizontal |
| 494 | sliderArea = Rectangle<double>(startPos.getX(), |
| 495 | startPos.getY(), |
| 496 | endPos.getX() + static_cast<int>(image.getWidth()) - startPos.getX(), |
| 497 | static_cast<int>(image.getHeight())); |
| 498 | } |
| 499 | else |
| 500 | { |
| 501 | // vertical |
| 502 | sliderArea = Rectangle<double>(startPos.getX(), |
| 503 | startPos.getY(), |
| 504 | static_cast<int>(image.getWidth()), |
| 505 | endPos.getY() + static_cast<int>(image.getHeight()) - startPos.getY()); |
| 506 | } |
| 507 | } |
| 508 | |
| 509 | DISTRHO_DECLARE_NON_COPYABLE(PrivateData) |
| 510 | }; |