Skip to content
Permalink
Browse files

LazFreeType: Fix flickering in the example

git-svn-id: http://svn.freepascal.org/svn/lazarus/trunk@40103 4005530d-fff6-0310-9dd1-cebe43e6787f
  • Loading branch information
ask
ask committed Jan 31, 2013
1 parent 2ee7f03 commit 3b0b23f4ad04364f81558f95e79d9030408eff0b
@@ -45,6 +45,7 @@
<Filename Value="mainform.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="mainform"/>
</Unit1>
@@ -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
@@ -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 @@ TForm1 = class(TForm)
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;

0 comments on commit 3b0b23f

Please sign in to comment.
You can’t perform that action at this time.