tinydraw

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: BSD-3-Clause Imports: 3 Imported by: 44

README

TinyDraw

Build

TinyDraw is a package for drawing primitives on TinyGo displays. It is heavily based on the Adafruit GFX library.

example

This package is experimental and may change in the future. It has not been optimized for speed or memory usage (yet).

License

This project is licensed under the BSD 3-clause license, just like the Go project itself.

Documentation

Index

Constants

View Source
const Version = "0.4.0"

Version returns a user-readable string showing the version of the tinydraw package for support purposes.

Update this value before release of new version of software.

Variables

This section is empty.

Functions

func Circle

func Circle(display drivers.Displayer, x0 int16, y0 int16, r int16, color color.RGBA)

Circle draws a circle given a point and radius

func FilledCircle

func FilledCircle(display drivers.Displayer, x0 int16, y0 int16, r int16, color color.RGBA)

FilledCircle draws a filled circle given a point and radius

func FilledRectangle

func FilledRectangle(display drivers.Displayer, x int16, y int16, w int16, h int16, color color.RGBA) error

FilledRectangle draws a filled rectangle given a point, width and height

func FilledTriangle

func FilledTriangle(display drivers.Displayer, x0 int16, y0 int16, x1 int16, y1 int16, x2 int16, y2 int16, color color.RGBA)

FilledTriangle draws a filled triangle given three points

func Line

func Line(display drivers.Displayer, x0 int16, y0 int16, x1 int16, y1 int16, color color.RGBA)

Line draws a line between two points

func Rectangle

func Rectangle(display drivers.Displayer, x int16, y int16, w int16, h int16, color color.RGBA) error

Rectangle draws a rectangle given a point, width and height

func Triangle

func Triangle(display drivers.Displayer, x0 int16, y0 int16, x1 int16, y1 int16, x2 int16, y2 int16, color color.RGBA)

Triangle draws a triangle given three points

Types

This section is empty.

Directories

Path Synopsis
examples
epd

Jump to

Keyboard shortcuts

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