draw

package
v0.0.0-...-8789af9 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: MIT Imports: 7 Imported by: 2

Documentation

Overview

draw is a package from drawing with the cpu

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Draw

func Draw[T Drawable](shape T, d displayer, clr color.Color)

func Fill

func Fill[T Fillableable](shape T, d displayer, clr color.Color)

func WriteLine

func WriteLine(d displayer, s string, x int, y int, c color.Color)

Types

type Circle

type Circle geom.Circle

func (Circle) Draw

func (c Circle) Draw(d displayer, clr color.Color)

func (Circle) Fill

func (c Circle) Fill(d displayer, clr color.Color)

type Cube

type Cube [8]geom.Point3D

func (Cube) Draw

func (c Cube) Draw(d displayer, clr color.Color)

func (Cube) Fill

func (c Cube) Fill(d displayer, clr color.Color)

type Drawable

type Drawable interface {
	Draw(d displayer, clr color.Color)
}

type Fillableable

type Fillableable interface {
	Fill(d displayer, clr color.Color)
}

type Line

type Line geom.Line

func (Line) Draw

func (l Line) Draw(d displayer, clr color.Color)

type Point

type Point geom.Point

func (Point) Draw

func (p Point) Draw(d displayer, c color.Color)

type Point3D

type Point3D struct {
	X, Y, Z float64
}

type Polygon

type Polygon geom.Polygon

func (Polygon) Draw

func (p Polygon) Draw(d displayer, clr color.Color)

func (Polygon) Fill

func (p Polygon) Fill(d displayer, clr color.Color)

type Ray

type Ray struct {
	geom.Ray
}

func (Ray) Draw

func (r Ray) Draw(d displayer, clr color.Color)

type Rect

type Rect geom.Rect

func (Rect) Draw

func (r Rect) Draw(d displayer, clr color.Color)

func (Rect) Fill

func (r Rect) Fill(d displayer, clr color.Color)

type Triangle

type Triangle geom.Triangle

func (Triangle) Draw

func (t Triangle) Draw(d displayer, clr color.Color)

func (Triangle) Fill

func (t Triangle) Fill(d displayer, clr color.Color)

Jump to

Keyboard shortcuts

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