Kaydet (Commit) 6b490f6b authored tarafından matteocam's avatar matteocam Kaydeden (comit) Fridrich Štrba

Transparency by replacing DrawRect

Change-Id: I5ba220df841cbe650c910c1c7bc1815900f13c53
(cherry picked from commit 6ec2a1a6)
üst f850bbb4
...@@ -149,7 +149,12 @@ void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY, ...@@ -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 ) ...@@ -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);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment