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

Method get_point

DSView/pv/view/mathtrace.cpp:488–509  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486}
487
488QPointF MathTrace::get_point(uint64_t index, float &value, bool &out_Error)
489{
490 QPointF pt = QPointF(0, 0);
491
492 out_Error = false;
493
494 if (index >= _math_stack->get_sample_num()){
495 out_Error = true;
496 return pt;
497 }
498
499 const float top = get_view_rect().top();
500 const float bottom = get_view_rect().bottom();
501 const float zeroP = _zero_vrate * get_view_rect().height() + top;
502 const float x = _view->index2pixel(index);
503
504 float v = *_math_stack->get_math(index);
505 value = v * get_vDialfactor();
506 float y = min(max(top, zeroP - (v * _scale)), bottom);
507 pt = QPointF(x, y);
508 return pt;
509}
510
511QString MathTrace::get_voltage(double v, int p)
512{

Callers

nothing calls this directly

Calls 3

index2pixelMethod · 0.80
get_mathMethod · 0.80
get_sample_numMethod · 0.45

Tested by

no test coverage detected