MCPcopy Create free account
hub / github.com/DISTRHO/DPF / recheckArea

Function recheckArea

dgl/src/ImageBaseWidgets.cpp:489–507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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};

Callers

nothing calls this directly

Calls 2

getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected