Revision: 8471
http://plplot.svn.sourceforge.net/plplot/?rev=8471&view=rev
Author: jbauck
Date: 2008-06-10 03:05:32 -0700 (Tue, 10 Jun 2008)
Log Message:
-----------
Add Ada examples x24a.adb and xthick24a.adb.
Modified Paths:
--------------
trunk/examples/ada/CMakeLists.txt
trunk/examples/ada/Makefile.examples.in
trunk/plplot_test/test_ada.sh.in
Added Paths:
-----------
trunk/examples/ada/x24a.adb.cmake
trunk/examples/ada/xthick24a.adb.cmake
Modified: trunk/examples/ada/CMakeLists.txt
===================================================================
--- trunk/examples/ada/CMakeLists.txt 2008-06-09 14:24:11 UTC (rev 8470)
+++ trunk/examples/ada/CMakeLists.txt 2008-06-10 10:05:32 UTC (rev 8471)
@@ -39,6 +39,7 @@
"21"
"22"
"23"
+"24"
"thick01"
"thick02"
"thick03"
@@ -59,6 +60,7 @@
"thick21"
"thick22"
"thick23"
+"thick24"
)
if(BUILD_TEST)
Modified: trunk/examples/ada/Makefile.examples.in
===================================================================
--- trunk/examples/ada/Makefile.examples.in 2008-06-09 14:24:11 UTC (rev 8470)
+++ trunk/examples/ada/Makefile.examples.in 2008-06-10 10:05:32 UTC (rev 8471)
@@ -50,6 +50,7 @@
x21a$(EXEEXT) \
x22a$(EXEEXT) \
x23a$(EXEEXT) \
+ x24a$(EXEEXT) \
xthick01a$(EXEEXT) \
xthick02a$(EXEEXT) \
xthick03a$(EXEEXT) \
@@ -69,7 +70,8 @@
xthick19a$(EXEEXT) \
xthick21a$(EXEEXT) \
xthick22a$(EXEEXT) \
- xthick23a$(EXEEXT)
+ xthick23a$(EXEEXT) \
+ xthick24a$(EXEEXT)
all: $(EXECUTABLES_list)
Added: trunk/examples/ada/x24a.adb.cmake
===================================================================
--- trunk/examples/ada/x24a.adb.cmake (rev 0)
+++ trunk/examples/ada/x24a.adb.cmake 2008-06-10 10:05:32 UTC (rev 8471)
@@ -0,0 +1,126 @@
+-- $Id$
+
+-- 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 General Library 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_Traditional,
+ PLplot_Auxiliary;
+use
+ PLplot_Traditional,
+ PLplot_Auxiliary;
+
+-- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE
+-- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE.
+--with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays;
+@Ada_Is_2007_With_and_Use_Numerics@
+
+procedure x24a 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
+ plparseopts(PL_PARSE_FULL);
+ plinit;
+
+ pladv(0);
+ plvpor(0.0, 1.0, 0.0, 1.0);
+ plwind(0.0, 1.0, 0.0, 1.0);
+ plcol0(0);
+ plbox("", 1.0, 0, "", 1.0, 0);
+ plscmap0n(7);
+ plscmap0(red, green, blue);
+ plschr(0.0, 4.0);
+ plfont(1);
+ for i in 0 .. 3 loop
+ plcol0(i + 1);
+ plfill(4, px, py);
+ for j in 0 .. 3 loop
+ py(j) := py(j) + 1.0 / 4.0;
+ end loop;
+ end loop;
+ plcol0(0);
+ for i in 0 .. 11 loop
+ plptex(sx(i), sy(i), 1.0, 0.0, 0.5, peace(i));
+ end loop;
+ plend;
+end x24a;
Property changes on: trunk/examples/ada/x24a.adb.cmake
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: trunk/examples/ada/xthick24a.adb.cmake
===================================================================
--- trunk/examples/ada/xthick24a.adb.cmake (rev 0)
+++ trunk/examples/ada/xthick24a.adb.cmake 2008-06-10 10:05:32 UTC (rev 8471)
@@ -0,0 +1,126 @@
+-- $Id$
+
+-- 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 General Library 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,
+ PLplot_Auxiliary;
+use
+ PLplot,
+ PLplot_Auxiliary;
+
+-- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE
+-- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE.
+--with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays;
+@Ada_Is_2007_With_and_Use_Numerics@
+
+procedure x24a 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 x24a;
Property changes on: trunk/examples/ada/xthick24a.adb.cmake
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: trunk/plplot_test/test_ada.sh.in
===================================================================
--- trunk/plplot_test/test_ada.sh.in 2008-06-09 14:24:11 UTC (rev 8470)
+++ trunk/plplot_test/test_ada.sh.in 2008-06-10 10:05:32 UTC (rev 8471)
@@ -27,7 +27,7 @@
# pushd $adadir; make; popd
# Do the standard non-interactive examples.
-for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 21 22 23 thick01 thick02 thick03 thick04 thick05 thick06 thick07 thick08 thick09 thick10 thick11 thick12 thick13 thick15 thick16 thick18 thick19 thick21 thick22 thick23; do
+for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 21 22 23 24 thick01 thick02 thick03 thick04 thick05 thick06 thick07 thick08 thick09 thick10 thick11 thick12 thick13 thick15 thick16 thick18 thick19 thick21 thick22 thick23 thick24; do
$adadir/x${index}a -dev $device -o ${OUTPUT_DIR}/x${index}a.$dsuffix $options 2> test.error
status_code=$?
cat test.error
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|