Commits

Barry Schwartz committed ce5b7dd

Eliminate Path_type (which isn't so much use to us now).

  • Participants
  • Parent commits 35ca00c

Comments (0)

Files changed (2)

   let to_complex_array bc = Array.map Point.to_complex (to_array bc)
 end
 
-module type Path_type =
-sig
-  type t
-  type stitching = NO_STITCHING | STITCH_DISCONTINUOUS
-  external default : unit -> t = "new_default_path_wrapper"
-  external make : Point.t -> t = "new_path_wrapper"
-  external point_at : t -> float -> Point.t = "path_point_at_wrapper"
-  external value_at : t -> float -> Coord.dim2 -> float = "path_value_at_wrapper"
-  external roots : t -> Coord.t -> Coord.dim2 -> Coord.t array = "path_roots_wrapper"
-  external portion : t -> float -> float -> t = "path_portion_wrapper"
-  external reverse : t -> t = "path_reverse_wrapper"
-  external append_curve : ?stitch:stitching -> t -> Curve.t -> unit = "path_append_curve_wrapper"
-  external append : ?stitch:stitching -> t -> t -> unit = "path_append_wrapper"
-  external nearest_point : ?from_t:float -> ?to_t:float -> t -> Point.t -> float * float = "path_nearest_point_wrapper"
-  external size_open : t -> int = "path_size_open_wrapper"
-  external size_closed : t -> int = "path_size_closed_wrapper"
-  external size_default : t -> int = "path_size_default_wrapper"
-  external size : t -> int = "path_size_wrapper"
-  external max_size : t -> int = "path_max_size_wrapper"
-  external empty : t -> bool = "path_empty_wrapper"
-  external closed : t -> bool = "path_closed_wrapper"
-  external close : t -> bool -> unit = "path_close_wrapper"
-  external bounds_fast : t -> Rect.t option = "path_bounds_fast_wrapper"
-  external bounds_exact : t -> Rect.t option = "path_bounds_exact_wrapper"
-  external to_cubic_beziers_open : t -> float -> Bezier_curve.t list = "path_to_cubic_bezier_curves_open_wrapper"
-  external to_cubic_beziers_closed : t -> float -> Bezier_curve.t list = "path_to_cubic_bezier_curves_closed_wrapper"
-  external to_cubic_beziers_default : t -> float -> Bezier_curve.t list = "path_to_cubic_bezier_curves_default_wrapper"
-  external winding : t -> Point.t -> int = "path_winding_wrapper"
-  external direction : t -> bool = "path_direction_wrapper"
-  external contains : ?evenodd:bool -> t -> Point.t -> bool = "path_contains_wrapper"
-  external mono_splits : t -> float array = "path_mono_splits_wrapper"
-  external crossings_among : t array -> Crossing.t array array = "path_crossings_among_wrapper"
-  external self_crossings : t -> Crossing.t array = "path_self_crossings_wrapper"
-  external crossings : t -> t -> Crossing.t array = "path_crossings_wrapper"
-  external crossings_between : t array -> t array -> Crossing.t array array = "path_crossings_between_wrapper"
-end
-
-module Path : Path_type =
+module Path =
 struct
   type t
   type stitching = NO_STITCHING | STITCH_DISCONTINUOUS
   val to_complex_array : t -> Complex.t array
 end
 
-module type Path_type =
+module Path :
 sig
   type t
   type stitching = NO_STITCHING | STITCH_DISCONTINUOUS
   external crossings : t -> t -> Crossing.t array = "path_crossings_wrapper"
   external crossings_between : t array -> t array -> Crossing.t array array = "path_crossings_between_wrapper"
 end
-
-module Path : Path_type