Transparency by replacing DrawRect
Change-Id: I5ba220df841cbe650c910c1c7bc1815900f13c53 (cherry picked from commit 6ec2a1a6922d22fa5efb25982b0b51cef7a97499)
This commit is contained in:
committed by
Fridrich Štrba
parent
f850bbb4cb
commit
6b490f6be9
@@ -149,7 +149,12 @@ void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY,
|
|||||||
|
|
||||||
nX += nBaseX;
|
nX += nBaseX;
|
||||||
nY += nBaseY;
|
nY += nBaseY;
|
||||||
mpGraphics->DrawRect( nX, nY, nWidth, nHeight, this );
|
//mpGraphics->DrawRect( nX, nY, nWidth, nHeight, this ); // original code
|
||||||
|
Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) );
|
||||||
|
Polygon aPoly( aRect );
|
||||||
|
PolyPolygon aPolyPoly(aPoly);
|
||||||
|
DrawTransparent(aPolyPoly, 50);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputDevice::ImplDrawTextBackground( const SalLayout& rSalLayout )
|
void OutputDevice::ImplDrawTextBackground( const SalLayout& rSalLayout )
|
||||||
@@ -474,12 +479,12 @@ void OutputDevice::ImplDrawText( SalLayout& rSalLayout )
|
|||||||
rSalLayout.DrawBase() += Point( mnTextOffX, mnTextOffY );
|
rSalLayout.DrawBase() += Point( mnTextOffX, mnTextOffY );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if the text has some background get it (XXX: now getting fixed color)
|
if the text has some background get it
|
||||||
and the set it as the new filling color
|
and the set it as the new filling color
|
||||||
*/
|
*/
|
||||||
if (mbTextBackground) {
|
if (mbTextBackground) {
|
||||||
// set right background
|
// set right background // (XXX: now getting fixed color)
|
||||||
Color aColor = COL_BLUE;
|
Color aColor = RGB_COLORDATA(0x66,0x66, 0xFF); // blue-ish
|
||||||
// SetBackground does not work
|
// SetBackground does not work
|
||||||
SetTextFillColor(aColor);
|
SetTextFillColor(aColor);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user