New returns a new (bounded) draw.Canvas.
(c vg.CanvasSizer)
| 285 | |
| 286 | // New returns a new (bounded) draw.Canvas. |
| 287 | func New(c vg.CanvasSizer) Canvas { |
| 288 | w, h := c.Size() |
| 289 | return NewCanvas(c, w, h) |
| 290 | } |
| 291 | |
| 292 | // NewFormattedCanvas creates a new vg.CanvasWriterTo with the specified |
| 293 | // image format. Supported formats need to be registered by importing one or |