Mattias Gaertner schreef:
On Mon, 05 Feb 2007 11:36:13 +0100
Vincent Snijders <[EMAIL PROTECTED]> wrote:

Павел Ишенин schreef:
Hello.

I found one incompability with TCanvas.TextOut method:
1) In Delphi TCanvas.TextOut calls Windows.ExtTextOut wich fills bachground with brush
2) In Lazarus TCanas.TextOut use fpc canvas class to draw text and
it works without filling text area with brush.
That is not what I found. It calls Windows.ExtTextOut too.

I found out that, changing line 138 of canvas.inc from
   SetBkMode(FHandle, TRANSPARENT);
to
   SetBkMode(FHandle, OPAQUE);
fixes this problem.

For Delphi compatibility I replaced it with:
  if Brush.Style=bsSolid then
    SetBkMode(FHandle, OPAQUE)
  else
    SetBkMode(FHandle, TRANSPARENT);

Does this fix the problem?


Yes, it does. :-)

Vincent

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to