Struct nanovg::Context[][src]

pub struct Context(_);

A initialized NanoVG context - the central type which all operations rely on.

Methods

impl Context
[src]

Return the raw FFI C-struct pointer to the context.

Begin drawing a frame. All NanoVG drawing takes place within a frame.

width and height should be the width and height of the framebuffer / window client size. device_pixel_ratio defines the pixel ratio. NanoVG doesn't guess this automatically to allow for Hi-DPI devices. Basically, this is your hidpi factor. handler is the callback in which you draw your paths. You cannot draw paths outside of this callback.

Trait Implementations

impl Debug for Context
[src]

Formats the value using the given formatter. Read more

impl Drop for Context
[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl !Send for Context

impl !Sync for Context