summaryrefslogtreecommitdiff
path: root/src/corelib/render
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2012-03-16 19:17:16 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-03-16 19:17:16 +0200
commitd47bef567a13135c29ed216daeb12af9b3bdda34 (patch)
tree94875fb95af726b4a7704840ca7d112cdacc8ccf /src/corelib/render
parent82dfd4408f456e14710ad1c425aee1b1201b8bdc (diff)
downloadfpGUI-d47bef567a13135c29ed216daeb12af9b3bdda34.tar.xz
agg: New "friend" class so we can get access to a protect property WinHandle
Diffstat (limited to 'src/corelib/render')
-rw-r--r--src/corelib/render/software/agg_platform_x11.inc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/render/software/agg_platform_x11.inc b/src/corelib/render/software/agg_platform_x11.inc
index 38f31b11..880dde06 100644
--- a/src/corelib/render/software/agg_platform_x11.inc
+++ b/src/corelib/render/software/agg_platform_x11.inc
@@ -31,7 +31,8 @@ type
// to get access to protected methods
TX11AppHack = class(TfpgApplication);
TX11ImageHack = class(TfpgImage);
-
+ TX11WindowHack = class(TfpgWindow);
+
procedure TAgg2D.DoSetFontRes(fntres: TfpgFontResourceBase);
begin
Font('/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Regular.ttf', 13);
@@ -207,17 +208,17 @@ var
drawgc: Tgc;
GcValues: TXGcValues;
begin
- if TfpgX11Window(FWindow).WinHandle <= 0 then
+ if TX11WindowHack(FWindow).WinHandle <= 0 then
begin
writeln(' no winhandle available');
exit;
end;
FImg.UpdateImage;
- drawgc := XCreateGc(fpgApplication.Display, TfpgX11Window(FWindow).WinHandle, 0, @GcValues);
+ drawgc := XCreateGc(fpgApplication.Display, TX11WindowHack(FWindow).WinHandle, 0, @GcValues);
// finally dump the image to screen!
- XPutImage(fpgApplication.Display, TfpgX11Window(FWindow).WinHandle,
+ XPutImage(fpgApplication.Display, TX11WindowHack(FWindow).WinHandle,
drawgc, TX11ImageHack(FImg).XImage, 0, 0, 0, 0,
FWindow.Width, FWindow.Height);