vector

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2021 License: Apache-2.0 Imports: 4 Imported by: 229

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.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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