From 0f38c8497fd2a9348fe0eac9a823683e75989873 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Tue, 28 Nov 2006 12:54:17 +0000 Subject: * Starting fixing up the utfdemo for use with the new GFX. * Minor code formatting of IMG code --- examples/img/disp_bmp/disp_bmp.pas | 51 ++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 29 deletions(-) (limited to 'examples/img/disp_bmp') diff --git a/examples/img/disp_bmp/disp_bmp.pas b/examples/img/disp_bmp/disp_bmp.pas index a33bf9be..553041c0 100644 --- a/examples/img/disp_bmp/disp_bmp.pas +++ b/examples/img/disp_bmp/disp_bmp.pas @@ -1,14 +1,13 @@ { - $Id: disp_bmp.pp,v 1.6 2001/02/14 23:08:59 sg Exp $ + fpGUI - Free Pascal GUI Library - fpImg - Free Pascal Imaging Library - Copyright (C) 2000 - 2001 by - Areca Systems GmbH / Sebastian Guenther, sg@freepascal.org + Example: Display BMP file using the fpImg - Free Pascal Imaging Library - Example: Display BMP file + Copyright (C) 2000 - 2006 See the file AUTHORS.txt, included in this + distribution, for details of the copyright. - See the file COPYING, included in this distribution, - for details about the copyright. + See the file COPYING.modifiedLGPL, included in this distribution, + for details about redistributing fpGUI. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -18,7 +17,14 @@ program Disp_BMP; -uses Classes, GFXBase, GFXImpl, fpImg, BMPReader; +uses + Classes + ,GFXBase + ,GFXImpl + ,fpImg + ,BMPReader + ,fpgfxpackage + ; type TMainWindow = class @@ -29,17 +35,17 @@ type Image: TGfxImage; public constructor Create(ADisplay: TDefDisplay); - destructor Destroy; override; + destructor Destroy; override; end; constructor TMainWindow.Create(ADisplay: TDefDisplay); begin inherited Create; - Display := ADisplay; - Image := CreateImageFromFile(Display.DefaultScreen, TBMPReader, ParamStr(1)); - Window := ADisplay.DefaultScreen.CreateWindow; - Window.Title := 'fpImg Bitmap Test'; - Window.OnPaint := @Paint; + Display := ADisplay; + Image := CreateImageFromFile(Display.DefaultScreen, TBMPReader, ParamStr(1)); + Window := ADisplay.DefaultScreen.CreateWindow; + Window.Title := 'fpImg Bitmap Test'; + Window.OnPaint := @Paint; Window.SetFixedClientSize(Size(Image.Width, Image.Height)); Window.Show; end; @@ -68,23 +74,10 @@ begin Halt(2); end; - Display := TDefDisplay.Create; - MainWindow := TMainWindow.Create(Display); + Display := TDefDisplay.Create; + MainWindow := TMainWindow.Create(Display); Display.Run; MainWindow.Free; Display.Free; end. - -{ - $Log: disp_bmp.pp,v $ - Revision 1.6 2001/02/14 23:08:59 sg - * Adapted to changes in fpGFX interface - - Revision 1.5 2001/02/09 20:49:03 sg - * Adapted to recent improvements in fpGFX interfaces - - Revision 1.4 2001/01/11 23:21:53 sg - *** empty log message *** - -} -- cgit v1.2.3-70-g09d2