aggpas: improved textout position

git-svn-id: trunk@22927 -
This commit is contained in:
mattias 2009-12-02 14:33:26 +00:00
parent 750e586cee
commit 30d56517ec
2 changed files with 8 additions and 8 deletions

View File

@ -52,7 +52,7 @@ begin
FontFilename:=SetDirSeparators('../../verdana.ttf');
if not FileExists(FontFilename) then raise Exception.Create('file not found: '+FontFilename+' CurDir='+GetCurrentDirUTF8);
Font.LoadFromFile(FontFilename);
Font.Size:=18;
Font.Size:=10;
Font.Color:=clRed;
end;
@ -81,11 +81,11 @@ begin
// paint with widgetset to bitmap
with Bitmap1.Canvas do begin
Font.Size:=18;
Font.Size:=10;
Font.Color:=clRed;
Brush.Color:=clBlue;
Pen.Color:=clRed;
Brush.Color:=clRed;
Pen.Color:=clBlue;
Pen.Width:=1;
Line(24,10,34,10);
@ -97,7 +97,7 @@ begin
GradientFill(Rect(70,22,80,32),clRed,clBlue,gdVertical);
Frame(85,22,95,32);
TextOut(10,65,'Font.Size='+IntToStr(Font.Size));
TextOut(10,52,'Font.Size='+IntToStr(Font.Size));
end;
end;

View File

@ -117,8 +117,8 @@ type
roundOff: boolean=false;
const ddx: double=0.0; const ddy: double=0.0); override;
procedure Frame(const ARect: TRect); virtual; // border using pen
procedure Frame(X1,Y1,X2,Y2: Integer); // border using pen
procedure Frame(const ARect: TRect); virtual; // ToDo: border using brush
procedure Frame(X1,Y1,X2,Y2: Integer); // ToDo: border using brush
procedure GradientFill(ARect: TRect; AStart, AStop: TColor; ADirection: TGradientDirection);
end;
@ -283,7 +283,7 @@ end;
procedure TAggLCLCanvas.AggTextOut(const x, y: double; str: AnsiString;
roundOff: boolean; const ddx: double; const ddy: double);
begin
inherited AggTextOut(x+0.5, y+Font.Size+0.5, str, roundOff, ddx, ddy);
inherited AggTextOut(x-0.5, y+Font.Size+0.5, str, roundOff, ddx, ddy);
end;
procedure TAggLCLCanvas.Frame(const ARect: TRect);