X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Flogicsignal.cpp;h=03d6aa253bd008a2381c1be3e880f36c157a01c5;hb=333d5bbc0a326e6fa82db44f3e6ba8dd79cafdd8;hp=cf3f3e5a58dd076b1a58a9bfd39a3e93bf092de4;hpb=8d634081d8b0cc741dd34d8c646474ff6754aea8;p=pulseview.git diff --git a/pv/view/logicsignal.cpp b/pv/view/logicsignal.cpp index cf3f3e5..03d6aa2 100644 --- a/pv/view/logicsignal.cpp +++ b/pv/view/logicsignal.cpp @@ -32,7 +32,6 @@ using namespace std; namespace pv { namespace view { -const float LogicSignal::Margin = 10.0f; const float LogicSignal::Oversampling = 2.0f; const QColor LogicSignal::EdgeColour(0x80, 0x80, 0x80); @@ -73,12 +72,12 @@ void LogicSignal::paint(QPainter &p, const QRect &rect, double scale, assert(scale > 0); assert(_data); - const float high_offset = rect.top() + Margin + 0.5f; - const float low_offset = rect.bottom() - Margin + 0.5f; + const float high_offset = rect.top() + 0.5f; + const float low_offset = rect.bottom() + 0.5f; const deque< shared_ptr > &snapshots = _data->get_snapshots(); - if(snapshots.empty()) + if (snapshots.empty()) return; const shared_ptr &snapshot = @@ -103,7 +102,7 @@ void LogicSignal::paint(QPainter &p, const QRect &rect, double scale, QLineF *const edge_lines = new QLineF[edge_count]; line = edge_lines; - for(vector::const_iterator i = + for (vector::const_iterator i = edges.begin() + 1; i != edges.end() - 1; i++) { const float x = ((*i).first / samples_per_pixel - @@ -136,9 +135,9 @@ void LogicSignal::paint_caps(QPainter &p, QLineF *const lines, { QLineF *line = lines; - for(vector::const_iterator i = + for (vector::const_iterator i = edges.begin(); i != (edges.end() - 1); i++) - if((*i).second == level) { + if ((*i).second == level) { *line++ = QLineF( ((*i).first / samples_per_pixel - pixels_offset) + x_offset, y_offset, @@ -151,7 +150,7 @@ void LogicSignal::paint_caps(QPainter &p, QLineF *const lines, int LogicSignal::get_nominal_offset(const QRect &rect) const { - return rect.bottom() - Margin; + return rect.bottom(); } } // namespace view