]> sigrok.org Git - pulseview.git/blobdiff - pv/view/viewport.cpp
ViewItemPaintParams: Added vertical layout information
[pulseview.git] / pv / view / viewport.cpp
index bc010b4bd02fa3cd11270397c87e2588df2af461..84092ee451ba77caea5a9661687ff2a8befd9ad5 100644 (file)
@@ -22,9 +22,9 @@
 #include <cmath>
 #include <algorithm>
 
-#include "rowitempaintparams.hpp"
 #include "signal.hpp"
 #include "view.hpp"
+#include "viewitempaintparams.hpp"
 #include "viewport.hpp"
 
 #include <pv/session.hpp>
@@ -68,9 +68,9 @@ void Viewport::paintEvent(QPaintEvent*)
        p.setRenderHint(QPainter::Antialiasing);
 
        if (view_.cursors_shown())
-               view_.cursors().draw_viewport_background(p, rect());
+               view_.cursors()->draw_viewport_background(p, rect());
 
-       const RowItemPaintParams pp(0, width());
+       const ViewItemPaintParams pp(rect(), view_.scale(), view_.offset());
 
        // Plot the signal
        for (const shared_ptr<RowItem> r : row_items)
@@ -86,7 +86,7 @@ void Viewport::paintEvent(QPaintEvent*)
                r->paint_fore(p, pp);
 
        if (view_.cursors_shown())
-               view_.cursors().draw_viewport_foreground(p, rect());
+               view_.cursors()->draw_viewport_foreground(p, rect());
 
        p.end();
 }