/usr/share/doc/libplplot12/examples/ada/xthick24a.adb is in libplplot-ada1-dev 5.10.0+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | -- $Id: xthick24a.adb 11680 2011-03-27 17:57:51Z airwin $
-- Unicode Pace Flag
-- Copyright (C) 2008 Jerry Bauck
-- This file is part of PLplot.
-- PLplot is free software; you can redistribute it and/or modify
-- it under the terms of the GNU Library General Public License as published
-- by the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
-- PLplot is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU Library General Public License for more details.
-- You should have received a copy of the GNU Library General Public License
-- along with PLplot; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
with
PLplot_Auxiliary,
PLplot;
use
PLplot_Auxiliary,
PLplot;
procedure xthick24a is
red : Integer_Array_1D(0 .. 6) := (240, 204, 204, 204, 0, 39, 125);
green : Integer_Array_1D(0 .. 6) := (240, 0, 125, 204, 204, 80, 0);
blue : Integer_Array_1D(0 .. 6) := (240, 0, 0, 0, 0, 204, 125);
px : Real_Vector(0 .. 3) := (0.0, 0.0, 1.0, 1.0);
py : Real_Vector(0 .. 3) := (0.0, 0.25, 0.25, 0.0);
sx : Real_Vector(0 .. 11) := (
0.16374,
0.15844,
0.15255,
0.17332,
0.50436,
0.51721,
0.49520,
0.48713,
0.83976,
0.81688,
0.82231,
0.82647);
sy : Real_Vector(0 .. 11) := (
0.125,
0.375,
0.625,
0.875,
0.125,
0.375,
0.625,
0.875,
0.125,
0.375,
0.625,
0.875);
-- Taken from http://www.columbia.edu/~fdc/pace/
function peace(which : Integer) return String is
begin
-- Mandarin
if which = 0 then return "#<0x00>和平"; end if;
-- Hindi
if which = 1 then return "#<0x20>शांति"; end if;
-- English
if which = 2 then return "#<0x10>Peace"; end if;
-- Hebrew
if which = 3 then return "#<0x10>שלום"; end if;
-- Russian
if which = 4 then return "#<0x10>Мир"; end if;
-- German
if which = 5 then return "#<0x10>Friede"; end if;
-- Korean
if which = 6 then return "#<0x30>평화"; end if;
-- French
if which = 7 then return "#<0x10>Paix"; end if;
-- Spanish
if which = 8 then return "#<0x10>Paz"; end if;
-- Arabic
if which = 9 then return "#<0x10>ﺳﻼم"; end if;
-- Turkish
if which = 10 then return "#<0x10>Barış"; end if;
-- Kurdish
if which = 11 then return "#<0x10>Hasîtî"; end if;
return "oops";
end peace;
begin
Parse_Command_Line_Arguments(Parse_Full);
Initialize_PLplot;
Advance_To_Subpage(Next_Subpage);
Set_Viewport_Normalized(0.0, 1.0, 0.0, 1.0);
Set_Viewport_World(0.0, 1.0, 0.0, 1.0);
Set_Pen_Color(Black);
Box_Around_Viewport("", 1.0, 0, "", 1.0, 0);
Set_Number_Of_Colors_Map_0(7);
Set_Color_Map_0(red, green, blue);
Set_Character_Height(0.0, 4.0);
Set_Font_Style(Normal_Font);
for i in 0 .. 3 loop
Set_Pen_Color(i + 1);
Fill_Polygon(4, px, py);
for j in 0 .. 3 loop
py(j) := py(j) + 1.0 / 4.0;
end loop;
end loop;
Set_Pen_Color(Black);
for i in 0 .. 11 loop
Write_Text_World(sx(i), sy(i), 1.0, 0.0, 0.5, peace(i));
end loop;
End_PLplot;
end xthick24a;
|