Board index » cppbuilder » TextOut in inveser color?
Harish
![]() CBuilder Developer |
Harish
![]() CBuilder Developer |
TextOut in inveser color?2007-07-27 05:49:09 PM cppbuilder18 The TPen->Mode property does not seem to have any effect on TextOut() function. Is it possible to write text with pmNot (inverse of canvas color) option? (TFont does not have mode member.) |
matteo.gattanini
![]() CBuilder Developer |
2007-07-27 07:45:40 PM
Re:TextOut in inveser color?
On 27 Lug, 11:49, "Harish" < XXXX@XXXXX.COM >wrote:
QuoteThe TPen->Mode property does not BeginPath(PaintBox1->Canvas->Handle); PaintBox1->Canvas->TextOut(P.x,P.y,s); EndPath(PaintBox1->Canvas->Handle); PaintBox1->Canvas->Pen->Mode = pmNot ; //::StrokeAndFillPath(PaintBox1->Canvas->Handle); ::FillPath(PaintBox1->Canvas->Handle); |
Stephen R. Phillips
![]() CBuilder Developer |
2007-07-27 08:49:21 PM
Re:TextOut in inveser color?
Harish wrote:
QuoteThe TPen->Mode property does not Then you create a TRect and use FillRect (which uses the BRUSH not the pen). Then set the font color to whatever 'inverse' color you want. I know there are other ways of doing it. However it's been numerous years since I've played with TCanvas proprerties etc. Stephen {smallsort} |
Damon Chandler (TeamB)
![]() CBuilder Developer |
2007-07-31 10:54:12 PM
Re:TextOut in inveser color?
Hi Harish,
You can do this by using an intermediate bitmap. Have a look at the following post... tinyurl.com/2ebq3e Cheers, Harish wrote: QuoteThe TPen->Mode property does not |