26-02-2012, 03:14 PM
السلام عليكم و رحمة الله تعالى و بركاته
على مايبدو ان هذه هي Procedure لكنها تختلف و الله اعلم
مع هذه الثانية
على مايبدو ان هذه هي Procedure لكنها تختلف و الله اعلم
PHP كود :
procedure SPDrawText3(Cnvs: TCanvas; S: String; R: TRect; HorOffset: Integer);
var
TX, TY: Integer;
begin
if S = '' then Exit;
TX := R.Left + 2 + HorOffset;
TY := R.Top + RectHeight(R) div 2 - Cnvs.TextHeight(S) div 2;
//
if (Cnvs.Font.Height div 2) <> (Cnvs.Font.Height / 2) then Dec(TY, 1);
//
Cnvs.TextRect(R, TX, TY, S);
end;
مع هذه الثانية
PHP كود :
procedure SPDrawText2(Cnvs: TCanvas; S: String; R: TRect);
var
TX, TY: Integer;
begin
if S = '' then Exit;
TX := R.Left + 2;
TY := R.Top + RectHeight(R) div 2 - Cnvs.TextHeight(S) div 2;
//
if (Cnvs.Font.Height div 2) <> (Cnvs.Font.Height / 2) then Dec(TY, 1);
//
Cnvs.TextRect(R, TX, TY, S);
end;

