plot/core
src/plot/core.tur
defn
plot-into-canvas
(plot-into-canvas [canvas :int renderers :int opts :int px :int py :int pw :int ph :int] :ptr<void>)
render into an existing canvas and viewport.
defn
plot
(plot [renderers :int opts :int] :ptr<void>)
render a Vec[Renderer] to a new surface and return it.
defn
plot-write-png
(plot-write-png [renderers :int opts :int path :cstr] :ptr<void>)
render a Vec[Renderer] and write it to a PNG file.
Internal definitions
__ok-- create an ok result wrapping integer value v.__err-- create an err result wrapping integer error value e.__make-renderer-- allocate the generic opaque renderer handle used by all plot modules.__renderer-floats-- attach the six generic float payload slots to a renderer.__renderer-ints-- attach the four generic integer payload slots to a renderer.__renderer-bounds-- attach explicit bounds hints to a renderer.__surface-create-- allocate a new plutovg surface.__surface-destroy-- destroy a plutovg surface.__surface-write-png-- write a plutovg surface to a PNG file.__canvas-create-- allocate a canvas for an existing surface.__canvas-destroy-- destroy a plutovg canvas.data->viewport-- map data coordinates to viewport coordinates.viewport->data-- map viewport coordinates back to data coordinates.