LazFreeType: Fix flickering in the example

git-svn-id: trunk@40103 -
This commit is contained in:
ask 2013-01-31 22:18:22 +00:00
parent cba980b847
commit 7e7ddd626e
3 changed files with 12 additions and 7 deletions

View File

@ -45,6 +45,7 @@
<Filename Value="mainform.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="mainform"/>
</Unit1>

View File

@ -12,7 +12,7 @@ object Form1: TForm1
OnDestroy = FormDestroy
OnMouseMove = FormMouseMove
OnPaint = FormPaint
LCLVersion = '0.9.31'
LCLVersion = '1.1'
object Panel_Option: TPanel
Left = 0
Height = 40
@ -48,15 +48,15 @@ object Form1: TForm1
end
object Label1: TLabel
Left = 6
Height = 16
Height = 13
Top = 12
Width = 33
Width = 26
Caption = 'Zoom'
ParentColor = False
end
object SpinEdit_Zoom: TSpinEdit
Left = 48
Height = 23
Height = 21
Top = 8
Width = 40
MaxValue = 9

View File

@ -6,7 +6,7 @@ interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
ComCtrls, ExtCtrls, Spin, fpimage,
ComCtrls, ExtCtrls, Spin, fpimage, LCLType,
IntfGraphics, GraphType, //Intf basic routines
@ -32,13 +32,12 @@ type
procedure TrackBar_SizeChange(Sender: TObject);
private
procedure UpdateSizeLabel;
{ private declarations }
public
{ public declarations }
lazimg: TLazIntfImage;
drawer: TIntfFreeTypeDrawer;
ftFont1,ftFont2,ftFont3: TFreeTypeFont;
mx,my: integer; //mouse position
procedure EraseBackground(DC: HDC); override;
end;
var
@ -48,6 +47,11 @@ implementation
{ TForm1 }
procedure TForm1.EraseBackground(DC: HDC);
begin
// empty
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
mx := clientwidth div 2;