From: <hez...@us...> - 2011-03-20 23:08:59
|
Revision: 11664 http://plplot.svn.sourceforge.net/plplot/?rev=11664&view=rev Author: hezekiahcarty Date: 2011-03-20 23:08:53 +0000 (Sun, 20 Mar 2011) Log Message: ----------- Update OCaml bindings to support the new plarc rotation parameter Modified Paths: -------------- trunk/bindings/ocaml/plplot.ml trunk/bindings/ocaml/plplot.mli trunk/bindings/ocaml/plplot_h trunk/bindings/ocaml/plplot_h.inc trunk/examples/ocaml/x03.ml Modified: trunk/bindings/ocaml/plplot.ml =================================================================== --- trunk/bindings/ocaml/plplot.ml 2011-03-20 23:08:13 UTC (rev 11663) +++ trunk/bindings/ocaml/plplot.ml 2011-03-20 23:08:53 UTC (rev 11664) @@ -181,7 +181,8 @@ type plot_t = (* Standard plot elements *) - | Arc of (color_t * float * float * float * float * float * float * bool) + | Arc of + (color_t * float * float * float * float * float * float * float * bool) | Axes of (color_t * axis_options_t list * axis_options_t list * int * line_style_t * (plplot_axis_type -> float -> string) option) @@ -493,8 +494,8 @@ (** {3 Simplified plotting interface} *) (** [arc ?fill color x y a b angle1 angle2 rotation] *) - let arc ?(fill = false) color x y a b angle1 angle2 = - Arc (color, x, y, a, b, angle1, angle2, fill) + let arc ?(fill = false) color x y a b angle1 angle2 rotation = + Arc (color, x, y, a, b, angle1, angle2, rotation, fill) (** [axes ?color ?style ?width xopt yopt] *) let axes ?(color = Black) ?(style = Solid_line) ?(width = 1) ?labelfunc xopt yopt = @@ -504,7 +505,7 @@ let default_axes = axes default_axis_options default_axis_options (** [circle ?fill color x y r] - A special case of [arc]. *) - let circle ?fill color x y r = arc ?fill color x y r r 0.0 360.0 + let circle ?fill color x y r = arc ?fill color x y r r 0.0 360.0 0.0 (** Draw a colorbar, optionally log scaled and labeled. *) let image_colorbar ?custom_axis ?label ?log ?pos ?width data = @@ -950,9 +951,9 @@ set_color (Index_color old_color); () in - let plot_arc (color, x, y, a, b, angle1, angle2, fill) = + let plot_arc (color, x, y, a, b, angle1, angle2, rotate, fill) = set_color_in color ( - fun () -> plarc x y a b angle1 angle2 fill; + fun () -> plarc x y a b angle1 angle2 rotate fill; ) in let plot_axes (color, xopt, yopt, width, style, labelfunc) = Modified: trunk/bindings/ocaml/plplot.mli =================================================================== --- trunk/bindings/ocaml/plplot.mli 2011-03-20 23:08:13 UTC (rev 11663) +++ trunk/bindings/ocaml/plplot.mli 2011-03-20 23:08:53 UTC (rev 11664) @@ -262,10 +262,11 @@ (** {4 Plot elements} *) - (** [arc ?fill color x y a b angle0 angle1] *) + (** [arc ?fill color x y a b angle0 angle1 rotate] *) val arc : ?fill:bool -> - color_t -> float -> float -> float -> float -> float -> float -> plot_t + color_t -> float -> float -> float -> float -> float -> float -> float -> + plot_t (** [axes ?color ?style ?width xopt yopt] *) val axes : @@ -587,7 +588,7 @@ = "camlidl_plplot_core_c_pl_setcontlabelparam" external pladv : int -> unit = "camlidl_plplot_core_c_pladv" external plarc : - float -> float -> float -> float -> float -> float -> bool -> unit + float -> float -> float -> float -> float -> float -> float -> bool -> unit = "camlidl_plplot_core_c_plarc_bytecode" "camlidl_plplot_core_c_plarc" external plaxes : float -> float -> string -> float -> int -> string -> float -> int -> unit Modified: trunk/bindings/ocaml/plplot_h =================================================================== --- trunk/bindings/ocaml/plplot_h 2011-03-20 23:08:13 UTC (rev 11663) +++ trunk/bindings/ocaml/plplot_h 2011-03-20 23:08:53 UTC (rev 11664) @@ -20,7 +20,7 @@ void c_plarc(PLFLT x, PLFLT y, PLFLT a, PLFLT b, PLFLT angle1, PLFLT angle2, - PLBOOL fill); + PLFLT rotate, PLBOOL fill); void c_plaxes(PLFLT x0, PLFLT y0, const char *xopt, PLFLT xtick, PLINT nxsub, Modified: trunk/bindings/ocaml/plplot_h.inc =================================================================== --- trunk/bindings/ocaml/plplot_h.inc 2011-03-20 23:08:13 UTC (rev 11663) +++ trunk/bindings/ocaml/plplot_h.inc 2011-03-20 23:08:53 UTC (rev 11664) @@ -1,7 +1,7 @@ [mlname(pl_setcontlabelformat)] void c_pl_setcontlabelformat ( int lexp, int sigdig ); [mlname(pl_setcontlabelparam)] void c_pl_setcontlabelparam ( double offset, double size, double spacing, int active ); [mlname(pladv)] void c_pladv ( int page ); -[mlname(plarc)] void c_plarc ( double x, double y, double a, double b, double angle1, double angle2, boolean fill ); +[mlname(plarc)] void c_plarc ( double x, double y, double a, double b, double angle1, double angle2, double rotate, boolean fill ); [mlname(plaxes)] void c_plaxes ( double x0, double y0, [string] const char * xopt, double xtick, int nxsub, [string] const char * yopt, double ytick, int nysub ); [mlname(plbin)] void c_plbin ( int nbin, [in, size_is(nbin)] double * x, [in, size_is(nbin)] double * y, plplot_bin_style opt ); [mlname(plbtime)] void c_plbtime ( [out] int * year, [out] int * month, [out] int * day, [out] int * hour, [out] int * min, [out] double * sec, double ctime ); Modified: trunk/examples/ocaml/x03.ml =================================================================== --- trunk/examples/ocaml/x03.ml 2011-03-20 23:08:13 UTC (rev 11663) +++ trunk/examples/ocaml/x03.ml 2011-03-20 23:08:53 UTC (rev 11664) @@ -50,7 +50,7 @@ for i = 1 to 10 do (* Draw circles for polar grid *) let r = 0.1 *. float_of_int i in - plarc 0.0 0.0 r r 0.0 360.0 false; + plarc 0.0 0.0 r r 0.0 360.0 0.0 false; done; plcol0 2; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |