mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 15:48:03 +02:00
aggpas: fixed win32 compilation
git-svn-id: trunk@21995 -
This commit is contained in:
parent
1fe0e7fad4
commit
50874df45f
@ -5,8 +5,8 @@ unit Unit1;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
FPimage, agg_fpimage, Agg_LCL;
|
||||
Classes, SysUtils, LCLProc, FileUtil, LResources, Forms, Controls, Graphics,
|
||||
Dialogs, FPimage, agg_fpimage, Agg_LCL;
|
||||
|
||||
type
|
||||
|
||||
@ -30,6 +30,8 @@ implementation
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
var
|
||||
FontFilename: String;
|
||||
begin
|
||||
Bitmap1:=TBitmap.Create;
|
||||
AggLCLCanvas:=TAggLCLCanvas.Create;
|
||||
@ -56,7 +58,9 @@ begin
|
||||
Ellipse(40,65,120,130);
|
||||
|
||||
// solid blue text
|
||||
Font.LoadFromFile('../../verdana.ttf');
|
||||
FontFilename:=SetDirSeparators('../../verdana.ttf');
|
||||
DebugLn(['TForm1.FormCreate ',FontFilename,' ',FileExists(FontFilename)]);
|
||||
Font.LoadFromFile(FontFilename);
|
||||
Font.Size:=18;
|
||||
Font.Color:=clRed;
|
||||
TextOut(10,30,'LCL and AggPas');
|
||||
|
@ -9,11 +9,12 @@
|
||||
//
|
||||
unit agg_fpimage;
|
||||
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
{$IFDEF LINUX}
|
||||
{$IFNDEF WINDOWS}
|
||||
{$DEFINE AGG2D_USE_FREETYPE}
|
||||
{$ENDIF}
|
||||
|
||||
@ -60,7 +61,7 @@ uses
|
||||
{$ENDIF }
|
||||
|
||||
Math, types ,
|
||||
{$IFDEF AGG_WINDOWS}
|
||||
{$IFDEF WINDOWS}
|
||||
Windows ,
|
||||
{$ENDIF}
|
||||
|
||||
@ -3377,13 +3378,15 @@ begin
|
||||
end;
|
||||
|
||||
procedure TAggFPFont.SetAggHeight(const AValue: double);
|
||||
{$IFDEF AGG2D_USE_FREETYPE}
|
||||
var
|
||||
c: TAggFPCanvas;
|
||||
{$ENDIF}
|
||||
begin
|
||||
if FAggHeight=AValue then exit;
|
||||
FAggHeight:=AValue;
|
||||
c:=TAggFPCanvas(Canvas);
|
||||
{$IFDEF AGG2D_USE_FREETYPE}
|
||||
c:=TAggFPCanvas(Canvas);
|
||||
if FAggCache = AGG_VectorFontCache then
|
||||
c.m_fontEngine.height_(FAggHeight )
|
||||
else
|
||||
@ -3448,7 +3451,8 @@ procedure TAggFPFont.LoadFromFile(aFilename: String; const NewHeight: double;
|
||||
const NewBold: boolean; const NewItalic: boolean;
|
||||
const NewCache: TAggFontCacheType; const NewAngle: double;
|
||||
const NewHinting: boolean);
|
||||
{$IFNDEF AGG2D_USE_FREETYPE }
|
||||
{$IFDEF AGG2D_USE_FREETYPE }
|
||||
{$ELSE}
|
||||
var
|
||||
b : int;
|
||||
{$ENDIF}
|
||||
@ -3489,7 +3493,7 @@ begin
|
||||
b:=400;
|
||||
|
||||
if FAggCache = AGG_VectorFontCache then
|
||||
c.m_fontEngine.create_font_(PChar(@AFleName[1 ] ) ,glyph_ren_outline ,
|
||||
c.m_fontEngine.create_font_(PChar(@AFileName[1 ] ) ,glyph_ren_outline ,
|
||||
FAggHeight ,0.0 ,b ,Italic )
|
||||
else
|
||||
c.m_fontEngine.create_font_(PChar(@AFileName[1 ] ) ,glyph_ren_agg_gray8 ,
|
||||
|
Loading…
Reference in New Issue
Block a user