summaryrefslogtreecommitdiff
path: root/prototypes
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-07-18 13:51:21 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-07-18 13:51:21 +0000
commit8b2fe96412eaa42af166f85feb67b50b83e3bad6 (patch)
treee2864a2c0cf22e8df5f292a42cacbca54b2907e2 /prototypes
parent6912daab751789ccf29ba28a1044e11acd277472 (diff)
downloadfpGUI-8b2fe96412eaa42af166f85feb67b50b83e3bad6.tar.xz
* GDI: Final fixes to Line and Rectangle drawing. This rectangle change is more optimized than before.
Diffstat (limited to 'prototypes')
-rw-r--r--prototypes/fpgui2/source/core/gdi/gfx_gdi.pas9
1 files changed, 5 insertions, 4 deletions
diff --git a/prototypes/fpgui2/source/core/gdi/gfx_gdi.pas b/prototypes/fpgui2/source/core/gdi/gfx_gdi.pas
index ba991fca..a30f343c 100644
--- a/prototypes/fpgui2/source/core/gdi/gfx_gdi.pas
+++ b/prototypes/fpgui2/source/core/gdi/gfx_gdi.pas
@@ -1075,10 +1075,11 @@ end;
procedure TfpgCanvasImpl.DoDrawRectangle(x, y, w, h: TfpgCoord);
begin
- DoDrawLine(x, y, x+w-1, y); // top
- DoDrawLine(x+w-1, y, x+w-1, y+h-1); // right
- DoDrawLine(x, y+h-1, x+w-1, y+h-1); // bottom
- DoDrawLine(x, y, x, y+h-1); // left
+ Windows.MoveToEx(Fgc, x, y, nil);
+ Windows.LineTo(Fgc, x+w-1, y);
+ Windows.LineTo(Fgc, x+w-1, y+h-1);
+ Windows.LineTo(Fgc, x, y+h-1);
+ Windows.LineTo(Fgc, x, y);
end;
procedure TfpgCanvasImpl.DoDrawString(x, y: TfpgCoord; const txt: string);