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

Method GetEffectPos

Source/EffectChain.cpp:293–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291}
292
293ofVec2f EffectChain::GetEffectPos(int index) const
294{
295 float xPos = 10;
296 float yPos = 32;
297 for (int i = 0; i < mEffects.size(); ++i)
298 {
299 if (i > 0 && i % mNumFXWide == 0) //newline
300 {
301 xPos = 10;
302 yPos += GetRowHeight(i / mNumFXWide - 1);
303 }
304
305 if (i == index)
306 return ofVec2f(xPos, yPos);
307
308 float w, h;
309 mEffects[i]->GetDimensions(w, h);
310 w = MAX(w, MIN_EFFECT_WIDTH);
311
312 xPos += w + 20;
313 }
314
315 return ofVec2f(xPos, yPos);
316}
317
318void EffectChain::GetPush2OverrideControls(std::vector<IUIControl*>& controls) const
319{

Callers

nothing calls this directly

Calls 3

ofVec2fClass · 0.85
sizeMethod · 0.80
GetDimensionsMethod · 0.45

Tested by

no test coverage detected