Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
A module able to paint a canvas with several graphic primitives and then to process the canvas into a picture file format. The functions are supposed to be pure
val paint_text :
?kolor:kolor ->
String.t ->
orientation ->
coord ->
size ->
justify ->
style ->
t ->
t
paint ?kolor text orient coord size justification style canvas
adds a text
with the given orient
, size
, justification
and style
at the given coord
to canvas
.@return the modified canvas
paint_line ?kolor width start end canvas
paints a line with the given kolor
and width
between start
and stop
on canvas
.
paint_circle ?kolor center radius canvas
paints a circle filled with the given kolor
defined by center
and radius
on canvas
.
paint_rect ?kolor corner1 corner2 canvas
paints a rectangle filled with the given kolor
defined by corner1
and corner2
on canvas
.
paint_image corner scale png canvas
paints a png
image filled at corner
, scaled at scale
on canvas
.
paint_arc ?kolor start end radius canvas
paints an arc filled with kolor
between start
and end
of radius
on canvas
.
val get_context : unit -> t
get_context ()