summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-07-05 17:07:29 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-07-05 17:07:29 +0200
commita883f4386120a6434aba332fb099afb5fed09466 (patch)
treea623906e296b5baf00d402ffe753caa11191026b /src
parent7f73f7ed0ddf59ca9f7776a6587fa82d02aa4053 (diff)
downloadfpGUI-a883f4386120a6434aba332fb099afb5fed09466.tar.xz
Extended TfpgImage with a new CreateDisabledImage() method.
This uses the new GrayScale Filter to create a grayscale image.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/fpg_main.pas10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas
index 9c15760f..8bcda3fc 100644
--- a/src/corelib/fpg_main.pas
+++ b/src/corelib/fpg_main.pas
@@ -143,6 +143,7 @@ type
TfpgImage = class(TfpgImageImpl)
public
+ function CreateDisabledImage: TfpgImage;
function ImageFromSource: TfpgImage;
function ImageFromRect(var ARect: TRect): TfpgImage; overload;
function ImageFromRect(var ARect: TfpgRect): TfpgImage; overload;
@@ -400,7 +401,8 @@ uses
fpg_hint,
fpg_extgraphics,
fpg_utils,
- fpg_cmdlineparams;
+ fpg_cmdlineparams,
+ fpg_imgutils;
var
fpgTimers: TList;
@@ -2088,6 +2090,12 @@ end;
{ TfpgImage }
+function TfpgImage.CreateDisabledImage: TfpgImage;
+begin
+ Result := ImageFromSource;
+ fpgApplyGreyFilter(Result);
+end;
+
function TfpgImage.ImageFromSource: TfpgImage;
var
x, y: TfpgCoord;