| 21 | } |
| 22 | |
| 23 | void Keyboard::drawWhiteKey(int midiNoteNumber, Graphics& g, Rectangle<float> area) |
| 24 | { |
| 25 | g.setColour(juce::Colours::white); |
| 26 | g.fillRect(area); |
| 27 | |
| 28 | g.setColour(juce::Colours::darkgrey); |
| 29 | g.drawRect(area, 0.5); |
| 30 | |
| 31 | if (midiNoteNumber % 12 == 0) { |
| 32 | int octave_number = midiNoteNumber / 12 - 1; |
| 33 | g.setFont(getKeyWidth() - 3); |
| 34 | g.drawText("C" + std::to_string(octave_number), |
| 35 | area.withTrimmedLeft(getBlackNoteLength()), |
| 36 | juce::Justification::centred); |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | void Keyboard::drawBlackKey(int midiNoteNumber, Graphics& g, Rectangle<float> area) |
| 41 | { |
nothing calls this directly
no outgoing calls
no test coverage detected