summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2012-03-29 13:04:04 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-03-29 13:04:04 +0200
commitdaacc12f43775075ff114cfecf730b2dcf0cc2db (patch)
tree6f842ba86f0c2222e5822318d4fce12bb9649cc3 /src
parenta8123f4f1a9745cbbe43e7a5278c26427c264700 (diff)
downloadfpGUI-daacc12f43775075ff114cfecf730b2dcf0cc2db.tar.xz
agg: implemented clip rectangle support for TfpgCanvas interface.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/render/software/Agg2D.pas9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/render/software/Agg2D.pas b/src/corelib/render/software/Agg2D.pas
index ce759352..3c4ea0da 100644
--- a/src/corelib/render/software/Agg2D.pas
+++ b/src/corelib/render/software/Agg2D.pas
@@ -3662,22 +3662,23 @@ end;
procedure TAgg2D.DoSetClipRect(const ARect: TfpgRect);
begin
-
+ ClipBox(ARect.Left, ARect.Top, ARect.Right+1, ARect.Bottom+1);
end;
function TAgg2D.DoGetClipRect: TfpgRect;
begin
-
+ Result.SetRect(Round(ClipBox.x1), Round(ClipBox.y1), Round(ClipBox.x2 - ClipBox.x1), Round(ClipBox.y2 - ClipBox.y1));
end;
procedure TAgg2D.DoAddClipRect(const ARect: TfpgRect);
begin
-
+ {$NOTE TAgg2D.DoAddClipRect must still be implemented }
end;
procedure TAgg2D.DoClearClipRect;
begin
-
+ ClipBox(0, 0, FWindow.width, FWindow.height);
+ m_rasterizer.m_clipping := false;
end;
procedure TAgg2D.DoBeginDraw(awin: TfpgWindowBase; buffered: boolean);