using std::deque;
using std::max;
+using std::make_pair;
using std::min;
using std::pair;
using std::shared_ptr;
namespace pv {
namespace view {
+const int LogicSignal::SignalHeight = 30;
+const int LogicSignal::SignalMargin = 10;
+
const float LogicSignal::Oversampling = 2.0f;
const QColor LogicSignal::EdgeColour(0x80, 0x80, 0x80);
return _data;
}
+std::pair<int, int> LogicSignal::v_extents() const
+{
+ return make_pair(-SignalHeight - SignalMargin, SignalMargin);
+}
+
void LogicSignal::paint_back(QPainter &p, int left, int right)
{
if (_channel->enabled())
- paint_axis(p, get_y(), left, right);
+ paint_axis(p, get_visual_y(), left, right);
}
void LogicSignal::paint_mid(QPainter &p, int left, int right)
assert(right >= left);
assert(_owner);
- const int y = get_y();
+ const int y = get_visual_y();
const View *const view = _owner->view();
assert(view);
-
+
const double scale = view->scale();
assert(scale > 0);
if (!_channel->enabled())
return;
- const float high_offset = y - View::SignalHeight + 0.5f;
+ const float high_offset = y - SignalHeight + 0.5f;
const float low_offset = y + 0.5f;
const deque< shared_ptr<pv::data::LogicSnapshot> > &snapshots =