drawing

package
v0.0.0-...-1981424 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawBezierCubic

func DrawBezierCubic(ops *op.Ops, opts BezierOptions)

DrawBezierCubic

see WIKI-EN WIKI-CN

func DrawBezierQuadratic

func DrawBezierQuadratic(ops *op.Ops, opts BezierOptions)

DrawBezierQuadratic

see WIKI-EN WIKI-CN

func DrawImage

func DrawImage(
	ops *op.Ops,
	img image.Image, filter paint.ImageFilter,
	scale f32.Point,
	position image.Point,
)

DrawImage

paint.ImageOp is used to draw images. Like paint.ColorOp, it sets part of the drawing context (the “brush”) that’s used for subsequent paint.PaintOp. paint.ImageOp is used similarly to ColorOp.

Note that image.NRGBA and image.Uniform images are efficient and treated specially. Other Image implementations will undergo a more expensive copy and conversion to the underlying image model.

func DrawProgressBar

func DrawProgressBar(
	ops *op.Ops, source input.Source,
	color color.NRGBA,
	maxWidth float64,
	y int,
	elapsed, duration time.Duration,
)

func DrawRRect

func DrawRRect(
	ops *op.Ops,
	size image.Point, color color.NRGBA, position image.Point,
	se, sw, nw, ne int,
)

func DrawRRectR

func DrawRRectR(
	ops *op.Ops,
	size image.Point, color color.NRGBA, position image.Point,
	roundness int,
)

func DrawRecordCache

func DrawRecordCache(ops *op.Ops)

func DrawRecordRect

func DrawRecordRect(
	ops *op.Ops,
	size image.Point, color color.NRGBA, position image.Point,
)

func DrawRect

func DrawRect(
	ops *op.Ops,
	size image.Point, color color.NRGBA, position image.Point,
)

func DrawRectSC

func DrawRectSC(ops *op.Ops, size image.Point, color color.NRGBA)

func DrawStrokeRect

func DrawStrokeRect(
	ops *op.Ops,
	size image.Point, color color.NRGBA, position image.Point,
	width float32, se, sw, nw, ne int,
)

func DrawStrokeRectR

func DrawStrokeRectR(
	ops *op.Ops,
	size image.Point, color color.NRGBA, position image.Point,
	width float32, roundness int,
)

func DrawStrokeTriangle

func DrawStrokeTriangle(
	ops *op.Ops,
	color color.NRGBA,
	point1 f32.Point, point2 f32.Point, point3 f32.Point,
	width float32,
)

func DrawTriangle

func DrawTriangle(
	ops *op.Ops,
	color color.NRGBA,
	point1 f32.Point, point2 f32.Point, point3 f32.Point,
)

func F32Pt2ImagePt

func F32Pt2ImagePt(pt f32.Point) image.Point

func ImagePt2F32Pt

func ImagePt2F32Pt(pt image.Point) f32.Point

func NewImageNRGBADynamicColor

func NewImageNRGBADynamicColor(bounds image.Rectangle) *image.NRGBA

func NewImageNRGBARandColor

func NewImageNRGBARandColor(bounds image.Rectangle) *image.NRGBA

Types

type BezierOption

type BezierOption func(*BezierOptions)

func BZOptBPoints

func BZOptBPoints(move, to f32.Point, ctrl ...f32.Point) BezierOption

func BZOptColor

func BZOptColor(value color.NRGBA) BezierOption

func BZOptCtrl

func BZOptCtrl(value ...f32.Point) BezierOption

func BZOptMove

func BZOptMove(value f32.Point) BezierOption

func BZOptPos

func BZOptPos(value f32.Point) BezierOption

func BZOptSize

func BZOptSize(value image.Point) BezierOption

func BZOptTo

func BZOptTo(value f32.Point) BezierOption

type BezierOptions

type BezierOptions struct {
	Size  image.Point
	Color color.NRGBA
	Pos   f32.Point
	Move  f32.Point
	To    f32.Point
	Ctrl  []f32.Point
}

Jump to

Keyboard shortcuts

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