package archimedes

  1. Overview
  2. Docs

Arrow styles

type style =
  1. | Unstyled
    (*

    -------

    *)
  2. | Simple
    (*

    ------>

    *)
  3. | Double
    (*

    ----->>

    *)
  4. | Triple
    (*

    ---->>>

    *)
  5. | Diamond
    (*

    -----<>

    *)
  6. | Circle
    (*

    ------O

    *)
  7. | Stop
    (*

    ------|

    *)
  8. | Custom of Path.t -> unit
    (*

    It is also possible to give a path in the Custom style, leading to a completely customised arrow

    *)

Style of the arrow end. Below are textual representations of those endings

val path_line_to : ?size:float -> ?head:style -> ?tail:style -> Path.t -> float -> float -> unit

path_line_to p x y Adds an arrow to (x, y) into the path p. See line for explantation on the optional arguments.

val line_direct : ?size:float -> ?head:style -> ?tail:style -> Viewport.t -> float -> float -> float -> float -> unit -> unit

line_direct vp x0 y0 x y () draws a line directly on the viewport, withtout using an instruction (see line for usage)

val line : ?size:float -> ?head:style -> ?tail:style -> Viewport.t -> float -> float -> float -> float -> unit

line vp x0 y0 x y Draws a arrowed line on the viewport vp from (x0, y0) to (x, y) using an instruction (the drawing of the line is put on the queue of elements to draw on the viewport)

  • parameter size

    the size of the endings, in marks size

  • parameter head

    the head ending style

  • parameter tail

    the tail ending style

val arc_direct : ?size:float -> ?head:style -> ?tail:style -> Viewport.t -> float -> float -> float -> float -> float -> unit -> unit

arc_direct vp x0 y0 r a1 a2 () draws an arc directly on the viewport, withtout using an instruction (see arc for usage)

val arc : ?size:float -> ?head:style -> ?tail:style -> Viewport.t -> float -> float -> float -> float -> float -> unit

arc vp x0 y0 r a1 a2 Draws a arrowed arc on the viewport vp from (x0, y0) with a starting angle a1, a ending angle a2 and a radius r. Note that the starting point (x0, y0) is called the tail of the arrow.

  • parameter size

    the size of the endings, in marks size

  • parameter head

    the head ending style

  • parameter tail

    the tail ending style

OCaml

Innovation. Community. Security.