MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / DrawModule

Method DrawModule

Source/SlowLayers.cpp:116–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116void SlowLayers::DrawModule()
117{
118 if (Minimized() || IsVisible() == false)
119 return;
120
121 ofPushMatrix();
122
123 ofTranslate(BUFFER_X, BUFFER_Y);
124
125 DrawAudioBuffer(BUFFER_W, BUFFER_H, mBuffer, 0, LoopLength(), TheTransport->GetMeasurePos(gTime) * LoopLength(), mVol);
126 ofSetColor(255, 255, 0, gModuleDrawAlpha);
127 for (int i = 1; i < mNumBars; ++i)
128 {
129 float x = BUFFER_W / mNumBars * i;
130 ofLine(x, BUFFER_H / 2 - 5, x, BUFFER_H / 2 + 5);
131 }
132 ofSetColor(255, 255, 255, gModuleDrawAlpha);
133
134 ofPopMatrix();
135
136 mClearButton->Draw();
137 mNumBarsSelector->Draw();
138 mVolSlider->Draw();
139 mFeedInSlider->Draw();
140}
141
142void SlowLayers::Clear()
143{

Callers

nothing calls this directly

Calls 8

ofPushMatrixFunction · 0.85
ofTranslateFunction · 0.85
DrawAudioBufferFunction · 0.85
ofSetColorFunction · 0.85
ofLineFunction · 0.85
ofPopMatrixFunction · 0.85
GetMeasurePosMethod · 0.45
DrawMethod · 0.45

Tested by

no test coverage detected