package picasso

  1. Overview
  2. Docs
On This Page
  1. Camera settings

Module Picasso.RenderingSource

Module for 2d drawing of abstract elements, handles the 'camera' settings, 2D projection, and some graphical options

Sourcetype t

Type of 2D scenes

Sourceval create : ?title:string -> ?padding:float -> ?grid:bool -> ?axis:bool -> abciss:string -> ordinate:string -> float -> float -> t

Initalizes an empty 2d scenes.

Sourceval add : ?autofit:bool -> t -> (Colors.t * Drawable.t) -> t

Registers an abstract element, associated to a color, into a scene. Automatically changes the camera settings to encompass the newly added abstract element. You can cancel this behaviour by settings the optional argument autofit to false

Sourceval add_l : ?autofit:bool -> t -> (Colors.t * Drawable.t) list -> t

Registers a list of element into a scene. add_l r l is equivalent to calling add successively on the elements of l

Camera settings

Sourceval translate : (float * float) -> t -> t

translation of the whole scene

Sourceval scale : t -> float -> t

zoom / unzoom