diff options
author | Graeme Geldenhuys <graemeg@users.sourceforge.net> | 2006-11-24 12:44:51 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@users.sourceforge.net> | 2006-11-24 12:44:51 +0000 |
commit | faff3f5262c5f972604b70c3f8d22364e9e0c024 (patch) | |
tree | a921cfe7681d3ddd1e4e178bff5b54f5c73a25fe /examples/gfx | |
parent | b518d1e683ac1dcaa2ba9d2a9770b7b29ea05140 (diff) | |
download | fpGUI-faff3f5262c5f972604b70c3f8d22364e9e0c024.tar.xz |
* Moved the Title property from TFApplication to TFCustomApplication
* Removed a lot of compiler warnings under Linux.
* Fixe a bug where TX11Canvas.DoCopyRect was using a local unused variable
instead of the passed in param.
Diffstat (limited to 'examples/gfx')
-rw-r--r-- | examples/gfx/imgtest/imgtest.lpi | 5 | ||||
-rw-r--r-- | examples/gfx/imgtest/imgtest.pas | 15 |
2 files changed, 7 insertions, 13 deletions
diff --git a/examples/gfx/imgtest/imgtest.lpi b/examples/gfx/imgtest/imgtest.lpi index fefabc63..c507609d 100644 --- a/examples/gfx/imgtest/imgtest.lpi +++ b/examples/gfx/imgtest/imgtest.lpi @@ -1,7 +1,7 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="\"/> + <PathDelim Value="/"/> <Version Value="5"/> <General> <Flags> @@ -20,7 +20,7 @@ <RunParams> <local> <FormatVersion Value="1"/> - <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/> + <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> </local> </RunParams> <RequiredPackages Count="1"> @@ -39,7 +39,6 @@ </ProjectOptions> <CompilerOptions> <Version Value="5"/> - <PathDelim Value="\"/> <CodeGeneration> <Generate Value="Faster"/> </CodeGeneration> diff --git a/examples/gfx/imgtest/imgtest.pas b/examples/gfx/imgtest/imgtest.pas index 33fad0fb..ad6d4f5f 100644 --- a/examples/gfx/imgtest/imgtest.pas +++ b/examples/gfx/imgtest/imgtest.pas @@ -23,11 +23,11 @@ uses type TMainWindow = class(TFWindow) - procedure Paint(Sender: TObject; const Rect: TRect); private Bitmap: TFBitmap; + procedure Paint(Sender: TObject; const Rect: TRect); public - constructor Create; + constructor Create; overload; destructor Destroy; override; end; @@ -39,6 +39,8 @@ var i, j: Integer; begin inherited Create(nil, [woWindow]); + Data := nil; + Stride := 0; Title := 'fpGFX Bitmap Test'; OnPaint := @Paint; @@ -56,20 +58,13 @@ end; destructor TMainWindow.Destroy; begin Bitmap.Free; - inherited Destroy; end; procedure TMainWindow.Paint(Sender: TObject; const Rect: TRect); -var - r: TRect; begin Canvas.SetColor(colBlue); - r.Left := 0; - r.Top := 0; - r.Right := Width; - r.Bottom := Height; - Canvas.FillRect(r); + Canvas.FillRect(Rect); Canvas.DrawImage(Bitmap, Point(0, 0)); end; |