diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2013-05-12 13:38:38 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2013-05-12 13:38:38 +0100 |
commit | 1c082c0baa8a9d3707f6aa7e062ff97f94a90aa7 (patch) | |
tree | 41cf61342fc16cd45c9fc66f241e0d7166b41cc0 /src | |
parent | 52be0ed7a2adbbe89235bb50f1c2b2da122b11a1 (diff) | |
download | fpGUI-1c082c0baa8a9d3707f6aa7e062ff97f94a90aa7.tar.xz |
agg: surfaced the new Fill(color) method in TAdd2D and agg_2d
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/render/software/Agg2D.pas | 18 | ||||
-rw-r--r-- | src/corelib/render/software/agg_2D.pas | 22 |
2 files changed, 38 insertions, 2 deletions
diff --git a/src/corelib/render/software/Agg2D.pas b/src/corelib/render/software/Agg2D.pas index 183f2af2..d729e4fb 100644 --- a/src/corelib/render/software/Agg2D.pas +++ b/src/corelib/render/software/Agg2D.pas @@ -400,6 +400,8 @@ type procedure ClearAll(c : TAggColor ); overload; procedure ClearAll(r ,g ,b : byte; a : byte = 255 ); overload; + procedure FillAll(c: TAggColor); overload; + procedure FillAll(r, g, b: byte; a: byte = 255); overload; // Master Rendering Properties procedure BlendMode(m : TAggBlendMode ); overload; @@ -1494,6 +1496,22 @@ begin end; +procedure TAgg2D.FillAll(c: TAggColor); +var + clr: aggclr; +begin + clr.Construct (c ); + m_renBase.fill(@clr ); +end; + +procedure TAgg2D.FillAll(r, g, b: byte; a: byte); +var + clr: TAggColor; +begin + clr.Construct(r, g, b, a); + FillAll(clr); +end; + { CLEARCLIPBOX } procedure TAgg2D.ClearClipBox(c : TAggColor ); var diff --git a/src/corelib/render/software/agg_2D.pas b/src/corelib/render/software/agg_2D.pas index a6296e2c..8bac06a1 100644 --- a/src/corelib/render/software/agg_2D.pas +++ b/src/corelib/render/software/agg_2D.pas @@ -3,11 +3,11 @@ // Based on Anti-Grain Geometry // Copyright (C) 2005 Maxim Shemanarev (http://www.antigrain.com) // -// Agg2D - Version 1.0 Release Milano 3 (AggPas 2.3 RM3) +// Agg2D - Version 1.0 Release Milano 3 (AggPas 2.4 RM3) // Pascal Port By: Milan Marusinec alias Milano // milan@marusinec.sk // http://www.aggpas.org -// Copyright (c) 2007 +// Copyright (c) 2007 - 2008 // // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. @@ -325,6 +325,8 @@ type procedure clearAll(c : Color ); overload; procedure clearAll(r ,g ,b : unsigned; a : unsigned = 255 ); overload; + procedure FillAll(c: TAggColor); overload; + procedure FillAll(r, g, b: byte; a: byte = 255); overload; procedure clearClipBox(c : Color ); overload; procedure clearClipBox(r ,g ,b : unsigned; a : unsigned = 255 ); overload; @@ -932,6 +934,22 @@ begin end; +procedure Agg2D.FillAll(c: TAggColor); +var + clr: aggclr; +begin + clr.Construct (c ); + m_renBase.fill(@clr ); +end; + +procedure Agg2D.FillAll(r, g, b: byte; a: byte); +var + clr: TAggColor; +begin + clr.Construct(r, g, b, a); + FillAll(clr); +end; + { CLEARCLIPBOX } procedure Agg2D.clearClipBox(c : Color ); var |