From a8f5bbc7a653e967e5b9b12dd749f7407dc46bb1 Mon Sep 17 00:00:00 2001 From: graemeg Date: Sun, 12 Aug 2007 22:53:51 +0000 Subject: * 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. --- src/corelib/gfxbase.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/corelib') 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; -- cgit v1.2.3-70-g09d2