shapes

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Structs for working with shapes as values.

The main firefly module provides functions for drawing shapes. This modules provides useful struct for when you need to store or manipulate a shape before it can be drawn.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arc

type Arc struct {
	Point    firefly.Point
	Diameter int
	Start    firefly.Angle
	Sweep    firefly.Angle
	Style    firefly.Style
}

A wrapper for firefly.DrawArc.

func (Arc) Draw

func (s Arc) Draw()

Draw implements Shape interface.

type Circle

type Circle struct {
	Point    firefly.Point
	Diameter int
	Style    firefly.Style
}

A wrapper for firefly.DrawCircle.

func (Circle) Draw

func (s Circle) Draw()

Draw implements Shape interface.

type Ellipse

type Ellipse struct {
	Point firefly.Point
	Size  firefly.Size
	Style firefly.Style
}

A wrapper for firefly.DrawEllipse.

func (Ellipse) Draw

func (s Ellipse) Draw()

Draw implements Shape interface.

type Line

type Line struct {
	A     firefly.Point
	B     firefly.Point
	Style firefly.LineStyle
}

A wrapper for firefly.DrawLine.

func (Line) Draw

func (s Line) Draw()

Draw implements Shape interface.

type Rect

type Rect struct {
	Point firefly.Point
	Size  firefly.Size
	Style firefly.Style
}

A wrapper for firefly.DrawRect.

func (Rect) Draw

func (s Rect) Draw()

Draw implements Shape interface.

type RoundedRect

type RoundedRect struct {
	Point  firefly.Point
	Size   firefly.Size
	Corner firefly.Size
	Style  firefly.Style
}

A wrapper for firefly.DrawRoundedRect.

func (RoundedRect) Draw

func (s RoundedRect) Draw()

Draw implements Shape interface.

type Sector

type Sector struct {
	Point    firefly.Point
	Diameter int
	Start    firefly.Angle
	Sweep    firefly.Angle
	Style    firefly.Style
}

A wrapper for firefly.DrawSector.

func (Sector) Draw

func (s Sector) Draw()

Draw implements Shape interface.

type Shape

type Shape interface {
	Draw()
}

type Triangle

type Triangle struct {
	A     firefly.Point
	B     firefly.Point
	C     firefly.Point
	Style firefly.Style
}

A wrapper for firefly.DrawTriangle.

func (Triangle) Draw

func (s Triangle) Draw()

Draw implements Shape interface.

Jump to

Keyboard shortcuts

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