| 644 | } |
| 645 | |
| 646 | void LfoEditor::removePoint(int index) |
| 647 | { |
| 648 | if (! dataIsActive || index <= 0 || index >= activeLfoData.points.size() - 1) |
| 649 | return; |
| 650 | |
| 651 | activeLfoData.points.erase(activeLfoData.points.begin() + index); |
| 652 | |
| 653 | // Removing a point merges two segments. We must remove one curvature value. |
| 654 | // We remove the curvature of the first of the two merged segments. |
| 655 | activeLfoData.curvatures.erase(activeLfoData.curvatures.begin() + index - 1); |
| 656 | |
| 657 | // We then set the curvature of the new, merged segment to 0.0 (linear). |
| 658 | if (index - 1 < activeLfoData.curvatures.size()) |
| 659 | { |
| 660 | activeLfoData.curvatures[index - 1] = 0.0f; |
| 661 | } |
| 662 | |
| 663 | repaint(); |
| 664 | } |
| 665 | |
| 666 | juce::Point<float> LfoEditor::toNormalized(juce::Point<int> localPoint) |
| 667 | { |
nothing calls this directly
no outgoing calls
no test coverage detected