summaryrefslogtreecommitdiff
path: root/src/corelib/gfxbase.pas
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-08-12 22:53:51 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-08-12 22:53:51 +0000
commita8f5bbc7a653e967e5b9b12dd749f7407dc46bb1 (patch)
treea836cf1dcf6a90e67ea689a44ce5cde894b61315 /src/corelib/gfxbase.pas
parentd8ae4e50861f1db94db3ac92bef07c80b1b2ecb0 (diff)
downloadfpGUI-a8f5bbc7a653e967e5b9b12dd749f7407dc46bb1.tar.xz
* Minor adjustment to the GradientFill function.
* Played around with the GradientFill and implemented the BlueCurve selection look in the TfpgListBox. This is just a test and will be removed shortly.
Diffstat (limited to 'src/corelib/gfxbase.pas')
-rw-r--r--src/corelib/gfxbase.pas5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/gfxbase.pas b/src/corelib/gfxbase.pas
index 3c5a34c4..8d7f814f 100644
--- a/src/corelib/gfxbase.pas
+++ b/src/corelib/gfxbase.pas
@@ -933,10 +933,11 @@ begin
newcolor.Blue := RGBStart.Blue + (i * BDiff) div count;
SetColor(RGBTripleTofpgColor(newcolor));
+ // We have to overshoot by 1 pixel as DrawLine paints 1 pixel short (by design)
if ADirection = gdHorizontal then
- DrawLine(ARect.Left+i, ARect.Top, ARect.Left+i, ARect.Bottom)
+ DrawLine(ARect.Left+i, ARect.Top, ARect.Left+i, ARect.Bottom+1)
else
- DrawLine(ARect.Left, ARect.Top+i, ARect.Right, ARect.Top+i);
+ DrawLine(ARect.Left, ARect.Top+i, ARect.Right+1, ARect.Top+i);
end;
// Changed;
end;