37 lines
1 KiB
C++
37 lines
1 KiB
C++
//=============================================================================
|
|
// MuseScore
|
|
// Music Composition & Notation
|
|
//
|
|
// Copyright (C) 2002-2011 Werner Schweer
|
|
//
|
|
// This program is free software; you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License version 2
|
|
// as published by the Free Software Foundation and appearing in
|
|
// the file LICENCE.GPL
|
|
//=============================================================================
|
|
|
|
#ifndef __LAYOUT_H__
|
|
#define __LAYOUT_H__
|
|
|
|
namespace Ms {
|
|
|
|
//---------------------------------------------------------
|
|
// Spring
|
|
//---------------------------------------------------------
|
|
|
|
struct Spring {
|
|
int seg;
|
|
qreal stretch;
|
|
qreal fix;
|
|
Spring(int i, qreal s, qreal f) : seg(i), stretch(s), fix(f) {}
|
|
};
|
|
|
|
typedef std::multimap<qreal, Spring, std::less<qreal> > SpringMap;
|
|
typedef SpringMap::const_iterator iSpring;
|
|
|
|
extern qreal sff(qreal x, qreal xMin, const SpringMap& springs);
|
|
|
|
|
|
} // namespace Ms
|
|
#endif
|
|
|