Mercurial > hg > svcore
comparison data/model/PowerOfSqrtTwoZoomConstraint.h @ 1528:a7485c1bdba5
Tests and a couple of minor fixes for zoom constraints
author | Chris Cannam |
---|---|
date | Tue, 18 Sep 2018 15:04:46 +0100 |
parents | 48e9f538e6e9 |
children | c1c45c5146bb |
comparison
equal
deleted
inserted
replaced
1526:8988b27ebf38 | 1528:a7485c1bdba5 |
---|---|
11 published by the Free Software Foundation; either version 2 of the | 11 published by the Free Software Foundation; either version 2 of the |
12 License, or (at your option) any later version. See the file | 12 License, or (at your option) any later version. See the file |
13 COPYING included with this distribution for more information. | 13 COPYING included with this distribution for more information. |
14 */ | 14 */ |
15 | 15 |
16 #ifndef _POWER_OF_SQRT_TWO_ZOOM_CONSTRAINT_H_ | 16 #ifndef SV_POWER_OF_SQRT_TWO_ZOOM_CONSTRAINT_H |
17 #define _POWER_OF_SQRT_TWO_ZOOM_CONSTRAINT_H_ | 17 #define SV_POWER_OF_SQRT_TWO_ZOOM_CONSTRAINT_H |
18 | 18 |
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 int getNearestBlockSize(int requestedBlockSize, |
25 RoundingDirection dir = RoundNearest) | 25 RoundingDirection dir = RoundNearest) |
26 const; | 26 const; |
27 | 27 |
28 virtual int getNearestBlockSize(int requestedBlockSize, | 28 virtual int getNearestBlockSize(int requestedBlockSize, |
29 int &type, | 29 int &type, |
30 int &power, | 30 int &power, |
31 RoundingDirection dir = RoundNearest) | 31 RoundingDirection dir = RoundNearest) |
32 const; | 32 const; |
33 | 33 |
34 virtual int getMinCachePower() const { return 6; } | 34 virtual int getMinCachePower() const { return 6; } |
35 }; | 35 }; |
36 | 36 |