From 1dd3ca859b67a24fc431a008e904dec0e5af6d95 Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Fri, 25 Nov 2011 16:13:20 +0000 Subject: [PATCH] Android OpenGL improvement git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2161 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- examples/androidlclv2/androidlcltest.lpi | 9 ++++++++- examples/androidlclv2/androidlcltest.lpr | 4 ++++ examples/androidlclv2/mainform.lfm | 1 + examples/androidlclv2/mainform.pas | 12 ++++++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/examples/androidlclv2/androidlcltest.lpi b/examples/androidlclv2/androidlcltest.lpi index 48d84569c..a29414f6a 100644 --- a/examples/androidlclv2/androidlcltest.lpi +++ b/examples/androidlclv2/androidlcltest.lpi @@ -40,12 +40,19 @@ - + + + + + + + + diff --git a/examples/androidlclv2/androidlcltest.lpr b/examples/androidlclv2/androidlcltest.lpr index bf1f17ff5..5e3a79d47 100644 --- a/examples/androidlclv2/androidlcltest.lpr +++ b/examples/androidlclv2/androidlcltest.lpr @@ -9,11 +9,15 @@ uses android_native_app_glue, {$endif} Interfaces, + Forms, mainform; exports //android_main name 'android_main', ANativeActivity_onCreate name 'ANativeActivity_onCreate'; begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; end. diff --git a/examples/androidlclv2/mainform.lfm b/examples/androidlclv2/mainform.lfm index 640601843..df168ce88 100644 --- a/examples/androidlclv2/mainform.lfm +++ b/examples/androidlclv2/mainform.lfm @@ -4,5 +4,6 @@ object Form1: TForm1 Top = 186 Width = 320 Caption = 'Form1' + OnPaint = FormPaint LCLVersion = '0.9.31' end diff --git a/examples/androidlclv2/mainform.pas b/examples/androidlclv2/mainform.pas index db5e8ee74..1dd5e7af2 100644 --- a/examples/androidlclv2/mainform.pas +++ b/examples/androidlclv2/mainform.pas @@ -8,7 +8,11 @@ uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs; type + + { TForm1 } + TForm1 = class(TForm) + procedure FormPaint(Sender: TObject); private { private declarations } public @@ -22,5 +26,13 @@ implementation {$R *.lfm} +{ TForm1 } + +procedure TForm1.FormPaint(Sender: TObject); +begin + Canvas.Brush.Color := clRed; + Canvas.Rectangle(10, 10, 100, 100); +end; + end.