Пример #1
0
int Measure::GetDrawingX() const
{
    if (!this->IsMeasuredMusic()) {
        System *system = dynamic_cast<System *>(this->GetFirstParent(SYSTEM));
        assert(system);
        if (system->m_yAbs != VRV_UNSET) {
            return (system->m_systemLeftMar);
        }
    }

    if (m_xAbs != VRV_UNSET) return m_xAbs;

    if (m_cachedDrawingX != VRV_UNSET) return m_cachedDrawingX;

    System *system = dynamic_cast<System *>(this->GetFirstParent(SYSTEM));
    assert(system);
    m_cachedDrawingX = system->GetDrawingX() + this->GetDrawingXRel();
    return m_cachedDrawingX;
}