Mercurial > hg > svgui
comparison layer/LogColourScale.cpp @ 1216:dc2af6616c83
Merge from branch 3.0-integration
author | Chris Cannam |
---|---|
date | Fri, 13 Jan 2017 10:29:50 +0000 |
parents | 5144d7185fb5 |
children | a34a2a25907c |
comparison
equal
deleted
inserted
replaced
1048:e8102ff5573b | 1216:dc2af6616c83 |
---|---|
20 | 20 |
21 #include <QPainter> | 21 #include <QPainter> |
22 | 22 |
23 #include <cmath> | 23 #include <cmath> |
24 | 24 |
25 #include "view/View.h" | 25 #include "LayerGeometryProvider.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; |