Details
-
Suggestion
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.3.0
-
None
Description
Qt's OpenGL capabilities are often used in highly technical applications (CAD, modelling, etc) where there is a large number of background elements which can be transformed, and therefore anticipating the background color, in selecting text color, is difficult. One way to circumvent this is to enable outlined text, which given a drastic contrast, will guarantee the visibility of the text. It has been suggested that we add this toggleable option to the existing QGLWidget functionality.
Comment: This is the wrong approach IMO. We should add a mode to QPainter that makes it easy to draw outlined text (ie. one where the brush fills the glyph, and the pen outlines it. That mode would be compatible to the way SVG and PDF define things). It would also work on all paintdevices, not just GL.
Update: this can already be done by using QPainterPath::addText, and rendering the painter path with antialiasing on and having both a brush and a (thin) pen set.