projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8c0302f
)
DecodeTrace: With a rounded rect
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sat, 2 Jan 2016 15:45:22 +0000
(15:45 +0000)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Sun, 3 Jan 2016 19:09:30 +0000
(20:09 +0100)
pv/view/decodetrace.cpp
patch
|
blob
|
history
diff --git
a/pv/view/decodetrace.cpp
b/pv/view/decodetrace.cpp
index 30d1667c5744073f310e7c4001aecfb5b90ce5aa..e0f3a0f262734509dadd3d412a920fb2dfe789fc 100644
(file)
--- a/
pv/view/decodetrace.cpp
+++ b/
pv/view/decodetrace.cpp
@@
-415,16
+415,6
@@
void DecodeTrace::draw_annotation_block(
const double top = y + .5 - h / 2;
const double bottom = y + .5 + h / 2;
const double top = y + .5 - h / 2;
const double bottom = y + .5 + h / 2;
- const double cap_width = min((end - start) / 4, EndCapWidth);
-
- QPointF pts[] = {
- QPointF(start, y + .5f),
- QPointF(start + cap_width, top),
- QPointF(end - cap_width, top),
- QPointF(end, y + .5f),
- QPointF(end - cap_width, bottom),
- QPointF(start + cap_width, bottom)
- };
const size_t colour = (base_colour + annotations.front().format()) %
countof(Colours);
const size_t colour = (base_colour + annotations.front().format()) %
countof(Colours);
@@
-439,8
+429,8
@@
void DecodeTrace::draw_annotation_block(
p.setPen((single_format ? OutlineColours[colour] : Qt::gray));
p.setBrush(QBrush((single_format ? Colours[colour] : Qt::gray),
Qt::Dense4Pattern));
p.setPen((single_format ? OutlineColours[colour] : Qt::gray));
p.setBrush(QBrush((single_format ? Colours[colour] : Qt::gray),
Qt::Dense4Pattern));
-
-
p.drawConvexPolygon(pts, countof(pts)
);
+ p.drawRoundedRect(
+
QRectF(start, top, end - start, bottom - top), h/4, h/4
);
}
void DecodeTrace::draw_instant(const pv::data::decode::Annotation &a, QPainter &p,
}
void DecodeTrace::draw_instant(const pv::data::decode::Annotation &a, QPainter &p,