diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-04-30 13:28:29 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-04-30 13:28:29 +0200 |
commit | d3406a5508115b841a8497bcd5cdfe81a81cebf5 (patch) | |
tree | c8cddf1731e4d1a3a6d54af7efa1adfa706ae05a /src | |
parent | f58d3707004107e3c6b624f5ac1ea0492c72fff5 (diff) | |
download | fpGUI-d3406a5508115b841a8497bcd5cdfe81a81cebf5.tar.xz |
Fixed resource allocation of ColorWheel.
We called the image.UpdateImage to early. We are only supposed
to do it after we populated the imagedata arrow with color values.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/fpg_colorwheel.pas | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/fpg_colorwheel.pas b/src/gui/fpg_colorwheel.pas index 90bc59a4..43ebb8a9 100644 --- a/src/gui/fpg_colorwheel.pas +++ b/src/gui/fpg_colorwheel.pas @@ -213,7 +213,6 @@ begin FImage.Free; FImage := TfpgImage.Create; FImage.AllocateImage(32, DrawWidth, DrawHeight); - FImage.UpdateImage; for X := 0 to DrawWidth - 1 do begin for Y := 0 to DrawHeight - 1 do @@ -232,6 +231,7 @@ begin // point is outside wheel. Also incase color is alias, lookup the RGB values. FImage.Colors[x, y] := fpgColorToRGB(BackgroundColor); end; + FImage.UpdateImage; end; FRecalcWheel := False; end |