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

Method set_offset

DSView/pv/view/spectrumtrace.cpp:167–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167void SpectrumTrace::set_offset(double delta)
168{
169 int width = get_view_rect().width();
170 _offset = _offset + (delta*_scale / width);
171 _offset = max(min(_offset, 1-_scale), 0.0);
172
173 _view->set_update(_viewport, true);
174 _view->update();
175}
176
177double SpectrumTrace::get_offset()
178{

Callers 1

mouseMoveEventMethod · 0.80

Calls 2

set_updateMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected