comparison layer/LogColourScale.cpp @ 978:64c2b3a4435a 3.0-integration

Merge from branch osx-retina
author Chris Cannam
date Fri, 26 Jun 2015 14:10:40 +0100
parents 4fe7a09be0fe
children 5144d7185fb5
comparison
equal deleted inserted replaced
977:f40ccbf228c2 978:64c2b3a4435a
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;