I'm drawing text on a transparent layer. Because of blending with the color that's transparent the text looks a little off. Ie not solid color and doesn't blend well with the layer below the text.
Is there any reasonable solution to this other than drawing the text on lower layers or using a small background color?
Could you post an image and/or code? It's a little difficult to visualize the problem from just what you've said.
May as well try a shot in the dark, though... Maybe you could try creating a fade mask according to the technique(s) described in this thread: http://www.gammon.com.au/forum/?id=10530
I have a transparent flagged window on top of the other layers for text. I'm using WindowText() on that layer. For various reasons I can't draw reliably on the layers under that. Yet I want the text legible. Is there any solution for this?
There is always a solution. However it may involve trade-offs. Speed. Memory. Complexity. Visibility. Coding time.
Drawing text on a busy background is always going to be a challenge. Personally I wouldn't have a transparent window on top of another one, I think that just adds a layer of complexity. For one thing, what if you want to move it? Also, the transparency is either on or off, giving you a sharp edge.
One approach would be to "punch out" the background, perhaps by drawing the text in white over the background, perhaps offset one pixel up and left, and then one pixel down and right. Then draw the black text on top in the middle.
Or, fade the background a bit with a blended in rectangle, lowering the intensity of the background. Or more simply, just block out the background with black, white, gray, yellow or whatever, and draw the text on that.
What could look nice is blending in a soft-edged rectangle onto the main window, giving a black background to the text, but without the hard borders.