diff options
author | sekelsenmat <sekelsenmat@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-11 11:27:12 +0000 |
---|---|---|
committer | sekelsenmat <sekelsenmat@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-11 11:27:12 +0000 |
commit | 206939d343826dfbe7e39189dbcbfc61840aa6fe (patch) | |
tree | 4b548b48aff5e59bac75363172dee53c737439f7 /examples | |
parent | 6d1c5274aacdf55d21b98a7e61b2d3a100fbd9eb (diff) | |
download | fpGUI-206939d343826dfbe7e39189dbcbfc61840aa6fe.tar.xz |
Removed Rect parameter from Paint event
Diffstat (limited to 'examples')
-rw-r--r-- | examples/gfx/helloworld/helloworld.pas | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/gfx/helloworld/helloworld.pas b/examples/gfx/helloworld/helloworld.pas index 2abafac7..eec336a7 100644 --- a/examples/gfx/helloworld/helloworld.pas +++ b/examples/gfx/helloworld/helloworld.pas @@ -34,11 +34,11 @@ type public Font: TFCustomFont; TextSize: TSize; - procedure Paint(Sender: TObject; const Rect: TRect); + procedure Paint(Sender: TObject); constructor Create; end; -procedure TMainWindow.Paint(Sender: TObject; const Rect: TRect); +procedure TMainWindow.Paint(Sender: TObject); var Color: TGfxColor; r: TRect; @@ -47,9 +47,9 @@ begin Color.Red := 0; Color.Green := 0; Color.Alpha := 0; - r.Left := Rect.Left; - r.Right := Rect.Right; - for i := Rect.Top to Rect.Bottom - 1 do + r.Left := 0; + r.Right := Width; + for i := 0 to Height - 1 do begin Color.Blue := $ffff - (i * $ffff) div ClientHeight; Canvas.SetColor(Color); |