Mercurial > hg > svgui
comparison layer/SpectrogramLayer.cpp @ 13:01849cd277e6
* Hook up tool selection buttons to switch the cursor mode
* Implement simple and multi-selection, snapping to the resolution
of the current layer. You can't actually do anything with a selection yet
author | Chris Cannam |
---|---|
date | Mon, 23 Jan 2006 17:02:57 +0000 |
parents | 2d5005f2b3d9 |
children | 1deb5f87a18c |
comparison
equal
deleted
inserted
replaced
12:484e7320f59f | 13:01849cd277e6 |
---|---|
1634 | 1634 |
1635 paint.drawText(xbase + 5 + labelwidth + minwidth, | 1635 paint.drawText(xbase + 5 + labelwidth + minwidth, |
1636 ybase + 9 + fontAscent + fontHeight * 2, dBMaxText); | 1636 ybase + 9 + fontAscent + fontHeight * 2, dBMaxText); |
1637 } | 1637 } |
1638 | 1638 |
1639 int | |
1640 SpectrogramLayer::getNearestFeatureFrame(int frame, | |
1641 size_t &resolution, | |
1642 bool snapRight) const | |
1643 { | |
1644 resolution = getWindowIncrement(); | |
1645 int snapFrame = (frame / resolution) * resolution; | |
1646 if (snapRight) snapFrame += resolution; | |
1647 return snapFrame; | |
1648 } | |
1649 | |
1639 /*!!! | 1650 /*!!! |
1640 | 1651 |
1641 bool | 1652 bool |
1642 SpectrogramLayer::identifyLocalFeatures(bool on, int x, int y) | 1653 SpectrogramLayer::identifyLocalFeatures(bool on, int x, int y) |
1643 { | 1654 { |