vector

package
Version: v2.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Overview

Package vector provides functions for vector graphics rendering.

This package is under experiments and the API might be changed with breaking backward compatibility.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FillOptions

type FillOptions struct {
	// Color is a color to fill with.
	Color color.Color
}

FillOptions represents options to fill a path.

type Path

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

Path represents a collection of path segments.

func (*Path) CubicTo

func (p *Path) CubicTo(cp0x, cp0y, cp1x, cp1y, x, y float32)

CubicTo adds a cubic Bézier curve to the path.

func (*Path) Fill

func (p *Path) Fill(dst *ebiten.Image, op *FillOptions)

Fill fills the region of the path with the given options op.

func (*Path) LineTo

func (p *Path) LineTo(x, y float32)

LineTo adds a line segument to the path, which starts from the current position and ends to the given position (x, y).

LineTo updates the current position to (x, y).

func (*Path) MoveTo

func (p *Path) MoveTo(x, y float32)

MoveTo skips the current position of the path to the given position (x, y) without adding any strokes.

func (*Path) QuadTo

func (p *Path) QuadTo(cpx, cpy, x, y float32)

QuadTo adds a quadratic Bézier curve to the path.

Source Files

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto