gtk2 intf: improved layout text optimization by length parameter

git-svn-id: trunk@15763 -
This commit is contained in:
mattias 2008-07-13 15:44:56 +00:00
parent 7e001b2934
commit fbcc1bc581
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ type
procedure DrawTextWithColors(AText: PChar; ALength: LongInt; X, Y: Integer; FGColor, BGColor: PGdkColor);
end;
procedure SetLayoutText(ALayout: PPangoLayout; AText: PChar; ALength: LongInt);
procedure SetLayoutText(ALayout: PPangoLayout; AText: PChar; ALength: PtrInt);
implementation
{$i gtk2devicecontext.inc}

View File

@ -24,12 +24,12 @@
// {$DEFINE ASSERT_IS_ON}
{$ENDIF}
procedure SetLayoutText(ALayout: PPangoLayout; AText: PChar; ALength: LongInt);
procedure SetLayoutText(ALayout: PPangoLayout; AText: PChar; ALength: PtrInt);
var
OldStr: PChar;
begin
OldStr := pango_layout_get_text(ALayout);
if (strcomp(AText, OldStr) <> 0) then
if (strlcomp(AText, OldStr, ALength) <> 0) then
pango_layout_set_text(ALayout, AText, ALength);
end;