Mercurial > hg > svcore
comparison data/model/PowerOfSqrtTwoZoomConstraint.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 PowerOfSqrtTwoZoomConstraint : virtual public ZoomConstraint | 21 class PowerOfSqrtTwoZoomConstraint : 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; | 26 const override; |
27 | |
28 virtual int getNearestBlockSize(int requestedBlockSize, | |
29 int &type, | |
30 int &power, | |
31 RoundingDirection dir = RoundNearest) | |
32 const; | |
33 | 27 |
34 virtual int getMinCachePower() const { return 6; } | 28 virtual int getMinCachePower() const { return 6; } |
29 | |
30 virtual int getNearestBlockSize(int requestedBlockSize, | |
31 int &type, | |
32 int &power, | |
33 RoundingDirection dir = RoundNearest) | |
34 const; | |
35 }; | 35 }; |
36 | 36 |
37 #endif | 37 #endif |
38 | 38 |