comparison layer/LogColourScale.cpp @ 997:296ccd36f626 tony-2.0-integration

Merge through to branch for Tony 2.0
author Chris Cannam
date Thu, 20 Aug 2015 14:54:21 +0100
parents 4fe7a09be0fe
children 5144d7185fb5
comparison
equal deleted inserted replaced
943:788b7623bfca 997:296ccd36f626
23 #include <cmath> 23 #include <cmath>
24 24
25 #include "view/View.h" 25 #include "view/View.h"
26 26
27 int 27 int
28 LogColourScale::getWidth(View *, 28 LogColourScale::getWidth(LayerGeometryProvider *,
29 QPainter &paint) 29 QPainter &paint)
30 { 30 {
31 return paint.fontMetrics().width("-000.00") + 15; 31 return paint.fontMetrics().width("-000.00") + 15;
32 } 32 }
33 33
34 void 34 void
35 LogColourScale::paintVertical(View *v, 35 LogColourScale::paintVertical(LayerGeometryProvider *v,
36 const ColourScaleLayer *layer, 36 const ColourScaleLayer *layer,
37 QPainter &paint, 37 QPainter &paint,
38 int /* x0 */, 38 int /* x0 */,
39 double minlog, 39 double minlog,
40 double maxlog) 40 double maxlog)
41 { 41 {
42 int h = v->height(); 42 int h = v->getPaintHeight();
43 43
44 int n = 10; 44 int n = 10;
45 45
46 double val = minlog; 46 double val = minlog;
47 double inc = (maxlog - val) / n; 47 double inc = (maxlog - val) / n;