comparison layer/LinearNumericalScale.cpp @ 1276:b4cb11ca8233 horizontal-scale

Branch toward adding horizontal numerical scales to things
author Chris Cannam
date Tue, 01 May 2018 16:14:22 +0100
parents a34a2a25907c
children fc9d9f1103fa
comparison
equal deleted inserted replaced
1275:3ca1be2e2c91 1276:b4cb11ca8233
24 24
25 #include "base/ScaleTickIntervals.h" 25 #include "base/ScaleTickIntervals.h"
26 26
27 int 27 int
28 LinearNumericalScale::getWidth(LayerGeometryProvider *, 28 LinearNumericalScale::getWidth(LayerGeometryProvider *,
29 QPainter &paint) 29 QPainter &paint,
30 bool horizontal)
30 { 31 {
31 return paint.fontMetrics().width("-000.00") + 10; 32 if (horizontal) {
33 return paint.fontMetrics().height() + 10;
34 } else {
35 return paint.fontMetrics().width("-000.00") + 10;
36 }
32 } 37 }
33 38
34 void 39 void
35 LinearNumericalScale::paintVertical(LayerGeometryProvider *v, 40 LinearNumericalScale::paintVertical(LayerGeometryProvider *v,
36 const VerticalScaleLayer *layer, 41 const VerticalScaleLayer *layer,