https://bugs.documentfoundation.org/show_bug.cgi?id=156361

--- Comment #4 from Patrick Luby <[email protected]> ---
Random idea: if I understand how we are supposed to draw to mpAlphaVDev, I'd
replace the following at source/outdev/bitmap.cxx:349:

mpAlphaVDev->BlendBitmap(aTR, rAlpha);

with the following pseudo-code:

// Make copy of pSalAlphaBmp2
pSalAlphaBmp3 = pSalAlphaBmp2->Clone(); // not sure what the real code is here
// Convert transparency to alpha
pSalAlphaBmp2->Invert();
// Use the uninverted copy of pSalAlphaBmp2 for blending and, instead of
// blending with the drawn bitmap, blend with opaque white. Assuming
// mpAlphaVDev is grayscale already, blending the following should overwrite
// mpAlphaVDev with grayscale. The SK_ColorWHITE should be darkened by the
// two alpha masks so in the end we should have the new, inverted alpha mask.
mpAlphaVDev->mpGraphics->BlendAlphaBitmap(aTR, SK_ColorWHITE, *pSalAlphaBmp,
*pSalAlphaBmp3, *this))
// Convert alpha to transparency
pSalAlphaBmp2->Invert();
return;

I'll see if I can get something working in the next couple of days.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to