comparison data/model/PowerOfTwoZoomConstraint.h @ 1324:d4a28d1479a8 zoom

Some hackery toward having a zoomlevel type
author Chris Cannam
date Mon, 12 Dec 2016 15:18:52 +0000
parents 59e7fe1b1003
children 710e6250a401
comparison
equal deleted inserted replaced
1323:4dbb7a7c9c28 1324:d4a28d1479a8
19 #include "base/ZoomConstraint.h" 19 #include "base/ZoomConstraint.h"
20 20
21 class PowerOfTwoZoomConstraint : virtual public ZoomConstraint 21 class PowerOfTwoZoomConstraint : virtual public ZoomConstraint
22 { 22 {
23 public: 23 public:
24 virtual int getNearestBlockSize(int requestedBlockSize, 24 virtual ZoomLevel getNearestZoomLevel(ZoomLevel requested,
25 RoundingDirection dir = RoundNearest) 25 RoundingDirection dir = RoundNearest)
26 const override;
27
28 protected:
29 virtual int getNearestBlockSize(int requested,
30 RoundingDirection dir = RoundNearest)
26 const; 31 const;
27 }; 32 };
28 33
29 #endif 34 #endif
30 35