aggpas: TAggLCLCanvas.AggTextOut adding font size

git-svn-id: trunk@22875 -
This commit is contained in:
mattias 2009-11-30 12:13:22 +00:00
parent a13c723a8d
commit 0d6e68ae9b
2 changed files with 13 additions and 3 deletions

View File

@ -716,14 +716,14 @@ type
procedure AggCopyImage(SrcImage: TAggFPImage; const dstX ,dstY: double);
// text
function AggTextWidth(str : AnsiString ) : double;
function AggTextHeight(str : AnsiString ) : double;
function AggTextWidth(str : AnsiString ) : double; virtual;
function AggTextHeight(str : AnsiString ) : double; virtual;
procedure AggTextOut(
const x ,y : double;
str : AnsiString;
roundOff : boolean = false;
const ddx : double = 0.0;
const ddy : double = 0.0 );
const ddy : double = 0.0 ); virtual;
end;
function FPToAggColor(const c: TFPColor): TAggColor;

View File

@ -21,6 +21,7 @@ type
TAggLCLImage = class(TAggFPImage)
private
FIntfImg: TLazIntfImage;
protected
procedure ReallocData; override;
public
constructor Create(AWidth, AHeight: integer); override;
@ -107,6 +108,9 @@ type
procedure FillRect(const ARect: TRect); virtual; // no border
procedure FillRect(X1,Y1,X2,Y2: Integer); // no border
procedure AggTextOut(const x, y: double; str: AnsiString;
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
@ -271,6 +275,12 @@ begin
AggDrawPath(AGG_FillOnly);
end;
procedure TAggLCLCanvas.AggTextOut(const x, y: double; str: AnsiString;
roundOff: boolean; const ddx: double; const ddy: double);
begin
inherited AggTextOut(x, y+Font.Size, str, roundOff, ddx, ddy);
end;
procedure TAggLCLCanvas.Frame(const ARect: TRect);
begin
Frame(ARect.Left,ARect.Top,ARect.Right,ARect.Bottom);