Marc Weustink schreef:
Vincent Snijders wrote:
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?



I just noticed, that if you put a label on a form and leave the color unchanged at clNone, it is painted with a white background. I think this is caused by the patch above.

?? shouldn't have it in this case parentcolor = true ?

Currently TCustomLabel.Create sets
  Color := clNone
which effectively set ParentColor to false.

Vincent

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

Reply via email to