package archimedes
Arrow styles
type style =
| Unstyled
(*-------
*)| Simple
(*------>
*)| Double
(*----->>
*)| Triple
(*---->>>
*)| Diamond
(*-----<>
*)| Circle
(*------O
*)| Stop
(*------|
*)| 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
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)
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.