tuhi

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package tuhi defines the Tuhi data format.

The tuhi.File type can be marshalled with encoding/json.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Version    int
	Devicename string
	Sessionid  string
	Dimensions []int
	Timestamp  int
	Strokes    []Stroke
}

func (File) Bounds

func (f File) Bounds() image.Rectangle

func (File) DrawingBounds

func (f File) DrawingBounds() image.Rectangle

type Point

type Point struct {
	Position image.Point
	Pressure float64
}

func (Point) MarshalJSON

func (p Point) MarshalJSON() ([]byte, error)

func (*Point) UnmarshalJSON

func (p *Point) UnmarshalJSON(b []byte) error

type Stroke

type Stroke struct {
	Points []Point
}

Jump to

Keyboard shortcuts

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