X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Ftrace.h;h=415a7dc28c70c4e273f2bcde3bd5d037306d10f2;hb=410f9c81240bda322c0b9880170f0eb7a2bb7338;hp=07f90f4c92734e718f085f7b9b0bc0fc1d913564;hpb=fe08b6e8a85c80ae738757f7d85aa38ef7c4bdc3;p=pulseview.git diff --git a/pv/view/trace.h b/pv/view/trace.h index 07f90f4..415a7dc 100644 --- a/pv/view/trace.h +++ b/pv/view/trace.h @@ -137,6 +137,14 @@ protected: */ 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.