// -------------------------------------------------------------------------- void GRRepeatBegin::updateBoundingBox() { const float halfExtent = GetSymbolExtent(mSymbol) * 0.5f; mBoundingBox.top = 0; mBoundingBox.left = -halfExtent; mBoundingBox.right = halfExtent; mBoundingBox.bottom = 4 * LSPACE; GRStaff *staff = getGRStaff(); if (staff) { fLineNumber = staff->getNumlines(); int linesOffset = fLineNumber - 5; if (linesOffset) mPosition.y += staff->getStaffLSPACE() * linesOffset / 2; fStaffThickness = staff->getLineThickness(); fSize = staff->getSizeRatio(); fBaseThickness = LSPACE * 0.6f * fSize; mTagSize *= fSize; } }
// -------------------------------------------------------------------------- void GRRepeatEnd::InitRepeatEnd() { mNeedsSpring = 1; sconst = SCONST_BAR - 2; // sconst = 5; //SCONST_BAR; mSymbol = kRepeatEndSymbol; mLeftSpace = mRightSpace = 0; refpos.Set( -LSPACE * 0.8f, 4 * LSPACE ); GRStaff *staff = getGRStaff(); if (staff) { fLineNumber = staff->getNumlines(); fStaffThickness = staff->getLineThickness(); fSize = staff->getSizeRatio(); fBaseThickness = LSPACE * 0.6f * fSize; } mBoundingBox.bottom = 4 * LSPACE; }