]> sigrok.org Git - pulseview.git/blobdiff - pv/view/decode/annotation.h
Draw insteantaneous annotations with a circle
[pulseview.git] / pv / view / decode / annotation.h
index 7ba7d3676b0b1a5c87e726e63eb6d61119007937..091cd26004acee80fea8eb45baf86cb5a181983e 100644 (file)
@@ -33,11 +33,24 @@ namespace decode {
 
 class Annotation
 {
+private:
+       static const double EndCapWidth;
+       static const int DrawPadding;
+
 public:
        Annotation(const srd_proto_data *const pdata);
 
-       void paint(QPainter &p, int left, int right, double samples_per_pixel,
-               double pixels_offset, int y);
+       void paint(QPainter &p, QColor fill, QColor outline,
+               QColor text_colour, int text_height, int left, int right,
+               double samples_per_pixel, double pixels_offset, int y);
+
+private:
+       void draw_instant(QPainter &p, QColor fill, QColor outline,
+               QColor text_color, int h, double x, int y);
+
+       void draw_range(QPainter &p, QColor fill, QColor outline,
+               QColor text_color, int h, double start,
+               double end, int y);
 
 private:
        uint64_t _start_sample;