2
Ported to FPC by Nikolay Nikolov (nickysn@users.sourceforge.net)
6
Info example for OpenPTC 1.0 C++ Implementation
7
Copyright (c) Glenn Fiedler (ptc@gaffer.org)
8
This source code is in the public domain
18
Procedure print(Const format : TPTCFormat);
25
{ direct color format without alpha }
26
Write('Format(', format.bits:2, ',$', HexStr(format.r, 8), ',$', HexStr(format.g, 8), ',$', HexStr(format.b, 8), ')')
28
{ direct color format with alpha }
29
Write('Format(', format.bits:2, ',$', HexStr(format.r, 8), ',$', HexStr(format.g, 8), ',$', HexStr(format.b, 8), ',$', HexStr(format.a, 8), ')')
31
{ indexed color format }
32
Write('Format(', format.bits:2, ')');
36
console : TPTCConsole;
42
Writeln('[ptc version]');
43
{ print ptc version string define }
48
console := TPTCConsole.Create;
51
console.open('Info example');
53
{ print console data }
54
Writeln('[console data]');
55
Writeln('name = ', console.name);
56
Writeln('title = ', console.title);
57
Writeln('width = ', console.width);
58
Writeln('height = ', console.height);
59
Writeln('pages = ', console.pages);
60
Writeln('pitch = ', console.pitch);
62
print(console.format);
66
{ print console information }
67
Writeln('[console information]');
68
Writeln(console.information);
74
On error : TPTCError Do