From: <jb...@us...> - 2009-08-19 10:30:42
|
Revision: 10295 http://plplot.svn.sourceforge.net/plplot/?rev=10295&view=rev Author: jbauck Date: 2009-08-19 10:30:33 +0000 (Wed, 19 Aug 2009) Log Message: ----------- Update Ada bindings and Examples 3 to use plarc. Modified Paths: -------------- trunk/bindings/ada/plplot.adb.cmake trunk/bindings/ada/plplot.ads.cmake trunk/bindings/ada/plplot_thin.ads.cmake trunk/bindings/ada/plplot_traditional.adb.cmake trunk/bindings/ada/plplot_traditional.ads.cmake trunk/examples/ada/x03a.adb.cmake trunk/examples/ada/xthick03a.adb.cmake Modified: trunk/bindings/ada/plplot.adb.cmake =================================================================== --- trunk/bindings/ada/plplot.adb.cmake 2009-08-19 08:16:21 UTC (rev 10294) +++ trunk/bindings/ada/plplot.adb.cmake 2009-08-19 10:30:33 UTC (rev 10295) @@ -1084,6 +1084,24 @@ end Advance_To_Subpage; + -- Plot an arc. + -- plarc + procedure Draw_Arc + (x, y, a, b, angle1, angle2 : Long_Float; + fill : Boolean) is + + fill_arc : PLBOOL; + + begin + if fill then + fill_arc := PLtrue; + else + fill_arc := PLfalse; + end if; + plarc(x, y, a, b, angle1, angle2, fill_arc); + end Draw_Arc; + + -- Draw a 2D vector plot. -- plvect procedure Vector_Plot Modified: trunk/bindings/ada/plplot.ads.cmake =================================================================== --- trunk/bindings/ada/plplot.ads.cmake 2009-08-19 08:16:21 UTC (rev 10294) +++ trunk/bindings/ada/plplot.ads.cmake 2009-08-19 10:30:33 UTC (rev 10295) @@ -628,6 +628,13 @@ procedure Advance_To_Subpage(Page : Natural); + -- Plot an arc. + -- plarc + procedure Draw_Arc + (x, y, a, b, angle1, angle2 : Long_Float; + fill : Boolean); + + -- Draw a 2D vector plot. -- plvect procedure Vector_Plot @@ -636,7 +643,8 @@ Transformation_Procedure_Pointer : Transformation_Procedure_Pointer_Type; Transformation_Data_Pointer : PLpointer); - -- Set the style for the arrow used by plvect to plot vectors. + + -- Set the style for the arrow used by plvect to plot vectors. -- plsvect procedure Set_Arrow_Style_For_Vector_Plots (X_Vertices, Y_Vertices : Real_Vector; Modified: trunk/bindings/ada/plplot_thin.ads.cmake =================================================================== --- trunk/bindings/ada/plplot_thin.ads.cmake 2009-08-19 08:16:21 UTC (rev 10294) +++ trunk/bindings/ada/plplot_thin.ads.cmake 2009-08-19 10:30:33 UTC (rev 10295) @@ -461,6 +461,12 @@ pragma Import(C, pladv, "c_pladv"); + -- Plot an arc. + procedure + plarc(x : PLFLT; y : PLFLT; a : PLFLT; b : PLFLT; angle1 : PLFLT; angle2 : PLFLT; fill : PLBOOL); + pragma Import(C, plarc, "c_plarc"); + + -- simple arrow plotter. procedure Modified: trunk/bindings/ada/plplot_traditional.adb.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.adb.cmake 2009-08-19 08:16:21 UTC (rev 10294) +++ trunk/bindings/ada/plplot_traditional.adb.cmake 2009-08-19 10:30:33 UTC (rev 10295) @@ -1082,6 +1082,23 @@ end pladv; + -- Plot an arc. + procedure plarc + (x, y, a, b, angle1, angle2 : Long_Float; + fill : Boolean) is + + fill_arc : PLBOOL; + + begin + if fill then + fill_arc := PLtrue; + else + fill_arc := PLfalse; + end if; + PLplot_Thin.plarc(x, y, a, b, angle1, angle2, fill_arc); + end plarc; + + -- Draw a 2D vector plot. procedure plvect (u, v : Real_Matrix; Modified: trunk/bindings/ada/plplot_traditional.ads.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.ads.cmake 2009-08-19 08:16:21 UTC (rev 10294) +++ trunk/bindings/ada/plplot_traditional.ads.cmake 2009-08-19 10:30:33 UTC (rev 10295) @@ -624,6 +624,12 @@ procedure pladv(Page : Natural); + -- Plot an arc. + procedure plarc + (x, y, a, b, angle1, angle2 : Long_Float; + fill : Boolean); + + -- Draw a 2D vector plot. procedure plvect (u, v : Real_Matrix; @@ -631,6 +637,7 @@ Transformation_Procedure_Pointer : Transformation_Procedure_Pointer_Type; Transformation_Data_Pointer : PLpointer); + -- Set the style for the arrow used by plvect to plot vectors. procedure plsvect (X_Vertices, Y_Vertices : Real_Vector; Modified: trunk/examples/ada/x03a.adb.cmake =================================================================== --- trunk/examples/ada/x03a.adb.cmake 2009-08-19 08:16:21 UTC (rev 10294) +++ trunk/examples/ada/x03a.adb.cmake 2009-08-19 10:30:33 UTC (rev 10295) @@ -62,14 +62,10 @@ -- Set up viewport and window, but do not draw box. plenv(-1.3, 1.3, -1.3, 1.3, 1, -2); - for i in 1..10 loop - for j in x'range loop - x(j) := 0.1 * Long_Float(i) * x0(j); - y(j) := 0.1 * Long_Float(i) * y0(j); - end loop; -- Draw circles for polar grid. - plline(x, y); + for i in 1 .. 10 loop + plarc(0.0, 0.0, 0.1 * Long_Float(i), 0.1 * Long_Float(i), 0.0, 360.0, False); end loop; plcol0(2); Modified: trunk/examples/ada/xthick03a.adb.cmake =================================================================== --- trunk/examples/ada/xthick03a.adb.cmake 2009-08-19 08:16:21 UTC (rev 10294) +++ trunk/examples/ada/xthick03a.adb.cmake 2009-08-19 10:30:33 UTC (rev 10295) @@ -62,14 +62,10 @@ -- Set up viewport and window, but do not draw box. Set_Environment(-1.3, 1.3, -1.3, 1.3, Justified, No_Box); - for i in 1..10 loop - for j in x'range loop - x(j) := 0.1 * Long_Float(i) * x0(j); - y(j) := 0.1 * Long_Float(i) * y0(j); - end loop; - -- Draw circles for polar grid. - Draw_Curve(x, y); + -- Draw circles for polar grid. + for i in 1 .. 10 loop + Draw_Arc(0.0, 0.0, 0.1 * Long_Float(i), 0.1 * Long_Float(i), 0.0, 360.0, False); end loop; Set_Pen_Color(2); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |