MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / set_scale_offset

Method set_scale_offset

DSView/pv/view/view.cpp:350–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350void View::set_scale_offset(double scale, int64_t offset)
351{
352 _preScale = _scale;
353 _preOffset = _offset;
354
355 _scale = max(min(scale, _maxscale), _minscale);
356 _offset = floor(max(min(offset, get_max_offset()), get_min_offset()));
357
358 if (_scale != _preScale || _offset != _preOffset) {
359 update_scroll();
360 _header->update();
361 _ruler->update();
362 viewport_update();
363 }
364}
365
366void View::set_preScale_preOffset()
367{

Callers 6

eventFilterMethod · 0.80
mouseMoveEventMethod · 0.80
onLogicMouseReleaseMethod · 0.80
mouseDoubleClickEventMethod · 0.80
wheelEventMethod · 0.80
on_drag_timerMethod · 0.80

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected