feature

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Kettle

func Kettle(w, h float64, r float64) *canvas.Path

func Pillow

func Pillow(size float64, r float64) *canvas.Path

func UnicornRoundedRectangle

func UnicornRoundedRectangle(w, h float64, r float64) *canvas.Path

Types

type CornerDot

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

func NewCornerDot

func NewCornerDot(ctx *canvas.Context, option CornerDotOption) *CornerDot

func (*CornerDot) Draw

func (c *CornerDot) Draw(x, y float64, size float64, rotation float64)

type CornerDotOption

type CornerDotOption struct {
	Type  CornerDotType
	Color common.Color
}

type CornerDotType

type CornerDotType int
const (
	NoneCorner CornerDotType = iota
	SquareCorner
	DotCorner
	RoundedCorner
	BottomLeftCorner
	BottomRightCorner
	TopRightCorner
	TopLeftCorner
	BottomLeftDiagonalCorner
	TopLeftDiagonalCorner
	TopLeftTrapezoidCorner
	KettleCorner
	PillowCorner
)

func (CornerDotType) String

func (c CornerDotType) String() string

type CornerPosition

type CornerPosition int
const (
	CornerTopLeft CornerPosition = iota
	CornerTopRight
	CornerBottomLeft
	CornerBottomRight
)

type CornerSquare

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

func NewCornerSquare

func NewCornerSquare(ctx *canvas.Context, option CornerSquareOption) *CornerSquare

func (*CornerSquare) Draw

func (c *CornerSquare) Draw(x, y float64, size float64, rotation float64, setBackgroundColor SetBackgroundColor)

type CornerSquareOption

type CornerSquareOption struct {
	Type  CornerSquareType
	Color common.Color
}

type CornerSquareType

type CornerSquareType int
const (
	NoneCornerSquare CornerSquareType = iota
	SquareCornerSquare
	DotCornerSquare
	ExtraRoundedCornerSquare
	BottomLeftCornerSquare
	BottomRightCornerSquare
	TopRightCornerSquare
	TopLeftCornerSquare
	KettleCornerSquare // 水壶形状
	PillowCornerSquare
	CircleMixCornerSquare
)

func (CornerSquareType) String

func (c CornerSquareType) String() string

type Dot

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

func NewDot

func NewDot(ctx *canvas.Context, option DotOption) *Dot

func (*Dot) Draw

func (d *Dot) Draw(x, y float64, size float64, neighbor Neighbor)

type DotOption

type DotOption struct {
	Type  DotType
	Color common.Color
}

type DotType

type DotType int
const (
	Dots DotType = iota
	Rounded
	Classy
	ClassyRounded
	Square
	ExtraRounded
	Diamond
	Star
	Rectangle
	Circle
)

func (DotType) String

func (d DotType) String() string

type Neighbor

type Neighbor func(x, y int) bool

type SetBackgroundColor

type SetBackgroundColor func(ctx *canvas.Context) error

Jump to

Keyboard shortcuts

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