[Lazarus] Stretching Antialiasing in win32

Martin Friebe lazarus at mfriebe.de
Thu Dec 11 00:45:10 CET 2008


Felipe Monteiro de Carvalho wrote:
> Hello,
>
> When I execute the StretchBlt windows API in the magnifier I get
> different results in Delphi and in Lazarus:
>
>   Windows.StretchBlt(DestCanvas.Handle, drawGlassRect.Left, drawGlassRect.Top,
>    drawGlassWidth, drawGlassHeight,
>    bmpDisplay.Canvas.Handle, viewRect.Left, viewRect.Top,
>    viewRectWidth, viewRectHeight, dwROP);
>
> In Lazarus there is notice some anti-aliasing. When magnifying the
> same synedit text in delphi and lazarus, after 14x or so I start to
> see grey dots near the text and in Delphi I don't. Actually the grey
> dots are also square, so they actually look like as if they were part
> of the text, but they cannot be, because I saw the same text with
> delphi.
>
> Setting the canvas Antialiasingmode property has no effect.
>
> Any ideas why this happens? It's not necessarely bad, but I would like
> to control this via the antialiasing property.
>   
Your font may be drawn using anti-aliasing before you magnify/stretch 
the bitmap, so you would see the grey areas caused by the anti aliasing.

If it is synedit, check either the font antialiasing/quality property in 
object inspector (if you use synedit as component).
Or Environment=>options=>Editor=>Display  there is a checkbox "Disable 
anti aliasing"

Best regards
Martin



More information about the Lazarus mailing list