projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added DecodeSignal default colours
[pulseview.git]
/
pv
/
view
/
trace.h
diff --git
a/pv/view/trace.h
b/pv/view/trace.h
index 07f90f4c92734e718f085f7b9b0bc0fc1d913564..415a7dc28c70c4e273f2bcde3bd5d037306d10f2 100644
(file)
--- a/
pv/view/trace.h
+++ b/
pv/view/trace.h
@@
-137,6
+137,14
@@
protected:
*/
int get_y() const;
*/
int get_y() const;
+ /**
+ * Gets the text colour.
+ * @remarks This colour is computed by comparing the lightness
+ * of the trace colour against a threshold to determine whether
+ * white or black would be more visible.
+ */
+ QColor get_text_colour() const;
+
/**
* Paints a zero axis across the viewport.
* @param p the QPainter to paint into.
/**
* Paints a zero axis across the viewport.
* @param p the QPainter to paint into.