| 183 | } |
| 184 | |
| 185 | juce::Point<int>* ControlPointComponent::findNearbyPoint(juce::Point<int> pointToCompare, int* out_nearestPointIndex = nullptr) { |
| 186 | for(int i=0; i<points.size(); ++i) { |
| 187 | auto p = &points.getReference(i); |
| 188 | |
| 189 | if(POINTS_ARE_CLOSE(p, pointToCompare)) { |
| 190 | if(out_nearestPointIndex != nullptr) { |
| 191 | *out_nearestPointIndex = i; |
| 192 | } |
| 193 | |
| 194 | return p; |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | return nullptr; |
| 199 | } |
| 200 | |
| 201 | int ControlPointComponent::clipX(int newX, int pointIndex) { |
| 202 | if(pointIndex == 0) { |
nothing calls this directly
no outgoing calls
no test coverage detected