vector

package
v1.10.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: Apache-2.0 Imports: 3 Imported by: 8

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 DrawPathOptions

type DrawPathOptions struct {
	LineWidth   float32
	StrokeColor color.Color
}

DrawPathOptions is the options specified at (*Path).Draw.

type Path

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

Path represents a collection of paths.

func (*Path) Draw

func (p *Path) Draw(target *ebiten.Image, op *DrawPathOptions)

Draw draws the path by rendering its stroke or filling.

func (*Path) LineTo

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

LineTo adds a math.Segment 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.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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