summaryrefslogtreecommitdiff
path: root/examples/gfx
diff options
context:
space:
mode:
authorsekelsenmat <sekelsenmat@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-07-12 06:57:49 +0000
committersekelsenmat <sekelsenmat@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-07-12 06:57:49 +0000
commit0b1c5f7ce659f63f00f3b7c408871bd35e6f7456 (patch)
tree731f694fd08231c9c8f76adab9393f9f12f001cb /examples/gfx
parent8bf4f37e3b99775cf9f6253077217ac0174771e0 (diff)
downloadfpGUI-0b1c5f7ce659f63f00f3b7c408871bd35e6f7456.tar.xz
Fixed compilation on X11 and adapted its code to the new pixel format
Diffstat (limited to 'examples/gfx')
-rw-r--r--examples/gfx/imgtest/imgtest.pas13
-rw-r--r--examples/gfx/subwindow/subwindow.lpi7
2 files changed, 13 insertions, 7 deletions
diff --git a/examples/gfx/imgtest/imgtest.pas b/examples/gfx/imgtest/imgtest.pas
index f1c39b22..26c4b247 100644
--- a/examples/gfx/imgtest/imgtest.pas
+++ b/examples/gfx/imgtest/imgtest.pas
@@ -30,7 +30,7 @@ type
TMainWindow = class(TFWindow)
private
Bitmap: TFBitmap;
- procedure Paint(Sender: TObject; const Rect: TRect);
+ procedure Paint(Sender: TObject);
public
constructor Create; overload;
destructor Destroy; override;
@@ -66,10 +66,17 @@ begin
inherited Destroy;
end;
-procedure TMainWindow.Paint(Sender: TObject; const Rect: TRect);
+procedure TMainWindow.Paint(Sender: TObject);
+var
+ ARect: TRect;
begin
+ ARect.Left := Left;
+ ARect.Top := Top;
+ ARect.Right := Left + Width;
+ ARect.Bottom := Top + Height;
+
Canvas.SetColor(colBlue);
- Canvas.FillRect(Rect);
+ Canvas.FillRect(ARect);
Canvas.DrawImage(Bitmap, Point(0, 0));
end;
diff --git a/examples/gfx/subwindow/subwindow.lpi b/examples/gfx/subwindow/subwindow.lpi
index 88f43f80..d2f61887 100644
--- a/examples/gfx/subwindow/subwindow.lpi
+++ b/examples/gfx/subwindow/subwindow.lpi
@@ -1,12 +1,12 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="\"/>
+ <PathDelim Value="/"/>
<Version Value="5"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value=".\"/>
+ <IconPath Value="./"/>
<TargetFileExt Value=".exe"/>
</General>
<VersionInfo>
@@ -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">
@@ -38,7 +38,6 @@
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
- <PathDelim Value="\"/>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>