#1 2016-04-14 13:06:13

LoukaO
Member
Registered: 2016-04-14
Posts: 1

Flag TA_UPDATECP not correctly handled - fix included

Hello,

Thanks for this nice library you made. We've been using it for some time in our company. I encountered a problem using TextOut with a GDI canvas and TA_UPDATECP flag.

You were not updating the position correctly after printing the screen, resulting in always drawing over previous text if you called several times TextOut.

The last lines of TextOut were

    end else
      Canvas.fNewPath := False;
    if (font.align and TA_UPDATECP)=TA_UPDATECP then
      Position := Pos;
  end;

but they should be

    end else
      Canvas.fNewPath := False;
    if (font.align and TA_UPDATECP)=TA_UPDATECP then
      Position := Posi + Point(round(wW), 0);
  end;

My fix may not be perfect but it works, I'm not a native delphi programmer I'm afraid sad

Regards,

Louka

Last edited by LoukaO (2016-04-14 13:20:26)

Offline

#2 2016-04-14 15:53:26

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,662
Website

Re: Flag TA_UPDATECP not correctly handled - fix included

Should be included by http://synopse.info/fossil/info/1872de88b8

Thanks for the input!

Offline

Board footer

Powered by FluxBB