MCPcopy Create free account
hub / github.com/andrewreeman/SpectralSuite / movePointWithMouse

Method movePointWithMouse

shared/components/ControlPointComponent.cpp:178–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178void ControlPointComponent::movePointWithMouse(const juce::Point<int> &mouseDownPosition) {
179 int newX = clipX(mouseDownPosition.getX(), draggedPointIndex);
180 int newY = clipY(mouseDownPosition.getY(), draggedPointIndex);
181 draggedPoint->setXY(newX, newY);
182 this->repaint();
183}
184
185juce::Point<int>* ControlPointComponent::findNearbyPoint(juce::Point<int> pointToCompare, int* out_nearestPointIndex = nullptr) {
186 for(int i=0; i<points.size(); ++i) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected