When adding text to a line, a large rectangle is created in the background
of the text with the same color as the canvas. This means that the line
doesn't show when the distance is short between the two connected shapes. It
also overwrites the shapes when getting close enough.
Obvioulsly the background color of the text should be transparent. Is there
any way to get around this problem?
When adding text to a line, a large rectangle is created in the background
of the text with the same color as the canvas. This means that the line
doesn't show when the distance is short between the two connected shapes. It
also overwrites the shapes when getting close enough.
Obvioulsly the background color of the text should be transparent. Is there
any way to get around this problem?
For OGL I don't know. If you are drawing the text yourself then yes, you can call wxDC.SetBackgroundMode.
路路路
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
The line has three text regions
2. First I changed the format mode for the centre region (0). I set it to 4,
although this is not documented, so I don't know what it means (got it from
a source code on the net).
3. Then I had to call FormatText. But the documentation is wrong again; The
method takes three arguments; a dc, the text be shown, and the region number
(0) to format.
4. By now everything should work fine. But it donesn't. For some reason the
text is shown twice!By coincidence I found out that if I added the text
again one of the texts dissappear. Now I got it the way I wanted it!
It would be great if someone could explain this to me, althoug I'm happy
enough that it works