Documentation
Overview ¶
Package vggio provides a vg.Canvas implementation backed by Gioui.
Index ¶
Examples ¶
Constants ¶
View Source
const DefaultDPI = 96
DefaultDPI is the default dot resolution for image drawing in dots per inch.
Variables ¶
This section is empty.
Functions ¶
func UseBackgroundColor ¶
UseBackgroundColor specifies the image background color. Without UseBackgroundColor, the default color is white.
Types ¶
type Canvas ¶
Canvas implements the vg.Canvas interface, drawing to an image.Image using vgimg and painting that image into a Gioui context.
func New ¶
New returns a new image canvas with the provided dimensions and options. The currently accepted options are UseDPI and UseBackgroundColor. If the resolution or background color are not specified, defaults are used.
func (*Canvas) Paint ¶
func (c *Canvas) Paint(e system.FrameEvent)
Paint paints the canvas' content on the screen.