package picasso

  1. Overview
  2. Docs
Abstract elements drawing library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.4.tar.gz
md5=d6028ccae6933bf903f34137c335f5ce
sha512=d8adf3324a27f016d0f6a08ff4afa714185c31e6dcf176e36053564c5e66e3cb734115e11ce6b68a7ed118291ef47f108efea3e3a2272e35b946661ea88e5eff

doc/picasso/Picasso/index.html

Module PicassoSource

Picasso is an Abstract element drawing library. It handles most of the boilerplate you usually write to draw abstract elements and allows you to view those.

Sourcemodule Colors : sig ... end

Colors handling

Sourcemodule Drawable : sig ... end

Module of drawable abstractions

Sourcemodule Rendering : sig ... end

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

Sourcemodule Rendering3d : sig ... end

Module for 3D model generation of abstract elements

Sourceexception BackendError of string

raised by rendering function when a backend is not installed or when an internal error occurs

Drawing utilities

Sourceval show : Rendering.t -> unit

Main drawing function. Displays a Rendering.t using one of the backend available. It first tries with gtk, and if lablgtk is not installed, retries using graphics. If none of the backend is installed, outputs a .svg file in the current directory, named after the title of the window if specified, otherwise named "picassonumber.svg"

Sourceval to_latex : ?filename:string -> ?tikz_only:bool -> Rendering.t -> unit

Outputs a tex file with a tikz figure corresponding to a Rendering.t. If the tikz_only option is set to false (default is true), it outputs the full tex document and not only the tikz figure

Sourceval to_svg : ?filename:string -> Rendering.t -> unit

Outputs a svg file with a figure corresponding to a Rendering.t

Sourceval to_obj : ?filename:string -> Rendering3d.t -> unit

Builds an obj file corresponding to a Rendering3D context

Backend specific drawing functions

Sourceval in_gtk_canvas : Rendering.t -> unit

Displays a Rendering.t within a scrollable, zoomable gtk canvas.

Sourceval in_graphics_canvas : Rendering.t -> unit

Displays a Rendering.t within a graphics window. The window created can be exited cleanly by pressing any key.

  • raises BackendError

    if the graphics library is not installed