summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authormatteocam <matteo.campanelli@gmail.com>2014-05-27 11:35:40 -0400
committerFridrich Štrba <fridrich.strba@bluewin.ch>2014-06-30 22:54:38 +0200
commit6b490f6be9cd87c813c97560f3ca6d0790c54c37 (patch)
treea2372e234cd77f4cde716ec41b4f71ca2ccff781 /vcl
parentf850bbb4cb28014ac420e53ee86cda528a0943cc (diff)
Transparency by replacing DrawRect
Change-Id: I5ba220df841cbe650c910c1c7bc1815900f13c53 (cherry picked from commit 6ec2a1a6922d22fa5efb25982b0b51cef7a97499)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/outdev/text.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 9492892ae17c..8da85a6a21d9 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -149,7 +149,12 @@ void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY,
nX += nBaseX;
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 )
@@ -474,12 +479,12 @@ void OutputDevice::ImplDrawText( SalLayout& rSalLayout )
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
*/
if (mbTextBackground) {
- // set right background
- Color aColor = COL_BLUE;
+ // set right background // (XXX: now getting fixed color)
+ Color aColor = RGB_COLORDATA(0x66,0x66, 0xFF); // blue-ish
// SetBackground does not work
SetTextFillColor(aColor);
}