| 640 | } |
| 641 | |
| 642 | void Multiband::setMasks(juce::Graphics& g, int index, int lineNumLimit, int x, int y, int width, int height, int mouseX, int mouseY) |
| 643 | { |
| 644 | // set focus mask |
| 645 | if (lineNum > lineNumLimit && focusIndex == index) |
| 646 | { |
| 647 | // MODIFIED: Changed gradient to be top-down and relative to the band's rectangle. |
| 648 | juce::ColourGradient grad(COLOUR1.withAlpha(0.5f), |
| 649 | (float) x, |
| 650 | (float) y, |
| 651 | COLOUR1.withAlpha(0.0f), |
| 652 | (float) x, |
| 653 | (float) (y + height * 0.1f), |
| 654 | false); |
| 655 | g.setGradientFill(grad); |
| 656 | g.fillRect(x, y, juce::jmax(0, width), juce::jmax(0, height)); |
| 657 | } |
| 658 | |
| 659 | // set mouse enter white mask |
| 660 | if (! isDragging && lineNum > lineNumLimit && mouseX > x && mouseX < x + width && mouseY > y && mouseY < height) |
| 661 | { |
| 662 | if (focusIndex != index) |
| 663 | { |
| 664 | g.setColour(COLOUR_MASK_WHITE); |
| 665 | g.fillRect(x, y, juce::jmax(0, width), juce::jmax(0, height)); |
| 666 | } |
| 667 | bandUIs[index].closeButton->setVisible(true); |
| 668 | } |
| 669 | |
| 670 | // set solo black mask |
| 671 | if (lineNum > lineNumLimit && shouldSetBlackMask(index)) |
| 672 | { |
| 673 | g.setColour(COLOUR_MASK_BLACK); |
| 674 | g.fillRect(x, y, juce::jmax(0, width), juce::jmax(0, height)); |
| 675 | } |
| 676 | } |
| 677 | |
| 678 | // Gets the enable and solo state for a specific band. |
| 679 | Multiband::BandState Multiband::getBandState(int bandIndex) |
nothing calls this directly
no outgoing calls
no test coverage detected