summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-07-10 15:11:43 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-07-10 15:11:43 +0000
commita9131ca787efb6bec6b76c64788095cd621ef4c9 (patch)
tree8063fd537e2bf92832417f0730923987dd662302
parentdffb83eaa983de52a355f9b279c6c76110fe047c (diff)
downloadfpGUI-a9131ca787efb6bec6b76c64788095cd621ef4c9.tar.xz
* Minor fix to get Canvas.Pixels[] to work under Windows.
-rw-r--r--prototypes/fpgui2/source/core/gdi/gfx_gdi.pas4
-rw-r--r--prototypes/fpgui2/tests/fpgcanvas.lpi8
2 files changed, 7 insertions, 5 deletions
diff --git a/prototypes/fpgui2/source/core/gdi/gfx_gdi.pas b/prototypes/fpgui2/source/core/gdi/gfx_gdi.pas
index 9838940f..c50415a8 100644
--- a/prototypes/fpgui2/source/core/gdi/gfx_gdi.pas
+++ b/prototypes/fpgui2/source/core/gdi/gfx_gdi.pas
@@ -1020,7 +1020,7 @@ end;
procedure TfpgCanvasImpl.SetPixel(X, Y: integer; const AValue: TfpgColor);
begin
- Windows.SetPixel(FDrawWindow.FWinHandle, X, Y, fpgColorToWin(AValue));
+ Windows.SetPixel(Fgc, X, Y, fpgColorToWin(AValue));
end;
procedure TfpgCanvasImpl.DoPutBufferToScreen(x, y, w, h: TfpgCoord);
@@ -1056,7 +1056,7 @@ begin
pts[2].X := x2;
pts[2].Y := y2;
PolyLine(Fgc, pts, 2);
- SetPixel(Fgc, x2, y2, FWindowsColor);
+ Windows.SetPixel(Fgc, x2, y2, FWindowsColor);
end;
procedure TfpgCanvasImpl.DoDrawRectangle(x, y, w, h: TfpgCoord);
diff --git a/prototypes/fpgui2/tests/fpgcanvas.lpi b/prototypes/fpgui2/tests/fpgcanvas.lpi
index 9c070422..c85685b5 100644
--- a/prototypes/fpgui2/tests/fpgcanvas.lpi
+++ b/prototypes/fpgui2/tests/fpgcanvas.lpi
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
+ <PathDelim Value="\"/>
<Version Value="5"/>
<General>
<Flags>
@@ -9,7 +9,7 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
+ <IconPath Value=".\"/>
<TargetFileExt Value=""/>
<Title Value="fpcanvas"/>
</General>
@@ -18,13 +18,14 @@
</VersionInfo>
<PublishOptions>
<Version Value="2"/>
+ <DestinationDirectory Value="$(TestDir)\publishedproject\"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<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">
@@ -42,6 +43,7 @@
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
+ <PathDelim Value="\"/>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>