annotate data/model/PowerOfTwoZoomConstraint.h @ 1761:ee7fd2c01d87 by-id

Work on management of alignment-related models
author Chris Cannam
date Fri, 12 Jul 2019 13:57:42 +0100
parents c1c45c5146bb
children 1ae6a19464a7
rev   line source
Chris@147 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@147 2
Chris@147 3 /*
Chris@147 4 Sonic Visualiser
Chris@147 5 An audio file viewer and annotation editor.
Chris@147 6 Centre for Digital Music, Queen Mary, University of London.
Chris@147 7 This file copyright 2006 Chris Cannam.
Chris@147 8
Chris@147 9 This program is free software; you can redistribute it and/or
Chris@147 10 modify it under the terms of the GNU General Public License as
Chris@147 11 published by the Free Software Foundation; either version 2 of the
Chris@147 12 License, or (at your option) any later version. See the file
Chris@147 13 COPYING included with this distribution for more information.
Chris@147 14 */
Chris@147 15
Chris@1528 16 #ifndef SV_POWER_OF_TWO_ZOOM_CONSTRAINT_H
Chris@1528 17 #define SV_POWER_OF_TWO_ZOOM_CONSTRAINT_H
Chris@147 18
Chris@147 19 #include "base/ZoomConstraint.h"
Chris@147 20
Chris@147 21 class PowerOfTwoZoomConstraint : virtual public ZoomConstraint
Chris@147 22 {
Chris@147 23 public:
Chris@1324 24 virtual ZoomLevel getNearestZoomLevel(ZoomLevel requested,
Chris@1324 25 RoundingDirection dir = RoundNearest)
Chris@1324 26 const override;
Chris@1324 27
Chris@1324 28 protected:
Chris@1324 29 virtual int getNearestBlockSize(int requested,
Chris@1528 30 RoundingDirection dir = RoundNearest)
Chris@1429 31 const;
Chris@147 32 };
Chris@147 33
Chris@147 34 #endif
Chris@147 35