Let client applications set a DrawingMode() which will be the

default drawing mode for text rendering. Don't override it
with B_OP_COPY (still the default). Should not have any
consequences in any existing use-case. The MediaPlayer can
use BTextViews to render semi-transparent subtitles this way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38823 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2010-09-26 20:25:57 +00:00
parent 25fb0e67fd
commit 676c1e9694

View File

@ -4270,6 +4270,7 @@ BTextView::_DrawLine(BView *view, const int32 &lineNum,
const BFont *font = NULL;
const rgb_color *color = NULL;
int32 numBytes;
drawing_mode defaultTextRenderingMode = DrawingMode();
// iterate through each style on this line
while ((numBytes = fStyles->Iterate(offset, length, fInline, &font,
&color)) != 0) {
@ -4287,7 +4288,7 @@ BTextView::_DrawLine(BView *view, const int32 &lineNum,
} while ((tabChars + numTabs) < numBytes);
}
drawing_mode textRenderingMode = B_OP_COPY;
drawing_mode textRenderingMode = defaultTextRenderingMode;
if (inputRegion.CountRects() > 0
&& ((offset <= fInline->Offset()