comparison layer/TimeRulerLayer.cpp @ 1326:97c68bffbda6 zoom

More ZoomLevel updates
author Chris Cannam
date Thu, 20 Sep 2018 10:45:24 +0100
parents bc2cb82050a0
children ab2cafd3a7cb
comparison
equal deleted inserted replaced
1325:bc2cb82050a0 1326:97c68bffbda6
228 // We always use the exact incms in our calculations for where to 228 // We always use the exact incms in our calculations for where to
229 // draw the actual ticks or lines. 229 // draw the actual ticks or lines.
230 230
231 int minPixelSpacing = 50; 231 int minPixelSpacing = 50;
232 sv_frame_t incFrame = lrint((incms * sampleRate) / 1000); 232 sv_frame_t incFrame = lrint((incms * sampleRate) / 1000);
233 int incX = int(round(v->getZoomLevel().framesToPixels(incFrame))); 233 int incX = int(round(v->getZoomLevel().framesToPixels(double(incFrame))));
234 int ticks = 10; 234 int ticks = 10;
235 if (incX < minPixelSpacing * 2) { 235 if (incX < minPixelSpacing * 2) {
236 ticks = quarter ? 4 : 5; 236 ticks = quarter ? 4 : 5;
237 } 237 }
238 238