On Thursday 29 March 2007 20:44, Chris Cannam wrote:
>
> So the idea is to introduce a new SimpleRulerScale and operate it quite
> independently of the hlayout. I've committed something of the sort.
Damn, I just had found what I think is a simpler fix, but had to leave taking
pics of a friend's rock band.
Anyway, my fix is to use the following as the RulerScale for the tempo and
chord ruler :
class ZoomableMatrixHLayoutRulerScale : public RulerScale, public HZoomable {
public:
ZoomableMatrixHLayoutRulerScale(MatrixHLayout& layout) :
RulerScale(layout.getComposition()), m_referenceHLayout(layout) {};
virtual double getBarPosition(int n) const { return
m_referenceHLayout.getBarPosition(n) * getHScaleFactor(); }
virtual double getXForTime(timeT time) const { return
m_referenceHLayout.getXForTime(time) * getHScaleFactor(); }
virtual timeT getTimeForX(double x) const { return
m_referenceHLayout.getTimeForX(x / getHScaleFactor()); }
virtual double getBarWidth(int n) const { return
m_referenceHLayout.getBarWidth(n) * getHScaleFactor(); }
virtual int getLastVisibleBar() const { return
m_referenceHLayout.getLastVisibleBar(); }
protected:
MatrixHLayout& m_referenceHLayout;
};
Seems to work here. What do you think ?
--
Guillaume.
http://telegraph-road.org
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel