MCPcopy Create free account
hub / github.com/ckaiser/Lightscreen / limitPointToRect

Method limitPointToRect

dialogs/areadialog.cpp:751–757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

749}
750
751QPoint AreaDialog::limitPointToRect(const QPoint &p, const QRect &r) const
752{
753 QPoint q;
754 q.setX(p.x() < r.x() ? r.x() : p.x() < r.right() ? p.x() : r.right());
755 q.setY(p.y() < r.y() ? r.y() : p.y() < r.bottom() ? p.y() : r.bottom());
756 return q;
757}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected