summaryrefslogtreecommitdiff
path: root/prototypes
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-07-18 13:42:21 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-07-18 13:42:21 +0000
commit6912daab751789ccf29ba28a1044e11acd277472 (patch)
tree085fd9336966bb4c6992707f60fec5d62bca59b4 /prototypes
parent45b155cbdfd40f4b836c291867c1032d5e38c582 (diff)
downloadfpGUI-6912daab751789ccf29ba28a1044e11acd277472.tar.xz
* Minor fixes with line and rectangle drawing.
Diffstat (limited to 'prototypes')
-rw-r--r--prototypes/fpgui2/examples/core/canvastest/fpgcanvas.lpi8
-rw-r--r--prototypes/fpgui2/examples/core/canvastest/fpgcanvas.lpr14
-rw-r--r--prototypes/fpgui2/source/core/fpgfx.pas2
-rw-r--r--prototypes/fpgui2/source/core/x11/gfx_x11.pas2
4 files changed, 19 insertions, 7 deletions
diff --git a/prototypes/fpgui2/examples/core/canvastest/fpgcanvas.lpi b/prototypes/fpgui2/examples/core/canvastest/fpgcanvas.lpi
index c85685b5..9c070422 100644
--- a/prototypes/fpgui2/examples/core/canvastest/fpgcanvas.lpi
+++ b/prototypes/fpgui2/examples/core/canvastest/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,14 +18,13 @@
</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">
@@ -43,7 +42,6 @@
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
- <PathDelim Value="\"/>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
diff --git a/prototypes/fpgui2/examples/core/canvastest/fpgcanvas.lpr b/prototypes/fpgui2/examples/core/canvastest/fpgcanvas.lpr
index 0f6b560f..4e3b0944 100644
--- a/prototypes/fpgui2/examples/core/canvastest/fpgcanvas.lpr
+++ b/prototypes/fpgui2/examples/core/canvastest/fpgcanvas.lpr
@@ -129,6 +129,20 @@ begin
Canvas.DrawImage(150, 300, dst);
Canvas.StretchDraw(180, 300, 70, 70, dst);
Canvas.StretchDraw(265, 300, 230, 25, bmp);
+
+
+ // testing accuracy of line/rectangle drawing
+ Canvas.SetColor(clBlack);
+ Canvas.SetLineStyle(1, lsSolid);
+ r.Top := 302;
+ r.Left := 182;
+ r.Width := 66;
+ r.Height := 66;
+ Canvas.DrawRectangle(r);
+
+ Canvas.SetColor(clBlue);
+ Canvas.DrawLine(183, 303, 247, 303);
+
// Stretch(bmp, dst, ResampleFilters[6].Filter, ResampleFilters[6].Width);
//// Canvas.DrawImage(150, 240, bmp);
diff --git a/prototypes/fpgui2/source/core/fpgfx.pas b/prototypes/fpgui2/source/core/fpgfx.pas
index e62e0c3f..fce957ce 100644
--- a/prototypes/fpgui2/source/core/fpgfx.pas
+++ b/prototypes/fpgui2/source/core/fpgfx.pas
@@ -768,7 +768,7 @@ begin
end
else
ACanvas.SetColor(clHilite1);
- ACanvas.DrawLine(x, y+h, x, y); // left
+ ACanvas.DrawLine(x, y+h-1, x, y); // left
ACanvas.DrawLine(x, y, x+w, y); // top
// Left and Top (inner)
diff --git a/prototypes/fpgui2/source/core/x11/gfx_x11.pas b/prototypes/fpgui2/source/core/x11/gfx_x11.pas
index 25dc7278..7f0a02eb 100644
--- a/prototypes/fpgui2/source/core/x11/gfx_x11.pas
+++ b/prototypes/fpgui2/source/core/x11/gfx_x11.pas
@@ -1375,7 +1375,7 @@ end;
procedure TfpgCanvasImpl.DoDrawRectangle(x, y, w, h: TfpgCoord);
begin
- XDrawRectangle(xapplication.display, FDrawHandle, Fgc, x, y, w - 1, h - 1);
+ XDrawRectangle(xapplication.display, FDrawHandle, Fgc, x, y, w-1, h-1);
end;
procedure TfpgCanvasImpl.DoDrawLine(x1, y1, x2, y2: TfpgCoord);