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