Armel Asselin:
> void DrawRect(Color c, Rect r)
> {
> if (c.IsOpaque( ))
> DrawOpaqueRect(c, r);
> else
> DrawAlphaBlendedRect(c, r);
> }
>
> you would get alpha blending where you want, at no cost for whom does not do
> alpha blending
It is more complex than that as translucent drawing occurs over
other drawing and thus later. The current demonstration code draws
translucent indicators along with other indicators (in indicator
number order) over the background colour and text. A translucent caret
line is drawn last of all. The existing layers in normal two phase
mode are:
Background colour (with caret line, markers and selection)
End of line (backgrounds and wrap marker)
Text, indent guides, control characters, visible whitespace,
hotspots, underline style
Indicators
Edge line
The translucency code adds a final translucent caret line layer.
If you draw the caret line using the translucency code with an
opaque alpha then it will obliterate the text. It should remain
possible to ask for a background only caret line that looks the same
as the current version. Another approach is to insert another layer
after the current background layer that can display translucency that
only affects the background but I quite like the effect of the
demonstration code drawing over everything else.
Neil
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest