Page
Library
Module
Module type
Parameter
Class
Class type
Source
Vgr.PrivateSourcePrivate functions for implementing renderers.
Warning. Vg users should not use these definitions, they exposes Vg's internals for implementing renderers. This functionality is subject to change even between minor versions of the library.
In order to provide a consistant interface for Vg users, renderer writers should follow the guidelines below. You may want to drop an email to the maintainer for help and discussion.
Vgr_bla (lowercase).Vgr_bla.target.render function. If you are writing a batch renderer provide support for each of the dst types and especially the non-blocking interface.Vgr.xmp.limit parameter of render.Vg's coordinate system conventions to specify the relationship between a target and the view rectangle to render.Vg's full rendering model or diverges from its semantics it must ignore unsupported features and warn the client via the warn function.The type for renderers.
The type for rendering functions.
The type for render targets. The function takes a created renderer and its destination. It should return a boolean indicating whether multiple images can be rendered on the target, and a function that is invoked by the renderer to render a new image or end the rendering sequence.
create_target t makes an end-user render target from t.
partial k r suspends the renderer r and returns `Partial. Rendering will continue with k r, on render `Await.
dst_stored destinationsflush k r flushes the renderer r. If r writes on a stored destination this function must be called by the rendering function on `End.
writeb b k r writes the byte b and kontinues.
writes s j l k r writes l bytes from s starting at j and kontinues.
writebuf buf j l k r write l bytes from buf starting at j and kontinues.