From 3e6b2b7bd9b71e9c49ff6495c1a85bb648283110 Mon Sep 17 00:00:00 2001 From: blikblum Date: Wed, 23 Dec 2009 04:12:17 +0000 Subject: [PATCH] * Use TControl.Width/Height instead of TBitmap.Width/Height: it's faster git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1077 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/smnetgradient/smnetgradient.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/smnetgradient/smnetgradient.pas b/components/smnetgradient/smnetgradient.pas index cc17ddf9e..d7e6d7d63 100644 --- a/components/smnetgradient/smnetgradient.pas +++ b/components/smnetgradient/smnetgradient.pas @@ -503,13 +503,13 @@ begin { Calculate the color band's left and right coordinates } fdLeftToRight, fdRightToLeft: begin - ColorBand.Left := MulDiv (I, Width, FNumberOfColors); - ColorBand.Right := MulDiv (I + 1, Width, FNumberOfColors); + ColorBand.Left := MulDiv (I, Self.Width, FNumberOfColors); + ColorBand.Right := MulDiv (I + 1, Self.Width, FNumberOfColors); end; ftTopToBottom, ftBottomToTop: begin - ColorBand.Top := MulDiv (I, Height, FNumberOfColors); - ColorBand.Bottom := MulDiv (I + 1, Height, FNumberOfColors); + ColorBand.Top := MulDiv (I, Self.Height, FNumberOfColors); + ColorBand.Bottom := MulDiv (I + 1, Self.Height, FNumberOfColors); end; end; { Calculate the color band's color }