vcl/source/outdev/textline.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
New commits: commit 2987a0f4d38463a167e23c243668974d2cb863fb Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Sep 14 20:44:17 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Sep 15 09:44:12 2021 +0200 Related: tdf#143831 the svp aliased case ends up overly washed out as seen under gtk3 Change-Id: I0bcea49f8c24e9f773b357483cea78e58bb07e15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122099 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index 417eb7342715..b7445b4b825e 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -1055,7 +1055,17 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, to pVirtDev->Erase(); pVirtDev->SetAntialiasing( AntialiasingFlags::Enable ); pVirtDev->ImplDrawWaveLineBezier( 0, 0, nWordLength, 0, nWaveHeight, fOrientation, nLineWidth ); - rLineCache.insert( pVirtDev->GetBitmapEx( Point( 0, 0 ), pVirtDev->GetOutputSize() ), GetLineColor(), nLineWidth, nWaveHeight, nWordLength, aWavylinebmp ); + BitmapEx aBitmapEx(pVirtDev->GetBitmapEx(Point(0, 0), pVirtDev->GetOutputSize())); + + // Ideally we don't need this block, but in the split rgb surface + separate alpha surface + // with Antialiasing enabled and the svp/cairo backend we get both surfaces antialiased + // so their combination of aliases merge to overly wash-out the color. Hack it by taking just + // the alpha surface and use it to blend the original solid line color + Bitmap aSolidColor(aBitmapEx.GetBitmap()); + aSolidColor.Erase(GetLineColor()); + aBitmapEx = BitmapEx(aSolidColor, aBitmapEx.GetAlpha()); + + rLineCache.insert( aBitmapEx, GetLineColor(), nLineWidth, nWaveHeight, nWordLength, aWavylinebmp ); } if ( aWavylinebmp.ImplGetBitmapSalBitmap() != nullptr ) {