-
Notifications
You must be signed in to change notification settings - Fork 4
/
statesflags.pas
59 lines (42 loc) · 1.14 KB
/
statesflags.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
Unit : StatesFlags.pas
ISO 3166, 3166-1, 3166-2 & 3166-3 implementation parts. States flags.
Author : Frédéric Libaud (http://www.libaudfrederic.fr)
Licence : LGPL V3.0+
=============================================================================
history
-----------------------------------------------------------------------------
}
unit StatesFlags;
{$ifdef FPC}
{$mode objfpc}{$H+}
{$endif}
interface
{$R StatesFlags.res}
uses
Classes, SysUtils, Graphics, ImgList;
{$i States.inc}
procedure StatesFlags(aState: TISO31663; var aPNG: TPortableNetworkGraphic);
procedure LoadStatesFlags(aImageList: TCustomImageList);
implementation
uses
ExtendStrings, States;
procedure StatesFlags(aState: TISO31663; var aPNG: TPortableNetworkGraphic);
begin
if assigned(aPNG) and not IsEmpty(aState) then
begin
{$ifdef TYPHON}
aPNG.LoadFromTyphonResource(aState);
{$endif}
end;
end;
procedure LoadStatesFlags(aImageList: TCustomImageList);
var
iItem: integer;
begin
for iItem:= 0 to Length(StatesCodesTable) - 1 do
{$ifdef TYPHON}
aImageList.AddTyphonResource(StatesCodesTable[iItem].ISO31663);
{$endif}
end;
end.