1 | unit uioselements;
|
---|
2 |
|
---|
3 | {$mode objfpc}{$H+}
|
---|
4 |
|
---|
5 | interface
|
---|
6 |
|
---|
7 | uses
|
---|
8 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
---|
9 | BGRABitmap, BGRABitmapTypes, BGRASamples;
|
---|
10 |
|
---|
11 | type
|
---|
12 |
|
---|
13 | { TfrmiOSElements }
|
---|
14 |
|
---|
15 | TfrmiOSElements = class(TForm)
|
---|
16 | procedure FormCreate(Sender: TObject);
|
---|
17 | procedure FormDestroy(Sender: TObject);
|
---|
18 | procedure FormPaint(Sender: TObject);
|
---|
19 | procedure FormResize(Sender: TObject);
|
---|
20 | private
|
---|
21 | { private declarations }
|
---|
22 | public
|
---|
23 | { public declarations }
|
---|
24 | bitmap: TBGRABitmap;
|
---|
25 | end;
|
---|
26 |
|
---|
27 | var
|
---|
28 | frmiOSElements: TfrmiOSElements;
|
---|
29 |
|
---|
30 | implementation
|
---|
31 |
|
---|
32 | {$R *.lfm}
|
---|
33 |
|
---|
34 | { TfrmiOSElements }
|
---|
35 |
|
---|
36 | procedure TfrmiOSElements.FormCreate(Sender: TObject);
|
---|
37 | begin
|
---|
38 | bitmap := TBGRABitmap.Create(Width, Height);
|
---|
39 | end;
|
---|
40 |
|
---|
41 | procedure TfrmiOSElements.FormDestroy(Sender: TObject);
|
---|
42 | begin
|
---|
43 | bitmap.Free;
|
---|
44 | end;
|
---|
45 |
|
---|
46 | procedure TfrmiOSElements.FormPaint(Sender: TObject);
|
---|
47 | begin
|
---|
48 | bitmap.Draw(Canvas, ClientRect);
|
---|
49 | end;
|
---|
50 |
|
---|
51 | procedure TfrmiOSElements.FormResize(Sender: TObject);
|
---|
52 | var
|
---|
53 | temp: TBGRABitmap;
|
---|
54 | begin
|
---|
55 | bitmap.SetSize(Width, Height);
|
---|
56 |
|
---|
57 | temp := DrawiOSElement(Width, Height, iOSBackground);
|
---|
58 | bitmap.Fill(temp);
|
---|
59 | temp.Free;
|
---|
60 |
|
---|
61 | temp := DrawiOSElement(Width, 22, iOSBar);
|
---|
62 | bitmap.PutImage(0, 0, temp, dmSet);
|
---|
63 | temp.Free;
|
---|
64 |
|
---|
65 | temp := DrawiOSElement(Width, 49, iOSToolBar);
|
---|
66 | bitmap.PutImage(0, 22, temp, dmDrawWithTransparency);
|
---|
67 | temp.Free;
|
---|
68 | end;
|
---|
69 |
|
---|
70 | end.
|
---|
71 |
|
---|