@@ -26,6 +26,8 @@ MIDIContentViewer::MIDIContentViewer(
26
26
juce::Image::ARGB, 1 , 1 , false );
27
27
this ->blockTemp = std::make_unique<juce::Image>(
28
28
juce::Image::ARGB, 1 , 1 , false );
29
+ this ->noteTemp = std::make_unique<juce::Image>(
30
+ juce::Image::ARGB, 1 , 1 , false );
29
31
}
30
32
31
33
void MIDIContentViewer::update (int index, uint64_t ref) {
@@ -172,6 +174,11 @@ void MIDIContentViewer::resized() {
172
174
this ->blockTemp = std::make_unique<juce::Image>(
173
175
juce::Image::ARGB, width, height, false );
174
176
this ->updateBlockImageTemp ();
177
+
178
+ /* * Update Note Temp */
179
+ this ->noteTemp = std::make_unique<juce::Image>(
180
+ juce::Image::ARGB, width, height, false );
181
+ this ->updateNoteImageTemp ();
175
182
}
176
183
177
184
void MIDIContentViewer::paint (juce::Graphics& g) {
@@ -189,6 +196,11 @@ void MIDIContentViewer::paint(juce::Graphics& g) {
189
196
if (this ->blockTemp ) {
190
197
g.drawImageAt (*(this ->blockTemp .get ()), 0 , 0 );
191
198
}
199
+
200
+ /* * Note Temp */
201
+ if (this ->noteTemp ) {
202
+ g.drawImageAt (*(this ->noteTemp .get ()), 0 , 0 );
203
+ }
192
204
}
193
205
194
206
void MIDIContentViewer::paintOverChildren (juce::Graphics& g) {
@@ -467,6 +479,10 @@ void MIDIContentViewer::updateBlockImageTemp() {
467
479
}
468
480
469
481
void MIDIContentViewer::updateNoteImageTemp () {
482
+ /* * Clear Temp */
483
+ this ->noteTemp ->clear (this ->noteTemp ->getBounds ());
484
+ juce::Graphics g (*(this ->noteTemp .get ()));
485
+
470
486
/* * TODO */
471
487
}
472
488
0 commit comments