comparison layer/LinearColourScale.cpp @ 1045:f535f6e5dbb0 alignment-simple

Merge in from SV 3.0-integration branches
author Chris Cannam
date Wed, 02 Mar 2016 17:25:27 +0000
parents 4fe7a09be0fe
children 5144d7185fb5
comparison
equal deleted inserted replaced
976:f2c63ec85901 1045:f535f6e5dbb0
18 18
19 #include <QPainter> 19 #include <QPainter>
20 20
21 #include <cmath> 21 #include <cmath>
22 22
23 #include "view/View.h" 23 #include "view/LayerGeometryProvider.h"
24 24
25 int 25 int
26 LinearColourScale::getWidth(View *, 26 LinearColourScale::getWidth(LayerGeometryProvider *,
27 QPainter &paint) 27 QPainter &paint)
28 { 28 {
29 return paint.fontMetrics().width("-000.00") + 15; 29 return paint.fontMetrics().width("-000.00") + 15;
30 } 30 }
31 31
32 void 32 void
33 LinearColourScale::paintVertical(View *v, 33 LinearColourScale::paintVertical(LayerGeometryProvider *v,
34 const ColourScaleLayer *layer, 34 const ColourScaleLayer *layer,
35 QPainter &paint, 35 QPainter &paint,
36 int /* x0 */, 36 int /* x0 */,
37 double min, 37 double min,
38 double max) 38 double max)
39 { 39 {
40 int h = v->height(); 40 int h = v->getPaintHeight();
41 41
42 int n = 10; 42 int n = 10;
43 43
44 double val = min; 44 double val = min;
45 double inc = (max - val) / n; 45 double inc = (max - val) / n;