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

Method Resize

Source/PlaySequencer.cpp:551–564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

549}
550
551void PlaySequencer::Resize(float w, float h)
552{
553 w = MAX(w - extraW, 219);
554 h = MAX(h - extraH, 111);
555 SetGridSize(w, h);
556
557 ofRectangle gridRect = mGrid->GetRect(true);
558 for (int i = 0; i < (int)mLanes.size(); ++i)
559 {
560 ofVec2f cellPos = mGrid->GetCellPosition(mGrid->GetCols() - 1, i) + mGrid->GetPosition(true);
561 mLanes[i].mMuteOrEraseCheckbox->SetPosition(gridRect.getMaxX() + 3, cellPos.y + 1);
562 mLanes[i].mMuteOrEraseCheckbox->SetBoxSize(MAX(10, mGrid->GetHeight() / mLanes.size()));
563 }
564}
565
566void PlaySequencer::SetGridSize(float w, float h)
567{

Callers

nothing calls this directly

Calls 9

sizeMethod · 0.80
getMaxXMethod · 0.80
SetBoxSizeMethod · 0.80
GetRectMethod · 0.45
GetCellPositionMethod · 0.45
GetColsMethod · 0.45
GetPositionMethod · 0.45
SetPositionMethod · 0.45
GetHeightMethod · 0.45

Tested by

no test coverage detected