htmlcanvas

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTMLCanvas

type HTMLCanvas struct {
	// contains filtered or unexported fields
}

HTMLCanvas is an HTMLCanvas renderer.

func New

func New(c js.Value, width, height, dpm float64) *HTMLCanvas

New returns an HTMLCanvas renderer.

func (*HTMLCanvas) RenderImage

func (r *HTMLCanvas) RenderImage(img image.Image, m canvas.Matrix)

RenderImage renders an image to the canvas using a transformation matrix.

func (*HTMLCanvas) RenderPath

func (r *HTMLCanvas) RenderPath(path *canvas.Path, style canvas.Style, m canvas.Matrix)

RenderPath renders a path to the canvas using a style and a transformation matrix.

func (*HTMLCanvas) RenderText

func (r *HTMLCanvas) RenderText(text *canvas.Text, m canvas.Matrix)

RenderText renders a text object to the canvas using a transformation matrix.

func (*HTMLCanvas) Size

func (r *HTMLCanvas) Size() (float64, float64)

Size returns the size of the canvas in millimeters.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL