diff options
Diffstat (limited to 'examples/gfx/imgtest')
-rw-r--r-- | examples/gfx/imgtest/imgtest.lpi | 5 | ||||
-rw-r--r-- | examples/gfx/imgtest/imgtest.pas | 21 |
2 files changed, 14 insertions, 12 deletions
diff --git a/examples/gfx/imgtest/imgtest.lpi b/examples/gfx/imgtest/imgtest.lpi index c507609d..fefabc63 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,6 +39,7 @@ </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 98e9cecb..33fad0fb 100644 --- a/examples/gfx/imgtest/imgtest.pas +++ b/examples/gfx/imgtest/imgtest.pas @@ -3,7 +3,7 @@ Image Test example - Copyright (C) 2000 - 2006 See the file AUTHORS, included in this + Copyright (C) 2000 - 2006 See the file AUTHORS.txt, included in this distribution, for details of the copyright. See the file COPYING.modifiedLGPL, included in this distribution, @@ -25,7 +25,7 @@ type TMainWindow = class(TFWindow) procedure Paint(Sender: TObject; const Rect: TRect); private - Image: TFImage; + Bitmap: TFBitmap; public constructor Create; destructor Destroy; override; @@ -45,17 +45,18 @@ begin SetClientSize(Size(256, 256)); SetMinMaxClientSize(Size(256, 256), Size(256, 256)); - Image := TFImage.Create(256, 256, PixelFormatRGB32); - Image.Lock(Data, Stride); + Bitmap := TFBitmap.Create(256, 256, PixelFormatRGB32); + Bitmap.Lock(Data, Stride); for j := 0 to 255 do for i := 0 to 255 do PLongWord(Data)[j * 256 + i] := (i shl 16) or (j shl 8); - Image.Unlock; + Bitmap.Unlock; end; destructor TMainWindow.Destroy; begin - Image.Free; + Bitmap.Free; + inherited Destroy; end; @@ -69,7 +70,7 @@ begin r.Right := Width; r.Bottom := Height; Canvas.FillRect(r); - Canvas.DrawImage(Image, Point(0, 0)); + Canvas.DrawImage(Bitmap, Point(0, 0)); end; @@ -77,11 +78,11 @@ var MainWindow: TMainWindow; begin - gApplication.Initialize; + GFApplication.Initialize; MainWindow := TMainWindow.Create; - gApplication.AddWindow(MainWindow); + GFApplication.AddWindow(MainWindow); MainWindow.Show; - gApplication.Run; + GFApplication.Run; end. |